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
+ *