From 50149c28ec1ddbd4d38a57f2ac6c34f9618e320e Mon Sep 17 00:00:00 2001
From: theo-s68 <194042188+theo-s68@users.noreply.github.com>
Date: Wed, 16 Jul 2025 16:09:59 +0700
Subject: [PATCH] handle data streams
---
.github/workflows/java.yml | 40 +-
clients/common/pom.xml | 2 +-
.../connector/client/common/ApiClient.java | 51 +-
.../configuration/ClientConfiguration.java | 1 -
.../adapter/ConnectionInterface.java | 3 +
.../websocket/adapter/ConnectionWrapper.java | 26 +-
.../adapter/PoolConnectionWrapper.java | 7 +
.../common/websocket/dtos/StreamResponse.java | 22 +
.../service/StreamBlockingQueue.java | 4 +
.../service/StreamBlockingQueueWrapper.java | 10 +-
.../CHANGELOG.md | 10 +
.../docs/AccountConfigUpdate.md | 15 +
.../docs/AccountConfigUpdateAc.md | 14 +
.../docs/AccountUpdate.md | 16 +
.../docs/AccountUpdateA.md | 15 +
.../docs/AccountUpdateABInner.md | 16 +
.../docs/AccountUpdateAPInner.md | 21 +
.../docs/GridUpdate.md | 15 +
.../docs/GridUpdateGu.md | 22 +
.../docs/Listenkeyexpired.md | 14 +
.../docs/MarginCall.md | 16 +
.../docs/MarginCallPInner.md | 20 +
.../docs/MarketDataApi.md | 2 +-
.../docs/OrderTradeUpdate.md | 16 +
.../docs/OrderTradeUpdateO.md | 46 +
.../docs/StrategyUpdate.md | 15 +
.../docs/StrategyUpdateSu.md | 18 +
.../docs/UserDataStreamEventsResponse.md | 23 +
.../example_websocket_api.md | 20 +-
.../derivatives-trading-coin-futures/pom.xml | 4 +-
.../rest/api/AccountApi.java | 2 +-
.../DerivativesTradingCoinFuturesRestApi.java | 2 +-
.../rest/api/MarketDataApi.java | 4 +-
.../rest/api/PortfolioMarginEndpointsApi.java | 2 +-
.../rest/api/TradeApi.java | 2 +-
.../rest/api/UserDataStreamsApi.java | 2 +-
...vativesTradingCoinFuturesWebSocketApi.java | 2 +-
.../websocket/stream/JSON.java | 151 +-
...vesTradingCoinFuturesWebSocketStreams.java | 38 +-
.../stream/model/AccountConfigUpdate.java | 312 +++
.../stream/model/AccountConfigUpdateAc.java | 277 ++
.../websocket/stream/model/AccountUpdate.java | 356 +++
.../stream/model/AccountUpdateA.java | 373 +++
.../stream/model/AccountUpdateABInner.java | 375 +++
.../stream/model/AccountUpdateAPInner.java | 600 +++++
.../websocket/stream/model/GridUpdate.java | 311 +++
.../websocket/stream/model/GridUpdateGu.java | 628 +++++
.../stream/model/Listenkeyexpired.java | 277 ++
.../websocket/stream/model/MarginCall.java | 392 +++
.../stream/model/MarginCallPInner.java | 555 ++++
.../stream/model/OrderTradeUpdate.java | 357 +++
.../stream/model/OrderTradeUpdateO.java | 1703 ++++++++++++
.../stream/model/StrategyUpdate.java | 311 +++
.../stream/model/StrategyUpdateSu.java | 441 +++
.../model/UserDataStreamEventsResponse.java | 703 +++++
.../derivatives-trading-options/CHANGELOG.md | 10 +
.../docs/AccountUpdate.md | 17 +
.../docs/AccountUpdateBInner.md | 19 +
.../docs/AccountUpdateGInner.md | 17 +
.../docs/AccountUpdatePInner.md | 17 +
...sactionHistoryDownloadLinkByIdResponse1.md | 18 -
...sactionHistoryDownloadLinkByIdResponse2.md | 18 -
.../docs/NewOrderResponse1.md | 22 -
.../docs/NewOrderResponse2.md | 33 -
.../docs/OrderTradeUpdate.md | 14 +
.../docs/OrderTradeUpdateOInner.md | 29 +
.../docs/OrderTradeUpdateOInnerFiInner.md | 18 +
.../docs/RiskLevelChange.md | 16 +
.../docs/UserDataStreamEventsResponse.md | 21 +
clients/derivatives-trading-options/pom.xml | 4 +-
.../rest/api/AccountApi.java | 2 +-
.../rest/api/MarketDataApi.java | 2 +-
.../rest/api/MarketMakerBlockTradeApi.java | 2 +-
.../rest/api/MarketMakerEndpointsApi.java | 2 +-
.../rest/api/TradeApi.java | 2 +-
.../rest/api/UserDataStreamsApi.java | 2 +-
.../websocket/stream/JSON.java | 90 +-
...vativesTradingOptionsWebSocketStreams.java | 38 +-
.../websocket/stream/model/AccountUpdate.java | 467 ++++
.../stream/model/AccountUpdateBInner.java | 502 ++++
.../stream/model/AccountUpdateGInner.java | 398 +++
.../stream/model/AccountUpdatePInner.java | 420 +++
.../stream/model/OrderTradeUpdate.java | 303 +++
.../stream/model/OrderTradeUpdateOInner.java | 962 +++++++
.../model/OrderTradeUpdateOInnerFiInner.java | 468 ++++
.../stream/model/RiskLevelChange.java | 367 +++
.../model/UserDataStreamEventsResponse.java | 420 +++
.../CHANGELOG.md | 10 +
.../docs/Risklevelchange.md | 18 +
.../docs/UserDataStreamEventsResponse.md | 18 +
.../example_websocket_stream.md | 0
.../pom.xml | 4 +-
.../rest/api/AccountApi.java | 2 +-
.../rest/api/MarketDataApi.java | 2 +-
...ortfolioMarginProWebSocketStreamsUtil.java | 18 +
.../websocket/stream/JSON.java | 460 ++++
...ingPortfolioMarginProWebSocketStreams.java | 68 +
.../stream/model/AbstractOpenApiSchema.java | 145 +
.../stream/model/Risklevelchange.java | 457 ++++
.../model/UserDataStreamEventsResponse.java | 277 ++
.../CHANGELOG.md | 10 +
.../docs/AccountConfigUpdate.md | 16 +
.../docs/AccountConfigUpdateAc.md | 14 +
.../docs/AccountUpdate.md | 17 +
.../docs/AccountUpdateA.md | 15 +
.../docs/AccountUpdateABInner.md | 16 +
.../docs/AccountUpdateAPInner.md | 19 +
.../docs/Balanceupdate.md | 17 +
.../docs/ConditionalOrderTradeUpdate.md | 16 +
.../docs/ConditionalOrderTradeUpdateSo.md | 33 +
.../docs/Executionreport.md | 54 +
.../docs/Liabilitychange.md | 19 +
.../docs/Listenkeyexpired.md | 13 +
.../docs/Openorderloss.md | 14 +
.../docs/OpenorderlossOInner.md | 14 +
.../docs/OrderTradeUpdate.md | 17 +
.../docs/OrderTradeUpdateO.md | 41 +
.../docs/Outboundaccountposition.md | 16 +
.../docs/OutboundaccountpositionBInner.md | 15 +
.../docs/Risklevelchange.md | 18 +
.../docs/TradeApi.md | 4 +-
.../docs/UserDataStreamEventsResponse.md | 60 +
.../example_rest.md | 2 +-
.../example_websocket_stream.md | 0
.../pom.xml | 4 +-
.../rest/api/AccountApi.java | 2 +-
...ivativesTradingPortfolioMarginRestApi.java | 12 +-
.../rest/api/MarketDataApi.java | 2 +-
.../rest/api/TradeApi.java | 14 +-
.../rest/api/UserDataStreamsApi.java | 2 +-
...ngPortfolioMarginWebSocketStreamsUtil.java | 18 +
.../websocket/stream/JSON.java | 633 +++++
...radingPortfolioMarginWebSocketStreams.java | 67 +
.../stream/model/AbstractOpenApiSchema.java | 145 +
.../stream/model/AccountConfigUpdate.java | 357 +++
.../stream/model/AccountConfigUpdateAc.java | 277 ++
.../websocket/stream/model/AccountUpdate.java | 401 +++
.../stream/model/AccountUpdateA.java | 373 +++
.../stream/model/AccountUpdateABInner.java | 375 +++
.../stream/model/AccountUpdateAPInner.java | 510 ++++
.../websocket/stream/model/Balanceupdate.java | 395 +++
.../model/ConditionalOrderTradeUpdate.java | 360 +++
.../model/ConditionalOrderTradeUpdateSo.java | 1116 ++++++++
.../stream/model/Executionreport.java | 1983 ++++++++++++++
.../stream/model/Liabilitychange.java | 494 ++++
.../stream/model/Listenkeyexpired.java | 232 ++
.../websocket/stream/model/Openorderloss.java | 299 ++
.../stream/model/OpenorderlossOInner.java | 285 ++
.../stream/model/OrderTradeUpdate.java | 402 +++
.../stream/model/OrderTradeUpdateO.java | 1473 ++++++++++
.../stream/model/Outboundaccountposition.java | 377 +++
.../model/OutboundaccountpositionBInner.java | 339 +++
.../stream/model/Risklevelchange.java | 457 ++++
.../model/UserDataStreamEventsResponse.java | 1014 +++++++
.../CHANGELOG.md | 10 +
.../docs/AccountConfigUpdate.md | 16 +
.../docs/AccountConfigUpdateAc.md | 14 +
.../docs/AccountConfigUpdateAi.md | 13 +
.../docs/AccountUpdate.md | 15 +
.../docs/AccountUpdateA.md | 15 +
.../docs/AccountUpdateABInner.md | 16 +
.../docs/AccountUpdateAPInner.md | 21 +
.../docs/BatchOrdersInner.md | 66 +-
.../docs/BatchOrdersPlaceMultipleOrders.md | 12 +
.../BatchOrdersPlaceMultipleOrdersInner.md | 105 +
.../docs/ConditionalOrderTriggerReject.md | 15 +
.../docs/ConditionalOrderTriggerRejectOr.md | 15 +
.../docs/GridUpdate.md | 15 +
.../docs/GridUpdateGu.md | 22 +
.../docs/Listenkeyexpired.md | 14 +
.../docs/MarginCall.md | 15 +
.../docs/MarginCallPInner.md | 20 +
.../OpenInterestStatisticsResponseInner.md | 1 +
.../docs/OrderTradeUpdate.md | 15 +
.../docs/OrderTradeUpdateO.md | 48 +
.../docs/PlaceMultipleOrdersRequest.md | 2 +-
.../docs/StrategyUpdate.md | 15 +
.../docs/StrategyUpdateSu.md | 18 +
.../docs/TradeLite.md | 24 +
.../docs/UserDataStreamEventsResponse.md | 33 +
.../example_rest.md | 2 +-
.../example_websocket_api.md | 32 +-
.../derivatives-trading-usds-futures/pom.xml | 4 +-
.../rest/JSON.java | 6 +
.../rest/api/AccountApi.java | 2 +-
.../rest/api/ConvertApi.java | 6 +-
.../DerivativesTradingUsdsFuturesRestApi.java | 2 +-
.../rest/api/MarketDataApi.java | 2 +-
.../rest/api/PortfolioMarginEndpointsApi.java | 2 +-
.../rest/api/TradeApi.java | 2 +-
.../rest/api/UserDataStreamsApi.java | 2 +-
.../rest/model/BatchOrdersInner.java | 883 +-----
.../model/BatchOrdersPlaceMultipleOrders.java | 187 ++
.../BatchOrdersPlaceMultipleOrdersInner.java | 1321 +++++++++
.../OpenInterestStatisticsResponseInner.java | 51 +-
.../model/PlaceMultipleOrdersRequest.java | 9 +-
...vativesTradingUsdsFuturesWebSocketApi.java | 2 +-
.../websocket/stream/JSON.java | 185 +-
...vesTradingUsdsFuturesWebSocketStreams.java | 38 +-
.../stream/model/AccountConfigUpdate.java | 354 +++
.../stream/model/AccountConfigUpdateAc.java | 277 ++
.../stream/model/AccountConfigUpdateAi.java | 232 ++
.../websocket/stream/model/AccountUpdate.java | 311 +++
.../stream/model/AccountUpdateA.java | 373 +++
.../stream/model/AccountUpdateABInner.java | 375 +++
.../stream/model/AccountUpdateAPInner.java | 600 +++++
.../model/ConditionalOrderTriggerReject.java | 319 +++
.../ConditionalOrderTriggerRejectOr.java | 331 +++
.../websocket/stream/model/GridUpdate.java | 311 +++
.../websocket/stream/model/GridUpdateGu.java | 628 +++++
.../stream/model/Listenkeyexpired.java | 285 ++
.../websocket/stream/model/MarginCall.java | 347 +++
.../stream/model/MarginCallPInner.java | 555 ++++
.../stream/model/OrderTradeUpdate.java | 312 +++
.../stream/model/OrderTradeUpdateO.java | 1771 ++++++++++++
.../stream/model/StrategyUpdate.java | 311 +++
.../stream/model/StrategyUpdateSu.java | 441 +++
.../websocket/stream/model/TradeLite.java | 706 +++++
.../model/UserDataStreamEventsResponse.java | 857 ++++++
.../rest/api/TradeApiTest.java | 3 +-
clients/margin-trading/CHANGELOG.md | 10 +
clients/margin-trading/docs/Balanceupdate.md | 16 +
.../margin-trading/docs/Executionreport.md | 62 +
.../margin-trading/docs/Listenkeyexpired.md | 14 +
clients/margin-trading/docs/Liststatus.md | 22 +
.../margin-trading/docs/ListstatusOInner.md | 15 +
.../docs/MarginAccountNewOrderResponse1.md | 17 -
...arginAccountNewOrderResponse3FillsInner.md | 17 -
.../docs/MarginLevelStatusChange.md | 15 +
.../docs/Outboundaccountposition.md | 15 +
.../docs/OutboundaccountpositionBInner.md | 15 +
...QueryIsolatedMarginAccountInfoResponse1.md | 16 -
...edMarginAccountInfoResponse1AssetsInner.md | 24 -
...ccountInfoResponse1AssetsInnerBaseAsset.md | 22 -
...countInfoResponse1AssetsInnerQuoteAsset.md | 22 -
...QueryIsolatedMarginAccountInfoResponse2.md | 13 -
.../docs/RiskDataStreamEventsResponse.md | 19 +
.../docs/TradeDataStreamEventsResponse.md | 63 +
.../docs/UserLiabilityChange.md | 17 +
.../example_websocket_stream.md | 0
clients/margin-trading/pom.xml | 4 +-
.../margin_trading/rest/api/AccountApi.java | 2 +-
.../rest/api/BorrowRepayApi.java | 2 +-
.../rest/api/MarketDataApi.java | 2 +-
.../rest/api/RiskDataStreamApi.java | 2 +-
.../margin_trading/rest/api/TradeApi.java | 2 +-
.../rest/api/TradeDataStreamApi.java | 2 +-
.../margin_trading/rest/api/TransferApi.java | 2 +-
.../margin_trading/websocket/stream/JSON.java | 566 ++++
.../MarginTradingWebSocketStreamsUtil.java | 18 +
.../api/MarginTradingWebSocketStreams.java | 88 +
.../stream/model/AbstractOpenApiSchema.java | 145 +
.../websocket/stream/model/Balanceupdate.java | 358 +++
.../stream/model/Executionreport.java | 2399 +++++++++++++++++
.../stream/model/Listenkeyexpired.java | 285 ++
.../websocket/stream/model/Liststatus.java | 645 +++++
.../stream/model/ListstatusOInner.java | 322 +++
.../stream/model/MarginLevelStatusChange.java | 323 +++
.../stream/model/Outboundaccountposition.java | 340 +++
.../model/OutboundaccountpositionBInner.java | 339 +++
.../model/RiskDataStreamEventsResponse.java | 359 +++
.../model/TradeDataStreamEventsResponse.java | 569 ++++
.../stream/model/UserLiabilityChange.java | 412 +++
clients/spot/CHANGELOG.md | 10 +
clients/spot/docs/BalanceUpdate.md | 16 +
clients/spot/docs/EventStreamTerminated.md | 13 +
clients/spot/docs/ExecutionReport.md | 62 +
clients/spot/docs/ExternalLockUpdate.md | 16 +
clients/spot/docs/ListStatus.md | 22 +
clients/spot/docs/ListStatusOInner.md | 15 +
clients/spot/docs/ListenKeyExpired.md | 14 +
...derCancelReplaceResponseCancelResponse.md} | 6 +-
...CancelReplaceResponseDataCancelResponse.md | 2 +
...ncelReplaceResponseDataNewOrderResponse.md | 5 +
...rCancelReplaceResponseNewOrderResponse.md} | 10 +-
clients/spot/docs/OutboundAccountPosition.md | 15 +
.../docs/OutboundAccountPositionBInner.md | 15 +
clients/spot/docs/Ticker24hrResponse2Inner.md | 11 +-
clients/spot/docs/TickerResponse2Inner.md | 3 +
.../spot/docs/TickerTradingDayResponse1.md | 3 +
.../docs/TickerTradingDayResponse2Inner.md | 3 +
.../spot/docs/UserDataStreamEventsResponse.md | 63 +
clients/spot/example_websocket_api.md | 98 +-
clients/spot/pom.xml | 4 +-
.../connector/client/spot/rest/JSON.java | 6 +
.../client/spot/rest/api/AccountApi.java | 2 +-
.../client/spot/rest/api/GeneralApi.java | 2 +-
.../client/spot/rest/api/MarketApi.java | 2 +-
.../client/spot/rest/api/TradeApi.java | 2 +-
.../spot/rest/api/UserDataStreamApi.java | 2 +-
.../model/OrderCancelReplaceResponse.java | 171 +-
...erCancelReplaceResponseCancelResponse.java | 858 ++++++
...ncelReplaceResponseDataCancelResponse.java | 78 +-
...elReplaceResponseDataNewOrderResponse.java | 193 +-
...CancelReplaceResponseNewOrderResponse.java | 909 +++++++
.../spot/rest/model/Ticker24hrResponse1.java | 459 +++-
.../rest/model/Ticker24hrResponse2Inner.java | 461 +++-
.../spot/rest/model/TickerResponse1.java | 130 +
.../spot/rest/model/TickerResponse2Inner.java | 131 +
.../rest/model/TickerTradingDayResponse1.java | 132 +
.../model/TickerTradingDayResponse2Inner.java | 134 +
.../client/spot/websocket/api/JSON.java | 87 +-
.../websocket/api/api/SpotWebSocketApi.java | 8 +-
.../websocket/api/api/UserDataStreamApi.java | 20 +-
.../websocket/api/model/BalanceUpdate.java | 358 +++
.../api/model/EventStreamTerminated.java | 232 ++
.../websocket/api/model/ExecutionReport.java | 2335 ++++++++++++++++
.../api/model/ExternalLockUpdate.java | 359 +++
.../spot/websocket/api/model/ListStatus.java | 645 +++++
.../websocket/api/model/ListStatusOInner.java | 322 +++
.../websocket/api/model/ListenKeyExpired.java | 277 ++
.../api/model/OutboundAccountPosition.java | 340 +++
.../model/OutboundAccountPositionBInner.java | 339 +++
.../model/UserDataStreamEventsResponse.java | 670 +++++
.../stream/api/SpotWebSocketStreams.java | 10 +-
.../api/api/UserDataStreamApiTest.java | 21 +-
.../derivatives-trading-coin-futures/pom.xml | 2 +-
.../QueryIndexPriceConstituentsExample.java | 2 +-
.../account/AccountInformationExample.java | 4 +-
.../account/FuturesAccountBalanceExample.java | 4 +-
.../api/trade/CancelOrderExample.java | 4 +-
.../api/trade/ModifyOrderExample.java | 4 +-
.../websocket/api/trade/NewOrderExample.java | 4 +-
.../api/trade/PositionInformationExample.java | 4 +-
.../api/trade/QueryOrderExample.java | 4 +-
.../CloseUserDataStreamExample.java | 4 +-
.../KeepaliveUserDataStreamExample.java | 4 +-
.../StartUserDataStreamExample.java | 4 +-
examples/derivatives-trading-options/pom.xml | 2 +-
.../pom.xml | 2 +-
.../pom.xml | 2 +-
.../rest/trade/CmAccountTradeListExample.java | 6 +-
.../rest/trade/UmAccountTradeListExample.java | 8 +-
.../derivatives-trading-usds-futures/pom.xml | 2 +-
.../trade/PlaceMultipleOrdersExample.java | 4 +-
.../account/AccountInformationExample.java | 4 +-
.../AccountInformationV2ExampleAsync.java | 4 +-
.../AccountInformationV2ExampleSync.java | 4 +-
.../account/FuturesAccountBalanceExample.java | 4 +-
.../FuturesAccountBalanceV2ExampleAsync.java | 4 +-
.../FuturesAccountBalanceV2ExampleSync.java | 4 +-
.../api/marketdata/OrderBookExample.java | 4 +-
.../SymbolOrderBookTickerExample.java | 4 +-
.../marketdata/SymbolPriceTickerExample.java | 4 +-
.../api/trade/CancelOrderExample.java | 4 +-
.../api/trade/ModifyOrderExample.java | 4 +-
.../websocket/api/trade/NewOrderExample.java | 4 +-
.../api/trade/PositionInformationExample.java | 4 +-
.../PositionInformationV2ExampleAsync.java | 4 +-
.../PositionInformationV2ExampleSync.java | 4 +-
.../api/trade/QueryOrderExample.java | 4 +-
.../CloseUserDataStreamExample.java | 4 +-
.../KeepaliveUserDataStreamExample.java | 4 +-
.../StartUserDataStreamExample.java | 4 +-
examples/margin-trading/pom.xml | 2 +-
examples/spot/pom.xml | 2 +-
.../api/account/AccountCommissionExample.java | 4 +-
.../AccountRateLimitsOrdersExample.java | 4 +-
.../api/account/AccountStatusExample.java | 4 +-
.../api/account/AllOrderListsExample.java | 4 +-
.../api/account/AllOrdersExample.java | 4 +-
.../api/account/MyAllocationsExample.java | 4 +-
.../account/MyPreventedMatchesExample.java | 4 +-
.../api/account/MyTradesExample.java | 4 +-
.../account/OpenOrderListsStatusExample.java | 4 +-
.../api/account/OpenOrdersStatusExample.java | 4 +-
.../api/account/OrderAmendmentsExample.java | 4 +-
.../api/account/OrderListStatusExample.java | 4 +-
.../api/account/OrderStatusExample.java | 4 +-
.../api/auth/SessionLogonExample.java | 4 +-
.../api/auth/SessionLogoutExample.java | 4 +-
.../api/auth/SessionStatusExample.java | 4 +-
.../api/general/ExchangeInfoExample.java | 4 +-
.../websocket/api/general/PingExample.java | 4 +-
.../websocket/api/general/TimeExample.java | 4 +-
.../websocket/api/market/AvgPriceExample.java | 4 +-
.../websocket/api/market/DepthExample.java | 4 +-
.../spot/websocket/api/market/HrExample.java | 4 +-
.../websocket/api/market/KlinesExample.java | 4 +-
.../api/market/TickerBookExample.java | 4 +-
.../websocket/api/market/TickerExample.java | 4 +-
.../api/market/TickerPriceExample.java | 4 +-
.../api/market/TickerTradingDayExample.java | 4 +-
.../api/market/TradesAggregateExample.java | 4 +-
.../api/market/TradesHistoricalExample.java | 4 +-
.../api/market/TradesRecentExample.java | 4 +-
.../websocket/api/market/UiKlinesExample.java | 4 +-
.../api/trade/OpenOrdersCancelAllExample.java | 4 +-
.../trade/OrderAmendKeepPriorityExample.java | 4 +-
.../api/trade/OrderCancelExample.java | 4 +-
.../api/trade/OrderCancelReplaceExample.java | 4 +-
.../api/trade/OrderListCancelExample.java | 4 +-
.../api/trade/OrderListPlaceExample.java | 4 +-
.../api/trade/OrderListPlaceOcoExample.java | 4 +-
.../api/trade/OrderListPlaceOtoExample.java | 4 +-
.../api/trade/OrderListPlaceOtocoExample.java | 4 +-
.../api/trade/OrderPlaceExample.java | 4 +-
.../websocket/api/trade/OrderTestExample.java | 4 +-
.../api/trade/SorOrderPlaceExample.java | 4 +-
.../api/trade/SorOrderTestExample.java | 4 +-
.../UserDataStreamPingExample.java | 4 +-
.../UserDataStreamStartExample.java | 4 +-
.../UserDataStreamStopExample.java | 4 +-
.../UserDataStreamSubscribeExample.java | 41 +-
.../UserDataStreamUnsubscribeExample.java | 4 +-
405 files changed, 57337 insertions(+), 1516 deletions(-)
create mode 100644 clients/common/src/main/java/com/binance/connector/client/common/websocket/dtos/StreamResponse.java
create mode 100644 clients/derivatives-trading-coin-futures/docs/AccountConfigUpdate.md
create mode 100644 clients/derivatives-trading-coin-futures/docs/AccountConfigUpdateAc.md
create mode 100644 clients/derivatives-trading-coin-futures/docs/AccountUpdate.md
create mode 100644 clients/derivatives-trading-coin-futures/docs/AccountUpdateA.md
create mode 100644 clients/derivatives-trading-coin-futures/docs/AccountUpdateABInner.md
create mode 100644 clients/derivatives-trading-coin-futures/docs/AccountUpdateAPInner.md
create mode 100644 clients/derivatives-trading-coin-futures/docs/GridUpdate.md
create mode 100644 clients/derivatives-trading-coin-futures/docs/GridUpdateGu.md
create mode 100644 clients/derivatives-trading-coin-futures/docs/Listenkeyexpired.md
create mode 100644 clients/derivatives-trading-coin-futures/docs/MarginCall.md
create mode 100644 clients/derivatives-trading-coin-futures/docs/MarginCallPInner.md
create mode 100644 clients/derivatives-trading-coin-futures/docs/OrderTradeUpdate.md
create mode 100644 clients/derivatives-trading-coin-futures/docs/OrderTradeUpdateO.md
create mode 100644 clients/derivatives-trading-coin-futures/docs/StrategyUpdate.md
create mode 100644 clients/derivatives-trading-coin-futures/docs/StrategyUpdateSu.md
create mode 100644 clients/derivatives-trading-coin-futures/docs/UserDataStreamEventsResponse.md
create mode 100644 clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/AccountConfigUpdate.java
create mode 100644 clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/AccountConfigUpdateAc.java
create mode 100644 clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/AccountUpdate.java
create mode 100644 clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/AccountUpdateA.java
create mode 100644 clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/AccountUpdateABInner.java
create mode 100644 clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/AccountUpdateAPInner.java
create mode 100644 clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/GridUpdate.java
create mode 100644 clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/GridUpdateGu.java
create mode 100644 clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/Listenkeyexpired.java
create mode 100644 clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/MarginCall.java
create mode 100644 clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/MarginCallPInner.java
create mode 100644 clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/OrderTradeUpdate.java
create mode 100644 clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/OrderTradeUpdateO.java
create mode 100644 clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/StrategyUpdate.java
create mode 100644 clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/StrategyUpdateSu.java
create mode 100644 clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/UserDataStreamEventsResponse.java
create mode 100644 clients/derivatives-trading-options/docs/AccountUpdate.md
create mode 100644 clients/derivatives-trading-options/docs/AccountUpdateBInner.md
create mode 100644 clients/derivatives-trading-options/docs/AccountUpdateGInner.md
create mode 100644 clients/derivatives-trading-options/docs/AccountUpdatePInner.md
delete mode 100644 clients/derivatives-trading-options/docs/GetOptionTransactionHistoryDownloadLinkByIdResponse1.md
delete mode 100644 clients/derivatives-trading-options/docs/GetOptionTransactionHistoryDownloadLinkByIdResponse2.md
delete mode 100644 clients/derivatives-trading-options/docs/NewOrderResponse1.md
delete mode 100644 clients/derivatives-trading-options/docs/NewOrderResponse2.md
create mode 100644 clients/derivatives-trading-options/docs/OrderTradeUpdate.md
create mode 100644 clients/derivatives-trading-options/docs/OrderTradeUpdateOInner.md
create mode 100644 clients/derivatives-trading-options/docs/OrderTradeUpdateOInnerFiInner.md
create mode 100644 clients/derivatives-trading-options/docs/RiskLevelChange.md
create mode 100644 clients/derivatives-trading-options/docs/UserDataStreamEventsResponse.md
create mode 100644 clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/model/AccountUpdate.java
create mode 100644 clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/model/AccountUpdateBInner.java
create mode 100644 clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/model/AccountUpdateGInner.java
create mode 100644 clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/model/AccountUpdatePInner.java
create mode 100644 clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/model/OrderTradeUpdate.java
create mode 100644 clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/model/OrderTradeUpdateOInner.java
create mode 100644 clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/model/OrderTradeUpdateOInnerFiInner.java
create mode 100644 clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/model/RiskLevelChange.java
create mode 100644 clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/model/UserDataStreamEventsResponse.java
create mode 100644 clients/derivatives-trading-portfolio-margin-pro/docs/Risklevelchange.md
create mode 100644 clients/derivatives-trading-portfolio-margin-pro/docs/UserDataStreamEventsResponse.md
create mode 100644 clients/derivatives-trading-portfolio-margin-pro/example_websocket_stream.md
create mode 100644 clients/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/websocket/stream/DerivativesTradingPortfolioMarginProWebSocketStreamsUtil.java
create mode 100644 clients/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/websocket/stream/JSON.java
create mode 100644 clients/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/websocket/stream/api/DerivativesTradingPortfolioMarginProWebSocketStreams.java
create mode 100644 clients/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/websocket/stream/model/AbstractOpenApiSchema.java
create mode 100644 clients/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/websocket/stream/model/Risklevelchange.java
create mode 100644 clients/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/websocket/stream/model/UserDataStreamEventsResponse.java
create mode 100644 clients/derivatives-trading-portfolio-margin/docs/AccountConfigUpdate.md
create mode 100644 clients/derivatives-trading-portfolio-margin/docs/AccountConfigUpdateAc.md
create mode 100644 clients/derivatives-trading-portfolio-margin/docs/AccountUpdate.md
create mode 100644 clients/derivatives-trading-portfolio-margin/docs/AccountUpdateA.md
create mode 100644 clients/derivatives-trading-portfolio-margin/docs/AccountUpdateABInner.md
create mode 100644 clients/derivatives-trading-portfolio-margin/docs/AccountUpdateAPInner.md
create mode 100644 clients/derivatives-trading-portfolio-margin/docs/Balanceupdate.md
create mode 100644 clients/derivatives-trading-portfolio-margin/docs/ConditionalOrderTradeUpdate.md
create mode 100644 clients/derivatives-trading-portfolio-margin/docs/ConditionalOrderTradeUpdateSo.md
create mode 100644 clients/derivatives-trading-portfolio-margin/docs/Executionreport.md
create mode 100644 clients/derivatives-trading-portfolio-margin/docs/Liabilitychange.md
create mode 100644 clients/derivatives-trading-portfolio-margin/docs/Listenkeyexpired.md
create mode 100644 clients/derivatives-trading-portfolio-margin/docs/Openorderloss.md
create mode 100644 clients/derivatives-trading-portfolio-margin/docs/OpenorderlossOInner.md
create mode 100644 clients/derivatives-trading-portfolio-margin/docs/OrderTradeUpdate.md
create mode 100644 clients/derivatives-trading-portfolio-margin/docs/OrderTradeUpdateO.md
create mode 100644 clients/derivatives-trading-portfolio-margin/docs/Outboundaccountposition.md
create mode 100644 clients/derivatives-trading-portfolio-margin/docs/OutboundaccountpositionBInner.md
create mode 100644 clients/derivatives-trading-portfolio-margin/docs/Risklevelchange.md
create mode 100644 clients/derivatives-trading-portfolio-margin/docs/UserDataStreamEventsResponse.md
create mode 100644 clients/derivatives-trading-portfolio-margin/example_websocket_stream.md
create mode 100644 clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/websocket/stream/DerivativesTradingPortfolioMarginWebSocketStreamsUtil.java
create mode 100644 clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/websocket/stream/JSON.java
create mode 100644 clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/websocket/stream/api/DerivativesTradingPortfolioMarginWebSocketStreams.java
create mode 100644 clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/websocket/stream/model/AbstractOpenApiSchema.java
create mode 100644 clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/websocket/stream/model/AccountConfigUpdate.java
create mode 100644 clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/websocket/stream/model/AccountConfigUpdateAc.java
create mode 100644 clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/websocket/stream/model/AccountUpdate.java
create mode 100644 clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/websocket/stream/model/AccountUpdateA.java
create mode 100644 clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/websocket/stream/model/AccountUpdateABInner.java
create mode 100644 clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/websocket/stream/model/AccountUpdateAPInner.java
create mode 100644 clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/websocket/stream/model/Balanceupdate.java
create mode 100644 clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/websocket/stream/model/ConditionalOrderTradeUpdate.java
create mode 100644 clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/websocket/stream/model/ConditionalOrderTradeUpdateSo.java
create mode 100644 clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/websocket/stream/model/Executionreport.java
create mode 100644 clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/websocket/stream/model/Liabilitychange.java
create mode 100644 clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/websocket/stream/model/Listenkeyexpired.java
create mode 100644 clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/websocket/stream/model/Openorderloss.java
create mode 100644 clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/websocket/stream/model/OpenorderlossOInner.java
create mode 100644 clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/websocket/stream/model/OrderTradeUpdate.java
create mode 100644 clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/websocket/stream/model/OrderTradeUpdateO.java
create mode 100644 clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/websocket/stream/model/Outboundaccountposition.java
create mode 100644 clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/websocket/stream/model/OutboundaccountpositionBInner.java
create mode 100644 clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/websocket/stream/model/Risklevelchange.java
create mode 100644 clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/websocket/stream/model/UserDataStreamEventsResponse.java
create mode 100644 clients/derivatives-trading-usds-futures/docs/AccountConfigUpdate.md
create mode 100644 clients/derivatives-trading-usds-futures/docs/AccountConfigUpdateAc.md
create mode 100644 clients/derivatives-trading-usds-futures/docs/AccountConfigUpdateAi.md
create mode 100644 clients/derivatives-trading-usds-futures/docs/AccountUpdate.md
create mode 100644 clients/derivatives-trading-usds-futures/docs/AccountUpdateA.md
create mode 100644 clients/derivatives-trading-usds-futures/docs/AccountUpdateABInner.md
create mode 100644 clients/derivatives-trading-usds-futures/docs/AccountUpdateAPInner.md
create mode 100644 clients/derivatives-trading-usds-futures/docs/BatchOrdersPlaceMultipleOrders.md
create mode 100644 clients/derivatives-trading-usds-futures/docs/BatchOrdersPlaceMultipleOrdersInner.md
create mode 100644 clients/derivatives-trading-usds-futures/docs/ConditionalOrderTriggerReject.md
create mode 100644 clients/derivatives-trading-usds-futures/docs/ConditionalOrderTriggerRejectOr.md
create mode 100644 clients/derivatives-trading-usds-futures/docs/GridUpdate.md
create mode 100644 clients/derivatives-trading-usds-futures/docs/GridUpdateGu.md
create mode 100644 clients/derivatives-trading-usds-futures/docs/Listenkeyexpired.md
create mode 100644 clients/derivatives-trading-usds-futures/docs/MarginCall.md
create mode 100644 clients/derivatives-trading-usds-futures/docs/MarginCallPInner.md
create mode 100644 clients/derivatives-trading-usds-futures/docs/OrderTradeUpdate.md
create mode 100644 clients/derivatives-trading-usds-futures/docs/OrderTradeUpdateO.md
create mode 100644 clients/derivatives-trading-usds-futures/docs/StrategyUpdate.md
create mode 100644 clients/derivatives-trading-usds-futures/docs/StrategyUpdateSu.md
create mode 100644 clients/derivatives-trading-usds-futures/docs/TradeLite.md
create mode 100644 clients/derivatives-trading-usds-futures/docs/UserDataStreamEventsResponse.md
create mode 100644 clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/BatchOrdersPlaceMultipleOrders.java
create mode 100644 clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/model/BatchOrdersPlaceMultipleOrdersInner.java
create mode 100644 clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/AccountConfigUpdate.java
create mode 100644 clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/AccountConfigUpdateAc.java
create mode 100644 clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/AccountConfigUpdateAi.java
create mode 100644 clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/AccountUpdate.java
create mode 100644 clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/AccountUpdateA.java
create mode 100644 clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/AccountUpdateABInner.java
create mode 100644 clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/AccountUpdateAPInner.java
create mode 100644 clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/ConditionalOrderTriggerReject.java
create mode 100644 clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/ConditionalOrderTriggerRejectOr.java
create mode 100644 clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/GridUpdate.java
create mode 100644 clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/GridUpdateGu.java
create mode 100644 clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/Listenkeyexpired.java
create mode 100644 clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/MarginCall.java
create mode 100644 clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/MarginCallPInner.java
create mode 100644 clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/OrderTradeUpdate.java
create mode 100644 clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/OrderTradeUpdateO.java
create mode 100644 clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/StrategyUpdate.java
create mode 100644 clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/StrategyUpdateSu.java
create mode 100644 clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/TradeLite.java
create mode 100644 clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/UserDataStreamEventsResponse.java
create mode 100644 clients/margin-trading/docs/Balanceupdate.md
create mode 100644 clients/margin-trading/docs/Executionreport.md
create mode 100644 clients/margin-trading/docs/Listenkeyexpired.md
create mode 100644 clients/margin-trading/docs/Liststatus.md
create mode 100644 clients/margin-trading/docs/ListstatusOInner.md
delete mode 100644 clients/margin-trading/docs/MarginAccountNewOrderResponse1.md
delete mode 100644 clients/margin-trading/docs/MarginAccountNewOrderResponse3FillsInner.md
create mode 100644 clients/margin-trading/docs/MarginLevelStatusChange.md
create mode 100644 clients/margin-trading/docs/Outboundaccountposition.md
create mode 100644 clients/margin-trading/docs/OutboundaccountpositionBInner.md
delete mode 100644 clients/margin-trading/docs/QueryIsolatedMarginAccountInfoResponse1.md
delete mode 100644 clients/margin-trading/docs/QueryIsolatedMarginAccountInfoResponse1AssetsInner.md
delete mode 100644 clients/margin-trading/docs/QueryIsolatedMarginAccountInfoResponse1AssetsInnerBaseAsset.md
delete mode 100644 clients/margin-trading/docs/QueryIsolatedMarginAccountInfoResponse1AssetsInnerQuoteAsset.md
delete mode 100644 clients/margin-trading/docs/QueryIsolatedMarginAccountInfoResponse2.md
create mode 100644 clients/margin-trading/docs/RiskDataStreamEventsResponse.md
create mode 100644 clients/margin-trading/docs/TradeDataStreamEventsResponse.md
create mode 100644 clients/margin-trading/docs/UserLiabilityChange.md
create mode 100644 clients/margin-trading/example_websocket_stream.md
create mode 100644 clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/websocket/stream/JSON.java
create mode 100644 clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/websocket/stream/MarginTradingWebSocketStreamsUtil.java
create mode 100644 clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/websocket/stream/api/MarginTradingWebSocketStreams.java
create mode 100644 clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/websocket/stream/model/AbstractOpenApiSchema.java
create mode 100644 clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/websocket/stream/model/Balanceupdate.java
create mode 100644 clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/websocket/stream/model/Executionreport.java
create mode 100644 clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/websocket/stream/model/Listenkeyexpired.java
create mode 100644 clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/websocket/stream/model/Liststatus.java
create mode 100644 clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/websocket/stream/model/ListstatusOInner.java
create mode 100644 clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/websocket/stream/model/MarginLevelStatusChange.java
create mode 100644 clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/websocket/stream/model/Outboundaccountposition.java
create mode 100644 clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/websocket/stream/model/OutboundaccountpositionBInner.java
create mode 100644 clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/websocket/stream/model/RiskDataStreamEventsResponse.java
create mode 100644 clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/websocket/stream/model/TradeDataStreamEventsResponse.java
create mode 100644 clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/websocket/stream/model/UserLiabilityChange.java
create mode 100644 clients/spot/docs/BalanceUpdate.md
create mode 100644 clients/spot/docs/EventStreamTerminated.md
create mode 100644 clients/spot/docs/ExecutionReport.md
create mode 100644 clients/spot/docs/ExternalLockUpdate.md
create mode 100644 clients/spot/docs/ListStatus.md
create mode 100644 clients/spot/docs/ListStatusOInner.md
create mode 100644 clients/spot/docs/ListenKeyExpired.md
rename clients/{margin-trading/docs/MarginAccountNewOrderResponse2.md => spot/docs/OrderCancelReplaceResponseCancelResponse.md} (78%)
rename clients/{margin-trading/docs/MarginAccountNewOrderResponse3.md => spot/docs/OrderCancelReplaceResponseNewOrderResponse.md} (68%)
create mode 100644 clients/spot/docs/OutboundAccountPosition.md
create mode 100644 clients/spot/docs/OutboundAccountPositionBInner.md
create mode 100644 clients/spot/docs/UserDataStreamEventsResponse.md
create mode 100644 clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/OrderCancelReplaceResponseCancelResponse.java
create mode 100644 clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/OrderCancelReplaceResponseNewOrderResponse.java
create mode 100644 clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/BalanceUpdate.java
create mode 100644 clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/EventStreamTerminated.java
create mode 100644 clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/ExecutionReport.java
create mode 100644 clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/ExternalLockUpdate.java
create mode 100644 clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/ListStatus.java
create mode 100644 clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/ListStatusOInner.java
create mode 100644 clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/ListenKeyExpired.java
create mode 100644 clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OutboundAccountPosition.java
create mode 100644 clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OutboundAccountPositionBInner.java
create mode 100644 clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/UserDataStreamEventsResponse.java
diff --git a/.github/workflows/java.yml b/.github/workflows/java.yml
index c28783f5..04e3706c 100644
--- a/.github/workflows/java.yml
+++ b/.github/workflows/java.yml
@@ -1,8 +1,10 @@
name: Java Main Workflow
on:
-# pull_request:
-# branches: [ master, rc-** ]
+ push:
+ branches: [ master ]
+ pull_request:
+ branches: [ master, rc-* ]
jobs:
detect-targets:
@@ -28,13 +30,13 @@ jobs:
fi
# Check each client dynamically
- find clients/* -type d -maxdepth 0 | while read client; do
+ while read client; do
CLIENT_NAME=$(basename "$client")
if ! git diff --quiet "$BASE_COMMIT" HEAD -- "$client"; then
echo "Changes detected in $CLIENT_NAME"
MODIFIED_TARGETS+=("$CLIENT_NAME")
fi
- done
+ done < <(find clients/* -type d -maxdepth 0)
# Convert to JSON array format
MODIFIED_TARGETS_JSON=$(printf '%s\n' "${MODIFIED_TARGETS[@]}" | jq -R -s -c 'split("\n") | map(select(. != ""))')
@@ -42,7 +44,7 @@ jobs:
echo "Detected modified targets: $MODIFIED_TARGETS_JSON"
echo "modified_targets=$MODIFIED_TARGETS_JSON" >> $GITHUB_ENV
echo "::set-output name=modified_targets::$MODIFIED_TARGETS_JSON"
- checkstyle:
+ verify:
runs-on: ubuntu-latest
needs: detect-targets
if: ${{ needs.detect-targets.outputs.modified_targets != '[]' }}
@@ -59,29 +61,5 @@ jobs:
'examples/pom.xml'
- name: Validate modules
run: |
- mvn -f clients/pom.xml -N install
- mvn -f clients/pom.xml -pl common install
- mvn -f clients/pom.xml -pl `echo '${{ needs.detect-targets.outputs.modified_targets }}' | jq -r 'join(",")'` validate
- build:
- runs-on: ubuntu-latest
- needs: detect-targets
- if: ${{ needs.detect-targets.outputs.modified_targets != '[]' }}
- strategy:
- matrix:
- target: ${{ fromJson(needs.detect-targets.outputs.modified_targets) }}
- java-version: [ 11, 17 ]
- steps:
- - uses: actions/checkout@v3
- - name: Set up JDK
- uses: actions/setup-java@v3
- with:
- java-version: ${{ matrix.java-version }}
- distribution: 'adopt'
- cache: 'maven'
- cache-dependency-path: |
- 'clients/pom.xml'
- 'examples/pom.xml'
- - name: Build ${{ matrix.target }} module
- run: |
- mvn -f clients/pom.xml -N install
- mvn -f clients/pom.xml -pl common,${{ matrix.target }} install -Dcheckstyle.skip=true
\ No newline at end of file
+ mvn -f clients/pom.xml -pl common install -Dgpg.skip
+ mvn -f clients/pom.xml -pl `echo '${{ needs.detect-targets.outputs.modified_targets }}' | jq -r 'join(",")'` verify -Dgpg.skip
\ No newline at end of file
diff --git a/clients/common/pom.xml b/clients/common/pom.xml
index 3f3cd9ae..f7f3bb55 100644
--- a/clients/common/pom.xml
+++ b/clients/common/pom.xml
@@ -10,6 +10,6 @@
binance-common
common
- 1.3.0
+ 1.4.0
jar
\ No newline at end of file
diff --git a/clients/common/src/main/java/com/binance/connector/client/common/ApiClient.java b/clients/common/src/main/java/com/binance/connector/client/common/ApiClient.java
index b92dbc7e..bb04290b 100644
--- a/clients/common/src/main/java/com/binance/connector/client/common/ApiClient.java
+++ b/clients/common/src/main/java/com/binance/connector/client/common/ApiClient.java
@@ -134,7 +134,8 @@ public class ApiClient {
private Gson json;
- private Set forbiddenHeaders = new HashSet<>(Arrays.asList("host", "authorization", "cookie", ":method", ":path"));
+ private Set forbiddenHeaders =
+ new HashSet<>(Arrays.asList("host", "authorization", "cookie", ":method", ":path"));
public ApiClient(ClientConfiguration configuration) {
this(configuration, new BinanceAuthenticationFactory(), null);
@@ -188,8 +189,10 @@ public ApiClient(
}
}
- if (configuration.getCustomHeaders() != null && !configuration.getCustomHeaders().isEmpty()) {
- Interceptor customHeadersInterceptor = getCustomHeadersInterceptor(configuration.getCustomHeaders());
+ if (configuration.getCustomHeaders() != null
+ && !configuration.getCustomHeaders().isEmpty()) {
+ Interceptor customHeadersInterceptor =
+ getCustomHeadersInterceptor(configuration.getCustomHeaders());
builder.addInterceptor(customHeadersInterceptor);
}
@@ -217,13 +220,15 @@ public ApiClient(
if (authentication != null) {
authentications.put(BINANCE_SIGNATURE, authentication);
}
+ }
- Authentication binanceApiKeyOnly =
- (queryParams, headerParams, cookieParams, payload, method, uri) -> {
+ Authentication binanceApiKeyOnly =
+ (queryParams, headerParams, cookieParams, payload, method, uri) -> {
+ if (signatureConfiguration != null && signatureConfiguration.getApiKey() != null) {
headerParams.put(HEADER_API_KEY, signatureConfiguration.getApiKey());
- };
- authentications.put(BINANCE_API_KEY_ONLY, binanceApiKeyOnly);
- }
+ }
+ };
+ authentications.put(BINANCE_API_KEY_ONLY, binanceApiKeyOnly);
}
private void init() {
@@ -250,13 +255,15 @@ public void setJson(Gson json) {
public Interceptor getCustomHeadersInterceptor(Map customHeaders) {
return chain -> {
-
Request request = chain.request();
Request.Builder newBuilder = request.newBuilder();
for (String headerName : customHeaders.keySet()) {
String headerValue = customHeaders.get(headerName);
if (!validateHeader(headerName, headerValue)) {
- throw new ApiException("Invalid header " + headerName + ", it is forbidden or invalid (contains CR/LF)");
+ throw new ApiException(
+ "Invalid header "
+ + headerName
+ + ", it is forbidden or invalid (contains CR/LF)");
}
newBuilder.addHeader(headerName, headerValue);
@@ -1413,9 +1420,22 @@ public Request buildRequest(
List updatedQueryParams = new ArrayList<>(queryParams);
+ boolean hasAuth =
+ Arrays.stream(authNames)
+ .anyMatch(
+ s -> s.equals(BINANCE_SIGNATURE) || s.equals(BINANCE_API_KEY_ONLY));
+
+ // add api key to every request
+ String[] finalAuthNames;
+ if (!hasAuth) {
+ finalAuthNames = append(authNames, BINANCE_API_KEY_ONLY);
+ } else {
+ finalAuthNames = authNames;
+ }
+
// update parameters with authentication settings
updateParamsForAuth(
- authNames,
+ finalAuthNames,
updatedQueryParams,
headerParams,
cookieParams,
@@ -1862,4 +1882,13 @@ private Boolean validateHeader(String name, String value) {
return !value.contains("\n") && !value.contains("\t");
}
+
+ private String[] append(String[] array, String value) {
+ if (array == null) {
+ return new String[] {value};
+ }
+ String[] newArray = Arrays.copyOf(array, array.length + 1);
+ newArray[newArray.length - 1] = value;
+ return newArray;
+ }
}
diff --git a/clients/common/src/main/java/com/binance/connector/client/common/configuration/ClientConfiguration.java b/clients/common/src/main/java/com/binance/connector/client/common/configuration/ClientConfiguration.java
index 8d3ca283..56a111b7 100644
--- a/clients/common/src/main/java/com/binance/connector/client/common/configuration/ClientConfiguration.java
+++ b/clients/common/src/main/java/com/binance/connector/client/common/configuration/ClientConfiguration.java
@@ -3,7 +3,6 @@
import com.binance.connector.client.common.dtos.TimeUnit;
import java.net.Proxy;
import java.util.Map;
-
import okhttp3.Authenticator;
import okhttp3.CertificatePinner;
diff --git a/clients/common/src/main/java/com/binance/connector/client/common/websocket/adapter/ConnectionInterface.java b/clients/common/src/main/java/com/binance/connector/client/common/websocket/adapter/ConnectionInterface.java
index a987cdfc..1fd08a00 100644
--- a/clients/common/src/main/java/com/binance/connector/client/common/websocket/adapter/ConnectionInterface.java
+++ b/clients/common/src/main/java/com/binance/connector/client/common/websocket/adapter/ConnectionInterface.java
@@ -2,12 +2,15 @@
import com.binance.connector.client.common.websocket.dtos.ApiRequestWrapperDTO;
import com.binance.connector.client.common.websocket.dtos.RequestWrapperDTO;
+import java.util.concurrent.BlockingQueue;
public interface ConnectionInterface {
void connect();
void send(ApiRequestWrapperDTO request) throws InterruptedException;
+ BlockingQueue sendForStream(ApiRequestWrapperDTO request) throws InterruptedException;
+
void send(RequestWrapperDTO request) throws InterruptedException;
void setUserAgent(String userAgent);
diff --git a/clients/common/src/main/java/com/binance/connector/client/common/websocket/adapter/ConnectionWrapper.java b/clients/common/src/main/java/com/binance/connector/client/common/websocket/adapter/ConnectionWrapper.java
index 911b2b1f..4c745656 100644
--- a/clients/common/src/main/java/com/binance/connector/client/common/websocket/adapter/ConnectionWrapper.java
+++ b/clients/common/src/main/java/com/binance/connector/client/common/websocket/adapter/ConnectionWrapper.java
@@ -28,6 +28,7 @@
import java.nio.channels.ClosedChannelException;
import java.text.DecimalFormat;
import java.time.Duration;
+import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.HashMap;
@@ -36,8 +37,10 @@
import java.util.Timer;
import java.util.TimerTask;
import java.util.UUID;
+import java.util.concurrent.BlockingQueue;
import java.util.concurrent.CompletableFuture;
import java.util.concurrent.CountDownLatch;
+import java.util.concurrent.LinkedBlockingDeque;
import java.util.concurrent.TimeUnit;
import java.util.function.Consumer;
import java.util.logging.Level;
@@ -87,6 +90,8 @@ public class ConnectionWrapper implements WebSocketListener, ConnectionInterface
private boolean pendingReconnect = false;
+ private List> streamQueues = new ArrayList<>();
+
public ConnectionWrapper(WebSocketClientConfiguration configuration, Gson gson) {
this(configuration, null, gson);
}
@@ -349,6 +354,15 @@ public void send(ApiRequestWrapperDTO request) {
innerSend(request);
}
+ @Override
+ public BlockingQueue sendForStream(ApiRequestWrapperDTO request)
+ throws InterruptedException {
+ LinkedBlockingDeque streamQueue = new LinkedBlockingDeque<>();
+ streamQueues.add(streamQueue);
+ send(request);
+ return streamQueue;
+ }
+
public void innerSend(RequestWrapperDTO requestWrapperDTO) {
send(requestWrapperDTO);
}
@@ -431,12 +445,18 @@ public void onWebSocketText(String message) {
JsonObject obj = root.getAsJsonObject();
JsonElement idElem = obj.get("id");
String id = idElem == null ? null : idElem.getAsString();
+ RequestWrapperDTO requestWrapperDTO = null;
+ if (id != null) {
+ requestWrapperDTO = pendingRequest.get(id);
+ }
- if (id == null) {
+ if (requestWrapperDTO == null) {
+ for (BlockingQueue streamQueue : streamQueues) {
+ JsonElement eventElem = obj.get("event");
+ streamQueue.offer(eventElem != null ? eventElem.toString() : message);
+ }
return;
}
-
- RequestWrapperDTO requestWrapperDTO = pendingRequest.get(id);
Type responseType = requestWrapperDTO.getResponseType();
Object responseResult = gson.fromJson(root, responseType);
diff --git a/clients/common/src/main/java/com/binance/connector/client/common/websocket/adapter/PoolConnectionWrapper.java b/clients/common/src/main/java/com/binance/connector/client/common/websocket/adapter/PoolConnectionWrapper.java
index e81cdc66..250e7ece 100644
--- a/clients/common/src/main/java/com/binance/connector/client/common/websocket/adapter/PoolConnectionWrapper.java
+++ b/clients/common/src/main/java/com/binance/connector/client/common/websocket/adapter/PoolConnectionWrapper.java
@@ -9,6 +9,7 @@
import java.util.ListIterator;
import java.util.Timer;
import java.util.TimerTask;
+import java.util.concurrent.BlockingQueue;
public class PoolConnectionWrapper implements ConnectionInterface {
private final LinkedList connectionList = new LinkedList<>();
@@ -86,6 +87,12 @@ public void send(RequestWrapperDTO request) throws InterruptedException {
getConnection().send(request);
}
+ @Override
+ public BlockingQueue sendForStream(ApiRequestWrapperDTO request)
+ throws InterruptedException {
+ return getConnection().sendForStream(request);
+ }
+
/**
* @return the next connection from the pool, using round-robin
*/
diff --git a/clients/common/src/main/java/com/binance/connector/client/common/websocket/dtos/StreamResponse.java b/clients/common/src/main/java/com/binance/connector/client/common/websocket/dtos/StreamResponse.java
new file mode 100644
index 00000000..0458d323
--- /dev/null
+++ b/clients/common/src/main/java/com/binance/connector/client/common/websocket/dtos/StreamResponse.java
@@ -0,0 +1,22 @@
+package com.binance.connector.client.common.websocket.dtos;
+
+import com.binance.connector.client.common.websocket.service.StreamBlockingQueueWrapper;
+import java.util.concurrent.CompletableFuture;
+
+public class StreamResponse {
+ private final CompletableFuture response;
+ private final StreamBlockingQueueWrapper stream;
+
+ public StreamResponse(CompletableFuture response, StreamBlockingQueueWrapper stream) {
+ this.response = response;
+ this.stream = stream;
+ }
+
+ public CompletableFuture getResponse() {
+ return response;
+ }
+
+ public StreamBlockingQueueWrapper getStream() {
+ return stream;
+ }
+}
diff --git a/clients/common/src/main/java/com/binance/connector/client/common/websocket/service/StreamBlockingQueue.java b/clients/common/src/main/java/com/binance/connector/client/common/websocket/service/StreamBlockingQueue.java
index 5783c8b6..99ac1851 100644
--- a/clients/common/src/main/java/com/binance/connector/client/common/websocket/service/StreamBlockingQueue.java
+++ b/clients/common/src/main/java/com/binance/connector/client/common/websocket/service/StreamBlockingQueue.java
@@ -11,6 +11,10 @@ public class StreamBlockingQueue implements BlockingQueue {
private final BlockingQueue innerQueue;
private final String operationId;
+ public StreamBlockingQueue(BlockingQueue innerQueue) {
+ this(innerQueue, "");
+ }
+
public StreamBlockingQueue(BlockingQueue innerQueue, String operationId) {
this.innerQueue = innerQueue;
this.operationId = operationId;
diff --git a/clients/common/src/main/java/com/binance/connector/client/common/websocket/service/StreamBlockingQueueWrapper.java b/clients/common/src/main/java/com/binance/connector/client/common/websocket/service/StreamBlockingQueueWrapper.java
index bf8e763d..80ba3584 100644
--- a/clients/common/src/main/java/com/binance/connector/client/common/websocket/service/StreamBlockingQueueWrapper.java
+++ b/clients/common/src/main/java/com/binance/connector/client/common/websocket/service/StreamBlockingQueueWrapper.java
@@ -1,15 +1,23 @@
package com.binance.connector.client.common.websocket.service;
import com.binance.connector.client.common.JSON;
+import com.google.gson.Gson;
import com.google.gson.reflect.TypeToken;
public class StreamBlockingQueueWrapper {
private final StreamBlockingQueue innerQueue;
private final TypeToken convertType;
+ private final Gson gson;
public StreamBlockingQueueWrapper(StreamBlockingQueue innerQueue, TypeToken type) {
+ this(innerQueue, type, JSON.getGson());
+ }
+
+ public StreamBlockingQueueWrapper(
+ StreamBlockingQueue innerQueue, TypeToken type, Gson gson) {
this.innerQueue = innerQueue;
this.convertType = type;
+ this.gson = gson;
}
public StreamBlockingQueue getInnerQueue() {
@@ -18,6 +26,6 @@ public StreamBlockingQueue getInnerQueue() {
public T take() throws InterruptedException {
String take = innerQueue.take();
- return JSON.getGson().fromJson(take, convertType);
+ return gson.fromJson(take, convertType);
}
}
diff --git a/clients/derivatives-trading-coin-futures/CHANGELOG.md b/clients/derivatives-trading-coin-futures/CHANGELOG.md
index a46d22b6..214b4218 100644
--- a/clients/derivatives-trading-coin-futures/CHANGELOG.md
+++ b/clients/derivatives-trading-coin-futures/CHANGELOG.md
@@ -1,5 +1,15 @@
# Changelog
+## 2.0.0 - 2025-07-16
+
+### Added (1)
+
+- Support User Data Streams.
+
+### Changed (1)
+
+- Update `binance/common` module to version `1.4.0`.
+
## 1.3.0 - 2025-07-08
- Update `binance/common` module to version `1.3.0`.
diff --git a/clients/derivatives-trading-coin-futures/docs/AccountConfigUpdate.md b/clients/derivatives-trading-coin-futures/docs/AccountConfigUpdate.md
new file mode 100644
index 00000000..5de8d459
--- /dev/null
+++ b/clients/derivatives-trading-coin-futures/docs/AccountConfigUpdate.md
@@ -0,0 +1,15 @@
+
+
+# AccountConfigUpdate
+
+
+## Properties
+
+| Name | Type | Description | Notes |
+|------------ | ------------- | ------------- | -------------|
+|**E** | **Long** | | [optional] |
+|**T** | **Long** | | [optional] |
+|**ac** | [**AccountConfigUpdateAc**](AccountConfigUpdateAc.md) | | [optional] |
+
+
+
diff --git a/clients/derivatives-trading-coin-futures/docs/AccountConfigUpdateAc.md b/clients/derivatives-trading-coin-futures/docs/AccountConfigUpdateAc.md
new file mode 100644
index 00000000..c1ad4a50
--- /dev/null
+++ b/clients/derivatives-trading-coin-futures/docs/AccountConfigUpdateAc.md
@@ -0,0 +1,14 @@
+
+
+# AccountConfigUpdateAc
+
+
+## Properties
+
+| Name | Type | Description | Notes |
+|------------ | ------------- | ------------- | -------------|
+|**sLowerCase** | **String** | | [optional] |
+|**lLowerCase** | **Long** | | [optional] |
+
+
+
diff --git a/clients/derivatives-trading-coin-futures/docs/AccountUpdate.md b/clients/derivatives-trading-coin-futures/docs/AccountUpdate.md
new file mode 100644
index 00000000..53b53487
--- /dev/null
+++ b/clients/derivatives-trading-coin-futures/docs/AccountUpdate.md
@@ -0,0 +1,16 @@
+
+
+# AccountUpdate
+
+
+## Properties
+
+| Name | Type | Description | Notes |
+|------------ | ------------- | ------------- | -------------|
+|**E** | **Long** | | [optional] |
+|**T** | **Long** | | [optional] |
+|**iLowerCase** | **String** | | [optional] |
+|**aLowerCase** | [**AccountUpdateA**](AccountUpdateA.md) | | [optional] |
+
+
+
diff --git a/clients/derivatives-trading-coin-futures/docs/AccountUpdateA.md b/clients/derivatives-trading-coin-futures/docs/AccountUpdateA.md
new file mode 100644
index 00000000..b3859d2e
--- /dev/null
+++ b/clients/derivatives-trading-coin-futures/docs/AccountUpdateA.md
@@ -0,0 +1,15 @@
+
+
+# AccountUpdateA
+
+
+## Properties
+
+| Name | Type | Description | Notes |
+|------------ | ------------- | ------------- | -------------|
+|**mLowerCase** | **String** | | [optional] |
+|**B** | [**List<AccountUpdateABInner>**](AccountUpdateABInner.md) | | [optional] |
+|**P** | [**List<AccountUpdateAPInner>**](AccountUpdateAPInner.md) | | [optional] |
+
+
+
diff --git a/clients/derivatives-trading-coin-futures/docs/AccountUpdateABInner.md b/clients/derivatives-trading-coin-futures/docs/AccountUpdateABInner.md
new file mode 100644
index 00000000..3380c37b
--- /dev/null
+++ b/clients/derivatives-trading-coin-futures/docs/AccountUpdateABInner.md
@@ -0,0 +1,16 @@
+
+
+# AccountUpdateABInner
+
+
+## Properties
+
+| Name | Type | Description | Notes |
+|------------ | ------------- | ------------- | -------------|
+|**aLowerCase** | **String** | | [optional] |
+|**wb** | **String** | | [optional] |
+|**cw** | **String** | | [optional] |
+|**bc** | **String** | | [optional] |
+
+
+
diff --git a/clients/derivatives-trading-coin-futures/docs/AccountUpdateAPInner.md b/clients/derivatives-trading-coin-futures/docs/AccountUpdateAPInner.md
new file mode 100644
index 00000000..2621e1c3
--- /dev/null
+++ b/clients/derivatives-trading-coin-futures/docs/AccountUpdateAPInner.md
@@ -0,0 +1,21 @@
+
+
+# AccountUpdateAPInner
+
+
+## Properties
+
+| Name | Type | Description | Notes |
+|------------ | ------------- | ------------- | -------------|
+|**sLowerCase** | **String** | | [optional] |
+|**pa** | **String** | | [optional] |
+|**ep** | **String** | | [optional] |
+|**bep** | **String** | | [optional] |
+|**cr** | **String** | | [optional] |
+|**up** | **String** | | [optional] |
+|**mt** | **String** | | [optional] |
+|**iw** | **String** | | [optional] |
+|**ps** | **String** | | [optional] |
+
+
+
diff --git a/clients/derivatives-trading-coin-futures/docs/GridUpdate.md b/clients/derivatives-trading-coin-futures/docs/GridUpdate.md
new file mode 100644
index 00000000..6ef473ae
--- /dev/null
+++ b/clients/derivatives-trading-coin-futures/docs/GridUpdate.md
@@ -0,0 +1,15 @@
+
+
+# GridUpdate
+
+
+## Properties
+
+| Name | Type | Description | Notes |
+|------------ | ------------- | ------------- | -------------|
+|**T** | **Long** | | [optional] |
+|**E** | **Long** | | [optional] |
+|**gu** | [**GridUpdateGu**](GridUpdateGu.md) | | [optional] |
+
+
+
diff --git a/clients/derivatives-trading-coin-futures/docs/GridUpdateGu.md b/clients/derivatives-trading-coin-futures/docs/GridUpdateGu.md
new file mode 100644
index 00000000..350ff7bb
--- /dev/null
+++ b/clients/derivatives-trading-coin-futures/docs/GridUpdateGu.md
@@ -0,0 +1,22 @@
+
+
+# GridUpdateGu
+
+
+## Properties
+
+| Name | Type | Description | Notes |
+|------------ | ------------- | ------------- | -------------|
+|**si** | **Long** | | [optional] |
+|**st** | **String** | | [optional] |
+|**ss** | **String** | | [optional] |
+|**sLowerCase** | **String** | | [optional] |
+|**rLowerCase** | **String** | | [optional] |
+|**up** | **String** | | [optional] |
+|**uq** | **String** | | [optional] |
+|**uf** | **String** | | [optional] |
+|**mp** | **String** | | [optional] |
+|**ut** | **Long** | | [optional] |
+
+
+
diff --git a/clients/derivatives-trading-coin-futures/docs/Listenkeyexpired.md b/clients/derivatives-trading-coin-futures/docs/Listenkeyexpired.md
new file mode 100644
index 00000000..26089b05
--- /dev/null
+++ b/clients/derivatives-trading-coin-futures/docs/Listenkeyexpired.md
@@ -0,0 +1,14 @@
+
+
+# Listenkeyexpired
+
+
+## Properties
+
+| Name | Type | Description | Notes |
+|------------ | ------------- | ------------- | -------------|
+|**E** | **Long** | | [optional] |
+|**listenKey** | **String** | | [optional] |
+
+
+
diff --git a/clients/derivatives-trading-coin-futures/docs/MarginCall.md b/clients/derivatives-trading-coin-futures/docs/MarginCall.md
new file mode 100644
index 00000000..3028d1cd
--- /dev/null
+++ b/clients/derivatives-trading-coin-futures/docs/MarginCall.md
@@ -0,0 +1,16 @@
+
+
+# MarginCall
+
+
+## Properties
+
+| Name | Type | Description | Notes |
+|------------ | ------------- | ------------- | -------------|
+|**E** | **Long** | | [optional] |
+|**iLowerCase** | **String** | | [optional] |
+|**cw** | **String** | | [optional] |
+|**pLowerCase** | [**List<MarginCallPInner>**](MarginCallPInner.md) | | [optional] |
+
+
+
diff --git a/clients/derivatives-trading-coin-futures/docs/MarginCallPInner.md b/clients/derivatives-trading-coin-futures/docs/MarginCallPInner.md
new file mode 100644
index 00000000..0cdf73fb
--- /dev/null
+++ b/clients/derivatives-trading-coin-futures/docs/MarginCallPInner.md
@@ -0,0 +1,20 @@
+
+
+# MarginCallPInner
+
+
+## Properties
+
+| Name | Type | Description | Notes |
+|------------ | ------------- | ------------- | -------------|
+|**sLowerCase** | **String** | | [optional] |
+|**ps** | **String** | | [optional] |
+|**pa** | **String** | | [optional] |
+|**mt** | **String** | | [optional] |
+|**iw** | **String** | | [optional] |
+|**mp** | **String** | | [optional] |
+|**up** | **String** | | [optional] |
+|**mm** | **String** | | [optional] |
+
+
+
diff --git a/clients/derivatives-trading-coin-futures/docs/MarketDataApi.md b/clients/derivatives-trading-coin-futures/docs/MarketDataApi.md
index 7004b46c..147776d1 100644
--- a/clients/derivatives-trading-coin-futures/docs/MarketDataApi.md
+++ b/clients/derivatives-trading-coin-futures/docs/MarketDataApi.md
@@ -1172,7 +1172,7 @@ No authorization required
Query Index Price Constituents
-Query index price constituents Weight: 2
+Query index price constituents Weight: 1
### Example
```java
diff --git a/clients/derivatives-trading-coin-futures/docs/OrderTradeUpdate.md b/clients/derivatives-trading-coin-futures/docs/OrderTradeUpdate.md
new file mode 100644
index 00000000..f1101383
--- /dev/null
+++ b/clients/derivatives-trading-coin-futures/docs/OrderTradeUpdate.md
@@ -0,0 +1,16 @@
+
+
+# OrderTradeUpdate
+
+
+## Properties
+
+| Name | Type | Description | Notes |
+|------------ | ------------- | ------------- | -------------|
+|**E** | **Long** | | [optional] |
+|**T** | **Long** | | [optional] |
+|**iLowerCase** | **String** | | [optional] |
+|**oLowerCase** | [**OrderTradeUpdateO**](OrderTradeUpdateO.md) | | [optional] |
+
+
+
diff --git a/clients/derivatives-trading-coin-futures/docs/OrderTradeUpdateO.md b/clients/derivatives-trading-coin-futures/docs/OrderTradeUpdateO.md
new file mode 100644
index 00000000..b1bb5820
--- /dev/null
+++ b/clients/derivatives-trading-coin-futures/docs/OrderTradeUpdateO.md
@@ -0,0 +1,46 @@
+
+
+# OrderTradeUpdateO
+
+
+## Properties
+
+| Name | Type | Description | Notes |
+|------------ | ------------- | ------------- | -------------|
+|**sLowerCase** | **String** | | [optional] |
+|**cLowerCase** | **String** | | [optional] |
+|**S** | **String** | | [optional] |
+|**oLowerCase** | **String** | | [optional] |
+|**fLowerCase** | **String** | | [optional] |
+|**qLowerCase** | **String** | | [optional] |
+|**pLowerCase** | **String** | | [optional] |
+|**ap** | **String** | | [optional] |
+|**sp** | **String** | | [optional] |
+|**xLowerCase** | **String** | | [optional] |
+|**X** | **String** | | [optional] |
+|**iLowerCase** | **Long** | | [optional] |
+|**lLowerCase** | **String** | | [optional] |
+|**zLowerCase** | **String** | | [optional] |
+|**L** | **String** | | [optional] |
+|**ma** | **String** | | [optional] |
+|**N** | **String** | | [optional] |
+|**nLowerCase** | **String** | | [optional] |
+|**T** | **Long** | | [optional] |
+|**tLowerCase** | **Long** | | [optional] |
+|**rp** | **String** | | [optional] |
+|**bLowerCase** | **String** | | [optional] |
+|**aLowerCase** | **String** | | [optional] |
+|**mLowerCase** | **Boolean** | | [optional] |
+|**R** | **Boolean** | | [optional] |
+|**wt** | **String** | | [optional] |
+|**ot** | **String** | | [optional] |
+|**ps** | **String** | | [optional] |
+|**cp** | **Boolean** | | [optional] |
+|**AP** | **String** | | [optional] |
+|**cr** | **String** | | [optional] |
+|**pP** | **Boolean** | | [optional] |
+|**V** | **String** | | [optional] |
+|**pm** | **String** | | [optional] |
+
+
+
diff --git a/clients/derivatives-trading-coin-futures/docs/StrategyUpdate.md b/clients/derivatives-trading-coin-futures/docs/StrategyUpdate.md
new file mode 100644
index 00000000..cf642fdf
--- /dev/null
+++ b/clients/derivatives-trading-coin-futures/docs/StrategyUpdate.md
@@ -0,0 +1,15 @@
+
+
+# StrategyUpdate
+
+
+## Properties
+
+| Name | Type | Description | Notes |
+|------------ | ------------- | ------------- | -------------|
+|**T** | **Long** | | [optional] |
+|**E** | **Long** | | [optional] |
+|**su** | [**StrategyUpdateSu**](StrategyUpdateSu.md) | | [optional] |
+
+
+
diff --git a/clients/derivatives-trading-coin-futures/docs/StrategyUpdateSu.md b/clients/derivatives-trading-coin-futures/docs/StrategyUpdateSu.md
new file mode 100644
index 00000000..e9329247
--- /dev/null
+++ b/clients/derivatives-trading-coin-futures/docs/StrategyUpdateSu.md
@@ -0,0 +1,18 @@
+
+
+# StrategyUpdateSu
+
+
+## Properties
+
+| Name | Type | Description | Notes |
+|------------ | ------------- | ------------- | -------------|
+|**si** | **Long** | | [optional] |
+|**st** | **String** | | [optional] |
+|**ss** | **String** | | [optional] |
+|**sLowerCase** | **String** | | [optional] |
+|**ut** | **Long** | | [optional] |
+|**cLowerCase** | **Long** | | [optional] |
+
+
+
diff --git a/clients/derivatives-trading-coin-futures/docs/UserDataStreamEventsResponse.md b/clients/derivatives-trading-coin-futures/docs/UserDataStreamEventsResponse.md
new file mode 100644
index 00000000..ec113358
--- /dev/null
+++ b/clients/derivatives-trading-coin-futures/docs/UserDataStreamEventsResponse.md
@@ -0,0 +1,23 @@
+
+
+# UserDataStreamEventsResponse
+
+
+## Properties
+
+| Name | Type | Description | Notes |
+|------------ | ------------- | ------------- | -------------|
+|**E** | **Long** | | [optional] |
+|**T** | **Long** | | [optional] |
+|**ac** | [**AccountConfigUpdateAc**](AccountConfigUpdateAc.md) | | [optional] |
+|**iLowerCase** | **String** | | [optional] |
+|**aLowerCase** | [**AccountUpdateA**](AccountUpdateA.md) | | [optional] |
+|**gu** | [**GridUpdateGu**](GridUpdateGu.md) | | [optional] |
+|**cw** | **String** | | [optional] |
+|**pLowerCase** | [**List<MarginCallPInner>**](MarginCallPInner.md) | | [optional] |
+|**oLowerCase** | [**OrderTradeUpdateO**](OrderTradeUpdateO.md) | | [optional] |
+|**su** | [**StrategyUpdateSu**](StrategyUpdateSu.md) | | [optional] |
+|**listenKey** | **String** | | [optional] |
+
+
+
diff --git a/clients/derivatives-trading-coin-futures/example_websocket_api.md b/clients/derivatives-trading-coin-futures/example_websocket_api.md
index 38965e7d..738333e1 100644
--- a/clients/derivatives-trading-coin-futures/example_websocket_api.md
+++ b/clients/derivatives-trading-coin-futures/example_websocket_api.md
@@ -1,26 +1,26 @@
## Account
-[account.status](https://developers.binance.com/docs/derivatives/coin-margined-futures/account/websocket-api/Account-Information) - accountInformation - [AccountInformationExample.java:47](/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/account/AccountInformationExample.java#L47)
+[account.status](https://developers.binance.com/docs/derivatives/coin-margined-futures/account/websocket-api/Account-Information) - accountInformation - [AccountInformationExample.java:49](/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/account/AccountInformationExample.java#L49)
-[account.balance](https://developers.binance.com/docs/derivatives/coin-margined-futures/account/websocket-api/Futures-Account-Balance) - futuresAccountBalance - [FuturesAccountBalanceExample.java:46](/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/account/FuturesAccountBalanceExample.java#L46)
+[account.balance](https://developers.binance.com/docs/derivatives/coin-margined-futures/account/websocket-api/Futures-Account-Balance) - futuresAccountBalance - [FuturesAccountBalanceExample.java:48](/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/account/FuturesAccountBalanceExample.java#L48)
## Trade
-[order.cancel](https://developers.binance.com/docs/derivatives/coin-margined-futures/trade/websocket-api/Cancel-Order) - cancelOrder - [CancelOrderExample.java:47](/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/trade/CancelOrderExample.java#L47)
+[order.cancel](https://developers.binance.com/docs/derivatives/coin-margined-futures/trade/websocket-api/Cancel-Order) - cancelOrder - [CancelOrderExample.java:49](/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/trade/CancelOrderExample.java#L49)
-[order.modify](https://developers.binance.com/docs/derivatives/coin-margined-futures/trade/websocket-api/Modify-Order) - modifyOrder - [ModifyOrderExample.java:58](/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/trade/ModifyOrderExample.java#L58)
+[order.modify](https://developers.binance.com/docs/derivatives/coin-margined-futures/trade/websocket-api/Modify-Order) - modifyOrder - [ModifyOrderExample.java:60](/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/trade/ModifyOrderExample.java#L60)
-[order.place](https://developers.binance.com/docs/derivatives/coin-margined-futures/trade/websocket-api/New-Order) - newOrder - [NewOrderExample.java:78](/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/trade/NewOrderExample.java#L78)
+[order.place](https://developers.binance.com/docs/derivatives/coin-margined-futures/trade/websocket-api/New-Order) - newOrder - [NewOrderExample.java:80](/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/trade/NewOrderExample.java#L80)
-[account.position](https://developers.binance.com/docs/derivatives/coin-margined-futures/trade/websocket-api/Position-Information) - positionInformation - [PositionInformationExample.java:47](/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/trade/PositionInformationExample.java#L47)
+[account.position](https://developers.binance.com/docs/derivatives/coin-margined-futures/trade/websocket-api/Position-Information) - positionInformation - [PositionInformationExample.java:49](/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/trade/PositionInformationExample.java#L49)
-[order.status](https://developers.binance.com/docs/derivatives/coin-margined-futures/trade/websocket-api/Query-Order) - queryOrder - [QueryOrderExample.java:50](/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/trade/QueryOrderExample.java#L50)
+[order.status](https://developers.binance.com/docs/derivatives/coin-margined-futures/trade/websocket-api/Query-Order) - queryOrder - [QueryOrderExample.java:52](/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/trade/QueryOrderExample.java#L52)
## UserDataStreams
-[userDataStream.stop](https://developers.binance.com/docs/derivatives/coin-margined-futures/user-data-streams/Close-User-Data-Stream-Wsp) - closeUserDataStream - [CloseUserDataStreamExample.java:46](/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/userdatastreams/CloseUserDataStreamExample.java#L46)
+[userDataStream.stop](https://developers.binance.com/docs/derivatives/coin-margined-futures/user-data-streams/Close-User-Data-Stream-Wsp) - closeUserDataStream - [CloseUserDataStreamExample.java:48](/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/userdatastreams/CloseUserDataStreamExample.java#L48)
-[userDataStream.ping](https://developers.binance.com/docs/derivatives/coin-margined-futures/user-data-streams/Keepalive-User-Data-Stream-Wsp) - keepaliveUserDataStream - [KeepaliveUserDataStreamExample.java:47](/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/userdatastreams/KeepaliveUserDataStreamExample.java#L47)
+[userDataStream.ping](https://developers.binance.com/docs/derivatives/coin-margined-futures/user-data-streams/Keepalive-User-Data-Stream-Wsp) - keepaliveUserDataStream - [KeepaliveUserDataStreamExample.java:49](/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/userdatastreams/KeepaliveUserDataStreamExample.java#L49)
-[userDataStream.start](https://developers.binance.com/docs/derivatives/coin-margined-futures/user-data-streams/Start-User-Data-Stream-Wsp) - startUserDataStream - [StartUserDataStreamExample.java:48](/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/userdatastreams/StartUserDataStreamExample.java#L48)
+[userDataStream.start](https://developers.binance.com/docs/derivatives/coin-margined-futures/user-data-streams/Start-User-Data-Stream-Wsp) - startUserDataStream - [StartUserDataStreamExample.java:50](/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/userdatastreams/StartUserDataStreamExample.java#L50)
diff --git a/clients/derivatives-trading-coin-futures/pom.xml b/clients/derivatives-trading-coin-futures/pom.xml
index af41e096..a60bbb96 100644
--- a/clients/derivatives-trading-coin-futures/pom.xml
+++ b/clients/derivatives-trading-coin-futures/pom.xml
@@ -5,7 +5,7 @@
4.0.0
binance-derivatives-trading-coin-futures
derivatives-trading-coin-futures
- 1.3.0
+ 2.0.0
jar
@@ -31,7 +31,7 @@
io.github.binance
binance-common
- 1.3.0
+ 1.4.0
\ No newline at end of file
diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/api/AccountApi.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/api/AccountApi.java
index c88a1cae..684062a7 100644
--- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/api/AccountApi.java
+++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/api/AccountApi.java
@@ -54,7 +54,7 @@ public class AccountApi {
private static final String USER_AGENT =
String.format(
- "binance-derivatives-trading-coin-futures/1.3.0 (Java/%s; %s; %s)",
+ "binance-derivatives-trading-coin-futures/2.0.0 (Java/%s; %s; %s)",
SystemUtil.getJavaVersion(), SystemUtil.getOs(), SystemUtil.getArch());
private static final boolean HAS_TIME_UNIT = false;
diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/api/DerivativesTradingCoinFuturesRestApi.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/api/DerivativesTradingCoinFuturesRestApi.java
index 0e21723a..1f6c52e6 100644
--- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/api/DerivativesTradingCoinFuturesRestApi.java
+++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/api/DerivativesTradingCoinFuturesRestApi.java
@@ -988,7 +988,7 @@ public ApiResponse premiumIndexKlineData(
}
/**
- * Query Index Price Constituents Query index price constituents Weight: 2
+ * Query Index Price Constituents Query index price constituents Weight: 1
*
* @param symbol (required)
* @return ApiResponse<QueryIndexPriceConstituentsResponse>
diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/api/MarketDataApi.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/api/MarketDataApi.java
index 9961e2f2..8abb4359 100644
--- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/api/MarketDataApi.java
+++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/api/MarketDataApi.java
@@ -69,7 +69,7 @@ public class MarketDataApi {
private static final String USER_AGENT =
String.format(
- "binance-derivatives-trading-coin-futures/1.3.0 (Java/%s; %s; %s)",
+ "binance-derivatives-trading-coin-futures/2.0.0 (Java/%s; %s; %s)",
SystemUtil.getJavaVersion(), SystemUtil.getOs(), SystemUtil.getArch());
private static final boolean HAS_TIME_UNIT = false;
@@ -3013,7 +3013,7 @@ private okhttp3.Call queryIndexPriceConstituentsValidateBeforeCall(String symbol
}
/**
- * Query Index Price Constituents Query index price constituents Weight: 2
+ * Query Index Price Constituents Query index price constituents Weight: 1
*
* @param symbol (required)
* @return ApiResponse<QueryIndexPriceConstituentsResponse>
diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/api/PortfolioMarginEndpointsApi.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/api/PortfolioMarginEndpointsApi.java
index 7bcc8619..1c6ebbd2 100644
--- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/api/PortfolioMarginEndpointsApi.java
+++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/api/PortfolioMarginEndpointsApi.java
@@ -42,7 +42,7 @@ public class PortfolioMarginEndpointsApi {
private static final String USER_AGENT =
String.format(
- "binance-derivatives-trading-coin-futures/1.3.0 (Java/%s; %s; %s)",
+ "binance-derivatives-trading-coin-futures/2.0.0 (Java/%s; %s; %s)",
SystemUtil.getJavaVersion(), SystemUtil.getOs(), SystemUtil.getArch());
private static final boolean HAS_TIME_UNIT = false;
diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/api/TradeApi.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/api/TradeApi.java
index aee58587..32a16742 100644
--- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/api/TradeApi.java
+++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/api/TradeApi.java
@@ -76,7 +76,7 @@ public class TradeApi {
private static final String USER_AGENT =
String.format(
- "binance-derivatives-trading-coin-futures/1.3.0 (Java/%s; %s; %s)",
+ "binance-derivatives-trading-coin-futures/2.0.0 (Java/%s; %s; %s)",
SystemUtil.getJavaVersion(), SystemUtil.getOs(), SystemUtil.getArch());
private static final boolean HAS_TIME_UNIT = false;
diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/api/UserDataStreamsApi.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/api/UserDataStreamsApi.java
index 94f80c7f..d1ea6434 100644
--- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/api/UserDataStreamsApi.java
+++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/api/UserDataStreamsApi.java
@@ -42,7 +42,7 @@ public class UserDataStreamsApi {
private static final String USER_AGENT =
String.format(
- "binance-derivatives-trading-coin-futures/1.3.0 (Java/%s; %s; %s)",
+ "binance-derivatives-trading-coin-futures/2.0.0 (Java/%s; %s; %s)",
SystemUtil.getJavaVersion(), SystemUtil.getOs(), SystemUtil.getArch());
private static final boolean HAS_TIME_UNIT = false;
diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/api/DerivativesTradingCoinFuturesWebSocketApi.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/api/DerivativesTradingCoinFuturesWebSocketApi.java
index c2aa370c..2097e5e3 100644
--- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/api/DerivativesTradingCoinFuturesWebSocketApi.java
+++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/api/DerivativesTradingCoinFuturesWebSocketApi.java
@@ -32,7 +32,7 @@
public class DerivativesTradingCoinFuturesWebSocketApi {
private static final String USER_AGENT =
String.format(
- "binance-derivatives-trading-coin-futures/1.3.0 (Java/%s; %s; %s)",
+ "binance-derivatives-trading-coin-futures/2.0.0 (Java/%s; %s; %s)",
SystemUtil.getJavaVersion(), SystemUtil.getOs(), SystemUtil.getArch());
private AccountApi accountApi;
diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/JSON.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/JSON.java
index 94938984..eb844433 100644
--- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/JSON.java
+++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/JSON.java
@@ -26,6 +26,7 @@
import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonWriter;
import io.gsonfire.GsonFireBuilder;
+import io.gsonfire.TypeSelector;
import java.io.IOException;
import java.io.StringReader;
import java.lang.reflect.Type;
@@ -37,6 +38,7 @@
import java.time.OffsetDateTime;
import java.time.format.DateTimeFormatter;
import java.util.Date;
+import java.util.HashMap;
import java.util.Map;
import okio.ByteString;
@@ -58,7 +60,106 @@ public class JSON {
@SuppressWarnings("unchecked")
public static GsonBuilder createGson() {
- GsonFireBuilder fireBuilder = new GsonFireBuilder();
+ GsonFireBuilder fireBuilder =
+ new GsonFireBuilder()
+ .registerTypeSelector(
+ com.binance.connector.client.derivatives_trading_coin_futures
+ .websocket.stream.model.UserDataStreamEventsResponse.class,
+ new TypeSelector<
+ com.binance.connector.client
+ .derivatives_trading_coin_futures.websocket.stream
+ .model.UserDataStreamEventsResponse>() {
+ @Override
+ public Class<
+ ? extends
+ com.binance.connector.client
+ .derivatives_trading_coin_futures
+ .websocket.stream.model
+ .UserDataStreamEventsResponse>
+ getClassForElement(JsonElement readElement) {
+ Map classByDiscriminatorValue =
+ new HashMap();
+ classByDiscriminatorValue.put(
+ "ACCOUNT_CONFIG_UPDATE",
+ com.binance.connector.client
+ .derivatives_trading_coin_futures.websocket
+ .stream.model.AccountConfigUpdate.class);
+ classByDiscriminatorValue.put(
+ "ACCOUNT_UPDATE",
+ com.binance.connector.client
+ .derivatives_trading_coin_futures.websocket
+ .stream.model.AccountUpdate.class);
+ classByDiscriminatorValue.put(
+ "GRID_UPDATE",
+ com.binance.connector.client
+ .derivatives_trading_coin_futures.websocket
+ .stream.model.GridUpdate.class);
+ classByDiscriminatorValue.put(
+ "MARGIN_CALL",
+ com.binance.connector.client
+ .derivatives_trading_coin_futures.websocket
+ .stream.model.MarginCall.class);
+ classByDiscriminatorValue.put(
+ "ORDER_TRADE_UPDATE",
+ com.binance.connector.client
+ .derivatives_trading_coin_futures.websocket
+ .stream.model.OrderTradeUpdate.class);
+ classByDiscriminatorValue.put(
+ "STRATEGY_UPDATE",
+ com.binance.connector.client
+ .derivatives_trading_coin_futures.websocket
+ .stream.model.StrategyUpdate.class);
+ classByDiscriminatorValue.put(
+ "listenKeyExpired",
+ com.binance.connector.client
+ .derivatives_trading_coin_futures.websocket
+ .stream.model.Listenkeyexpired.class);
+ classByDiscriminatorValue.put(
+ "accountConfigUpdate",
+ com.binance.connector.client
+ .derivatives_trading_coin_futures.websocket
+ .stream.model.AccountConfigUpdate.class);
+ classByDiscriminatorValue.put(
+ "accountUpdate",
+ com.binance.connector.client
+ .derivatives_trading_coin_futures.websocket
+ .stream.model.AccountUpdate.class);
+ classByDiscriminatorValue.put(
+ "gridUpdate",
+ com.binance.connector.client
+ .derivatives_trading_coin_futures.websocket
+ .stream.model.GridUpdate.class);
+ classByDiscriminatorValue.put(
+ "listenkeyexpired",
+ com.binance.connector.client
+ .derivatives_trading_coin_futures.websocket
+ .stream.model.Listenkeyexpired.class);
+ classByDiscriminatorValue.put(
+ "marginCall",
+ com.binance.connector.client
+ .derivatives_trading_coin_futures.websocket
+ .stream.model.MarginCall.class);
+ classByDiscriminatorValue.put(
+ "orderTradeUpdate",
+ com.binance.connector.client
+ .derivatives_trading_coin_futures.websocket
+ .stream.model.OrderTradeUpdate.class);
+ classByDiscriminatorValue.put(
+ "strategyUpdate",
+ com.binance.connector.client
+ .derivatives_trading_coin_futures.websocket
+ .stream.model.StrategyUpdate.class);
+ classByDiscriminatorValue.put(
+ "UserDataStreamEventsResponse",
+ com.binance.connector.client
+ .derivatives_trading_coin_futures.websocket
+ .stream.model.UserDataStreamEventsResponse
+ .class);
+ return getClassByDiscriminator(
+ classByDiscriminatorValue,
+ getDiscriminatorValue(readElement, "e"));
+ }
+ });
GsonBuilder builder = fireBuilder.createGsonBuilder();
return builder;
}
@@ -108,6 +209,24 @@ private static Class getClassByDiscriminator(
gsonBuilder.registerTypeAdapter(OffsetDateTime.class, offsetDateTimeTypeAdapter);
gsonBuilder.registerTypeAdapter(LocalDate.class, localDateTypeAdapter);
gsonBuilder.registerTypeAdapter(byte[].class, byteArrayAdapter);
+ gsonBuilder.registerTypeAdapterFactory(
+ new com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream
+ .model.AccountConfigUpdate.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(
+ new com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream
+ .model.AccountConfigUpdateAc.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(
+ new com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream
+ .model.AccountUpdate.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(
+ new com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream
+ .model.AccountUpdateA.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(
+ new com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream
+ .model.AccountUpdateABInner.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(
+ new com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream
+ .model.AccountUpdateAPInner.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(
new com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream
.model.AggregateTradeStreamsRequest.CustomTypeAdapterFactory());
@@ -181,6 +300,12 @@ private static Class getClassByDiscriminator(
gsonBuilder.registerTypeAdapterFactory(
new com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream
.model.DiffBookDepthStreamsResponseBItem.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(
+ new com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream
+ .model.GridUpdate.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(
+ new com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream
+ .model.GridUpdateGu.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(
new com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream
.model.IndexKlineCandlestickStreamsRequest.CustomTypeAdapterFactory());
@@ -230,6 +355,15 @@ private static Class getClassByDiscriminator(
gsonBuilder.registerTypeAdapterFactory(
new com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream
.model.LiquidationOrderStreamsResponse.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(
+ new com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream
+ .model.Listenkeyexpired.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(
+ new com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream
+ .model.MarginCall.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(
+ new com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream
+ .model.MarginCallPInner.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(
new com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream
.model.MarkPriceKlineCandlestickStreamsRequest.CustomTypeAdapterFactory());
@@ -256,6 +390,12 @@ private static Class getClassByDiscriminator(
gsonBuilder.registerTypeAdapterFactory(
new com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream
.model.MarkPriceStreamResponse.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(
+ new com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream
+ .model.OrderTradeUpdate.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(
+ new com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream
+ .model.OrderTradeUpdateO.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(
new com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream
.model.PartialBookDepthStreamsRequest.CustomTypeAdapterFactory());
@@ -268,6 +408,15 @@ private static Class getClassByDiscriminator(
gsonBuilder.registerTypeAdapterFactory(
new com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream
.model.PartialBookDepthStreamsResponseBItem.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(
+ new com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream
+ .model.StrategyUpdate.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(
+ new com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream
+ .model.StrategyUpdateSu.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(
+ new com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream
+ .model.UserDataStreamEventsResponse.CustomTypeAdapterFactory());
gson = gsonBuilder.create();
}
diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/api/DerivativesTradingCoinFuturesWebSocketStreams.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/api/DerivativesTradingCoinFuturesWebSocketStreams.java
index 1612a751..16b0de70 100644
--- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/api/DerivativesTradingCoinFuturesWebSocketStreams.java
+++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/api/DerivativesTradingCoinFuturesWebSocketStreams.java
@@ -6,6 +6,8 @@
import com.binance.connector.client.common.websocket.adapter.stream.StreamConnectionPoolWrapper;
import com.binance.connector.client.common.websocket.adapter.stream.StreamConnectionWrapper;
import com.binance.connector.client.common.websocket.configuration.WebSocketClientConfiguration;
+import com.binance.connector.client.common.websocket.dtos.RequestWrapperDTO;
+import com.binance.connector.client.common.websocket.service.StreamBlockingQueue;
import com.binance.connector.client.common.websocket.service.StreamBlockingQueueWrapper;
import com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.JSON;
import com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.model.AggregateTradeStreamsRequest;
@@ -46,13 +48,21 @@
import com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.model.MarkPriceStreamResponse;
import com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.model.PartialBookDepthStreamsRequest;
import com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.model.PartialBookDepthStreamsResponse;
+import com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.model.UserDataStreamEventsResponse;
+import com.google.gson.reflect.TypeToken;
+import java.util.Collections;
+import java.util.Map;
+import java.util.Set;
+import java.util.UUID;
public class DerivativesTradingCoinFuturesWebSocketStreams {
private static final String USER_AGENT =
String.format(
- "binance-derivatives-trading-coin-futures/1.3.0 (Java/%s; %s; %s)",
+ "binance-derivatives-trading-coin-futures/2.0.0 (Java/%s; %s; %s)",
SystemUtil.getJavaVersion(), SystemUtil.getOs(), SystemUtil.getArch());
+ private final StreamConnectionInterface connection;
+
private WebsocketMarketStreamsApi websocketMarketStreamsApi;
public DerivativesTradingCoinFuturesWebSocketStreams(
@@ -68,6 +78,7 @@ public DerivativesTradingCoinFuturesWebSocketStreams(StreamConnectionInterface c
if (!connection.isConnected()) {
connection.connect();
}
+ this.connection = connection;
this.websocketMarketStreamsApi = new WebsocketMarketStreamsApi(connection);
}
@@ -195,4 +206,29 @@ public StreamBlockingQueueWrapper partialBookDe
PartialBookDepthStreamsRequest partialBookDepthStreamsRequest) throws ApiException {
return websocketMarketStreamsApi.partialBookDepthStreams(partialBookDepthStreamsRequest);
}
+
+ /**
+ * Subscribes to the user data WebSocket stream using the provided listen key.
+ *
+ * @param listenKey - The listen key for the user data WebSocket stream.
+ * @return A WebSocket stream handler for the user data stream.
+ */
+ public StreamBlockingQueueWrapper userData(String listenKey) {
+ RequestWrapperDTO, Object> requestWrapperDTO =
+ new RequestWrapperDTO.Builder, Object>()
+ .id(getRequestID())
+ .method("SUBSCRIBE")
+ .params(Collections.singleton(listenKey))
+ .build();
+ Map> queuesMap =
+ connection.subscribe(requestWrapperDTO);
+
+ TypeToken typeToken = new TypeToken<>() {};
+ StreamBlockingQueue queue = queuesMap.get(listenKey);
+ return new StreamBlockingQueueWrapper<>(queue, typeToken, JSON.getGson());
+ }
+
+ public String getRequestID() {
+ return UUID.randomUUID().toString();
+ }
}
diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/AccountConfigUpdate.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/AccountConfigUpdate.java
new file mode 100644
index 00000000..06f0e387
--- /dev/null
+++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/AccountConfigUpdate.java
@@ -0,0 +1,312 @@
+/*
+ * Binance Derivatives Trading COIN Futures WebSocket Market Streams
+ * OpenAPI Specification for the Binance Derivatives Trading COIN Futures WebSocket Market Streams
+ *
+ * The version of the OpenAPI document: 1.0.0
+ *
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+package com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.model;
+
+import com.binance.connector.client.common.websocket.dtos.BaseDTO;
+import com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.JSON;
+import com.google.gson.Gson;
+import com.google.gson.JsonElement;
+import com.google.gson.JsonObject;
+import com.google.gson.TypeAdapter;
+import com.google.gson.TypeAdapterFactory;
+import com.google.gson.annotations.SerializedName;
+import com.google.gson.reflect.TypeToken;
+import com.google.gson.stream.JsonReader;
+import com.google.gson.stream.JsonWriter;
+import jakarta.validation.Valid;
+import jakarta.validation.constraints.*;
+import java.io.IOException;
+import java.nio.charset.StandardCharsets;
+import java.util.HashSet;
+import java.util.Map;
+import java.util.Objects;
+import java.util.Set;
+import java.util.TreeMap;
+import java.util.stream.Collectors;
+import org.hibernate.validator.constraints.*;
+
+/** AccountConfigUpdate */
+@jakarta.annotation.Generated(
+ value = "org.openapitools.codegen.languages.JavaClientCodegen",
+ comments = "Generator version: 7.12.0")
+public class AccountConfigUpdate extends BaseDTO {
+ public static final String SERIALIZED_NAME_E = "E";
+
+ @SerializedName(SERIALIZED_NAME_E)
+ @jakarta.annotation.Nullable
+ private Long E;
+
+ public static final String SERIALIZED_NAME_T = "T";
+
+ @SerializedName(SERIALIZED_NAME_T)
+ @jakarta.annotation.Nullable
+ private Long T;
+
+ public static final String SERIALIZED_NAME_AC = "ac";
+
+ @SerializedName(SERIALIZED_NAME_AC)
+ @jakarta.annotation.Nullable
+ private AccountConfigUpdateAc ac;
+
+ public AccountConfigUpdate() {}
+
+ public AccountConfigUpdate E(@jakarta.annotation.Nullable Long E) {
+ this.E = E;
+ return this;
+ }
+
+ /**
+ * Get E
+ *
+ * @return E
+ */
+ @jakarta.annotation.Nullable
+ public Long getE() {
+ return E;
+ }
+
+ public void setE(@jakarta.annotation.Nullable Long E) {
+ this.E = E;
+ }
+
+ public AccountConfigUpdate T(@jakarta.annotation.Nullable Long T) {
+ this.T = T;
+ return this;
+ }
+
+ /**
+ * Get T
+ *
+ * @return T
+ */
+ @jakarta.annotation.Nullable
+ public Long getT() {
+ return T;
+ }
+
+ public void setT(@jakarta.annotation.Nullable Long T) {
+ this.T = T;
+ }
+
+ public AccountConfigUpdate ac(@jakarta.annotation.Nullable AccountConfigUpdateAc ac) {
+ this.ac = ac;
+ return this;
+ }
+
+ /**
+ * Get ac
+ *
+ * @return ac
+ */
+ @jakarta.annotation.Nullable
+ @Valid
+ public AccountConfigUpdateAc getAc() {
+ return ac;
+ }
+
+ public void setAc(@jakarta.annotation.Nullable AccountConfigUpdateAc ac) {
+ this.ac = ac;
+ }
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ AccountConfigUpdate accountConfigUpdate = (AccountConfigUpdate) o;
+ return Objects.equals(this.E, accountConfigUpdate.E)
+ && Objects.equals(this.T, accountConfigUpdate.T)
+ && Objects.equals(this.ac, accountConfigUpdate.ac);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(E, T, ac);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class AccountConfigUpdate {\n");
+ sb.append(" E: ").append(toIndentedString(E)).append("\n");
+ sb.append(" T: ").append(toIndentedString(T)).append("\n");
+ sb.append(" ac: ").append(toIndentedString(ac)).append("\n");
+ sb.append("}");
+ return sb.toString();
+ }
+
+ public String toUrlQueryString() {
+ StringBuilder sb = new StringBuilder();
+ Map valMap = new TreeMap();
+ valMap.put("apiKey", getApiKey());
+ Long EValue = getE();
+ if (EValue != null) {
+ String EValueAsString = EValue.toString();
+ valMap.put("E", EValueAsString);
+ }
+ Long TValue = getT();
+ if (TValue != null) {
+ String TValueAsString = TValue.toString();
+ valMap.put("T", TValueAsString);
+ }
+ AccountConfigUpdateAc acValue = getAc();
+ if (acValue != null) {
+ String acValueAsString = JSON.getGson().toJson(acValue);
+ valMap.put("ac", acValueAsString);
+ }
+
+ valMap.put("timestamp", getTimestamp());
+ return asciiEncode(
+ valMap.keySet().stream()
+ .map(key -> key + "=" + valMap.get(key))
+ .collect(Collectors.joining("&")));
+ }
+
+ public Map toMap() {
+ Map valMap = new TreeMap();
+ valMap.put("apiKey", getApiKey());
+ Object EValue = getE();
+ if (EValue != null) {
+ valMap.put("E", EValue);
+ }
+ Object TValue = getT();
+ if (TValue != null) {
+ valMap.put("T", TValue);
+ }
+ Object acValue = getAc();
+ if (acValue != null) {
+ valMap.put("ac", acValue);
+ }
+
+ valMap.put("timestamp", getTimestamp());
+ return valMap;
+ }
+
+ public static String asciiEncode(String s) {
+ return new String(s.getBytes(), StandardCharsets.US_ASCII);
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces (except the first
+ * line).
+ */
+ private String toIndentedString(Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+
+ public static HashSet openapiFields;
+ public static HashSet openapiRequiredFields;
+
+ static {
+ // a set of all properties/fields (JSON key names)
+ openapiFields = new HashSet();
+ openapiFields.add("E");
+ openapiFields.add("T");
+ openapiFields.add("ac");
+
+ // a set of required properties/fields (JSON key names)
+ openapiRequiredFields = new HashSet();
+ }
+
+ /**
+ * Validates the JSON Element and throws an exception if issues found
+ *
+ * @param jsonElement JSON Element
+ * @throws IOException if the JSON Element is invalid with respect to AccountConfigUpdate
+ */
+ public static void validateJsonElement(JsonElement jsonElement) throws IOException {
+ if (jsonElement == null) {
+ if (!AccountConfigUpdate.openapiRequiredFields
+ .isEmpty()) { // has required fields but JSON element is null
+ throw new IllegalArgumentException(
+ String.format(
+ "The required field(s) %s in AccountConfigUpdate is not found in"
+ + " the empty JSON string",
+ AccountConfigUpdate.openapiRequiredFields.toString()));
+ }
+ }
+
+ Set> entries = jsonElement.getAsJsonObject().entrySet();
+ // check to see if the JSON string contains additional fields
+ for (Map.Entry entry : entries) {
+ if (!AccountConfigUpdate.openapiFields.contains(entry.getKey())) {
+ throw new IllegalArgumentException(
+ String.format(
+ "The field `%s` in the JSON string is not defined in the"
+ + " `AccountConfigUpdate` properties. JSON: %s",
+ entry.getKey(), jsonElement.toString()));
+ }
+ }
+ JsonObject jsonObj = jsonElement.getAsJsonObject();
+ // validate the optional field `ac`
+ if (jsonObj.get("ac") != null && !jsonObj.get("ac").isJsonNull()) {
+ AccountConfigUpdateAc.validateJsonElement(jsonObj.get("ac"));
+ }
+ }
+
+ public static class CustomTypeAdapterFactory implements TypeAdapterFactory {
+ @SuppressWarnings("unchecked")
+ @Override
+ public TypeAdapter create(Gson gson, TypeToken type) {
+ if (!AccountConfigUpdate.class.isAssignableFrom(type.getRawType())) {
+ return null; // this class only serializes 'AccountConfigUpdate' and its subtypes
+ }
+ final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class);
+ final TypeAdapter thisAdapter =
+ gson.getDelegateAdapter(this, TypeToken.get(AccountConfigUpdate.class));
+
+ return (TypeAdapter)
+ new TypeAdapter() {
+ @Override
+ public void write(JsonWriter out, AccountConfigUpdate value)
+ throws IOException {
+ JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonObject();
+ elementAdapter.write(out, obj);
+ }
+
+ @Override
+ public AccountConfigUpdate read(JsonReader in) throws IOException {
+ JsonElement jsonElement = elementAdapter.read(in);
+ // validateJsonElement(jsonElement);
+ return thisAdapter.fromJsonTree(jsonElement);
+ }
+ }.nullSafe();
+ }
+ }
+
+ /**
+ * Create an instance of AccountConfigUpdate given an JSON string
+ *
+ * @param jsonString JSON string
+ * @return An instance of AccountConfigUpdate
+ * @throws IOException if the JSON string is invalid with respect to AccountConfigUpdate
+ */
+ public static AccountConfigUpdate fromJson(String jsonString) throws IOException {
+ return JSON.getGson().fromJson(jsonString, AccountConfigUpdate.class);
+ }
+
+ /**
+ * Convert an instance of AccountConfigUpdate to an JSON string
+ *
+ * @return JSON string
+ */
+ public String toJson() {
+ return JSON.getGson().toJson(this);
+ }
+}
diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/AccountConfigUpdateAc.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/AccountConfigUpdateAc.java
new file mode 100644
index 00000000..874689da
--- /dev/null
+++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/AccountConfigUpdateAc.java
@@ -0,0 +1,277 @@
+/*
+ * Binance Derivatives Trading COIN Futures WebSocket Market Streams
+ * OpenAPI Specification for the Binance Derivatives Trading COIN Futures WebSocket Market Streams
+ *
+ * The version of the OpenAPI document: 1.0.0
+ *
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+package com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.model;
+
+import com.binance.connector.client.common.websocket.dtos.BaseDTO;
+import com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.JSON;
+import com.google.gson.Gson;
+import com.google.gson.JsonElement;
+import com.google.gson.JsonObject;
+import com.google.gson.TypeAdapter;
+import com.google.gson.TypeAdapterFactory;
+import com.google.gson.annotations.SerializedName;
+import com.google.gson.reflect.TypeToken;
+import com.google.gson.stream.JsonReader;
+import com.google.gson.stream.JsonWriter;
+import jakarta.validation.constraints.*;
+import java.io.IOException;
+import java.nio.charset.StandardCharsets;
+import java.util.HashSet;
+import java.util.Map;
+import java.util.Objects;
+import java.util.Set;
+import java.util.TreeMap;
+import java.util.stream.Collectors;
+import org.hibernate.validator.constraints.*;
+
+/** AccountConfigUpdateAc */
+@jakarta.annotation.Generated(
+ value = "org.openapitools.codegen.languages.JavaClientCodegen",
+ comments = "Generator version: 7.12.0")
+public class AccountConfigUpdateAc extends BaseDTO {
+ public static final String SERIALIZED_NAME_S_LOWER_CASE = "s";
+
+ @SerializedName(SERIALIZED_NAME_S_LOWER_CASE)
+ @jakarta.annotation.Nullable
+ private String sLowerCase;
+
+ public static final String SERIALIZED_NAME_L_LOWER_CASE = "l";
+
+ @SerializedName(SERIALIZED_NAME_L_LOWER_CASE)
+ @jakarta.annotation.Nullable
+ private Long lLowerCase;
+
+ public AccountConfigUpdateAc() {}
+
+ public AccountConfigUpdateAc sLowerCase(@jakarta.annotation.Nullable String sLowerCase) {
+ this.sLowerCase = sLowerCase;
+ return this;
+ }
+
+ /**
+ * Get sLowerCase
+ *
+ * @return sLowerCase
+ */
+ @jakarta.annotation.Nullable
+ public String getsLowerCase() {
+ return sLowerCase;
+ }
+
+ public void setsLowerCase(@jakarta.annotation.Nullable String sLowerCase) {
+ this.sLowerCase = sLowerCase;
+ }
+
+ public AccountConfigUpdateAc lLowerCase(@jakarta.annotation.Nullable Long lLowerCase) {
+ this.lLowerCase = lLowerCase;
+ return this;
+ }
+
+ /**
+ * Get lLowerCase
+ *
+ * @return lLowerCase
+ */
+ @jakarta.annotation.Nullable
+ public Long getlLowerCase() {
+ return lLowerCase;
+ }
+
+ public void setlLowerCase(@jakarta.annotation.Nullable Long lLowerCase) {
+ this.lLowerCase = lLowerCase;
+ }
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ AccountConfigUpdateAc accountConfigUpdateAc = (AccountConfigUpdateAc) o;
+ return Objects.equals(this.sLowerCase, accountConfigUpdateAc.sLowerCase)
+ && Objects.equals(this.lLowerCase, accountConfigUpdateAc.lLowerCase);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(sLowerCase, lLowerCase);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class AccountConfigUpdateAc {\n");
+ sb.append(" sLowerCase: ").append(toIndentedString(sLowerCase)).append("\n");
+ sb.append(" lLowerCase: ").append(toIndentedString(lLowerCase)).append("\n");
+ sb.append("}");
+ return sb.toString();
+ }
+
+ public String toUrlQueryString() {
+ StringBuilder sb = new StringBuilder();
+ Map valMap = new TreeMap();
+ valMap.put("apiKey", getApiKey());
+ String sLowerCaseValue = getsLowerCase();
+ if (sLowerCaseValue != null) {
+ String sLowerCaseValueAsString = sLowerCaseValue.toString();
+ valMap.put("sLowerCase", sLowerCaseValueAsString);
+ }
+ Long lLowerCaseValue = getlLowerCase();
+ if (lLowerCaseValue != null) {
+ String lLowerCaseValueAsString = lLowerCaseValue.toString();
+ valMap.put("lLowerCase", lLowerCaseValueAsString);
+ }
+
+ valMap.put("timestamp", getTimestamp());
+ return asciiEncode(
+ valMap.keySet().stream()
+ .map(key -> key + "=" + valMap.get(key))
+ .collect(Collectors.joining("&")));
+ }
+
+ public Map toMap() {
+ Map valMap = new TreeMap();
+ valMap.put("apiKey", getApiKey());
+ Object sLowerCaseValue = getsLowerCase();
+ if (sLowerCaseValue != null) {
+ valMap.put("sLowerCase", sLowerCaseValue);
+ }
+ Object lLowerCaseValue = getlLowerCase();
+ if (lLowerCaseValue != null) {
+ valMap.put("lLowerCase", lLowerCaseValue);
+ }
+
+ valMap.put("timestamp", getTimestamp());
+ return valMap;
+ }
+
+ public static String asciiEncode(String s) {
+ return new String(s.getBytes(), StandardCharsets.US_ASCII);
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces (except the first
+ * line).
+ */
+ private String toIndentedString(Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+
+ public static HashSet openapiFields;
+ public static HashSet openapiRequiredFields;
+
+ static {
+ // a set of all properties/fields (JSON key names)
+ openapiFields = new HashSet();
+ openapiFields.add("s");
+ openapiFields.add("l");
+
+ // a set of required properties/fields (JSON key names)
+ openapiRequiredFields = new HashSet();
+ }
+
+ /**
+ * Validates the JSON Element and throws an exception if issues found
+ *
+ * @param jsonElement JSON Element
+ * @throws IOException if the JSON Element is invalid with respect to AccountConfigUpdateAc
+ */
+ public static void validateJsonElement(JsonElement jsonElement) throws IOException {
+ if (jsonElement == null) {
+ if (!AccountConfigUpdateAc.openapiRequiredFields
+ .isEmpty()) { // has required fields but JSON element is null
+ throw new IllegalArgumentException(
+ String.format(
+ "The required field(s) %s in AccountConfigUpdateAc is not found in"
+ + " the empty JSON string",
+ AccountConfigUpdateAc.openapiRequiredFields.toString()));
+ }
+ }
+
+ Set> entries = jsonElement.getAsJsonObject().entrySet();
+ // check to see if the JSON string contains additional fields
+ for (Map.Entry entry : entries) {
+ if (!AccountConfigUpdateAc.openapiFields.contains(entry.getKey())) {
+ throw new IllegalArgumentException(
+ String.format(
+ "The field `%s` in the JSON string is not defined in the"
+ + " `AccountConfigUpdateAc` properties. JSON: %s",
+ entry.getKey(), jsonElement.toString()));
+ }
+ }
+ JsonObject jsonObj = jsonElement.getAsJsonObject();
+ if ((jsonObj.get("s") != null && !jsonObj.get("s").isJsonNull())
+ && !jsonObj.get("s").isJsonPrimitive()) {
+ throw new IllegalArgumentException(
+ String.format(
+ "Expected the field `s` to be a primitive type in the JSON string but"
+ + " got `%s`",
+ jsonObj.get("s").toString()));
+ }
+ }
+
+ public static class CustomTypeAdapterFactory implements TypeAdapterFactory {
+ @SuppressWarnings("unchecked")
+ @Override
+ public TypeAdapter create(Gson gson, TypeToken type) {
+ if (!AccountConfigUpdateAc.class.isAssignableFrom(type.getRawType())) {
+ return null; // this class only serializes 'AccountConfigUpdateAc' and its subtypes
+ }
+ final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class);
+ final TypeAdapter thisAdapter =
+ gson.getDelegateAdapter(this, TypeToken.get(AccountConfigUpdateAc.class));
+
+ return (TypeAdapter)
+ new TypeAdapter() {
+ @Override
+ public void write(JsonWriter out, AccountConfigUpdateAc value)
+ throws IOException {
+ JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonObject();
+ elementAdapter.write(out, obj);
+ }
+
+ @Override
+ public AccountConfigUpdateAc read(JsonReader in) throws IOException {
+ JsonElement jsonElement = elementAdapter.read(in);
+ // validateJsonElement(jsonElement);
+ return thisAdapter.fromJsonTree(jsonElement);
+ }
+ }.nullSafe();
+ }
+ }
+
+ /**
+ * Create an instance of AccountConfigUpdateAc given an JSON string
+ *
+ * @param jsonString JSON string
+ * @return An instance of AccountConfigUpdateAc
+ * @throws IOException if the JSON string is invalid with respect to AccountConfigUpdateAc
+ */
+ public static AccountConfigUpdateAc fromJson(String jsonString) throws IOException {
+ return JSON.getGson().fromJson(jsonString, AccountConfigUpdateAc.class);
+ }
+
+ /**
+ * Convert an instance of AccountConfigUpdateAc to an JSON string
+ *
+ * @return JSON string
+ */
+ public String toJson() {
+ return JSON.getGson().toJson(this);
+ }
+}
diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/AccountUpdate.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/AccountUpdate.java
new file mode 100644
index 00000000..4ca186ad
--- /dev/null
+++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/AccountUpdate.java
@@ -0,0 +1,356 @@
+/*
+ * Binance Derivatives Trading COIN Futures WebSocket Market Streams
+ * OpenAPI Specification for the Binance Derivatives Trading COIN Futures WebSocket Market Streams
+ *
+ * The version of the OpenAPI document: 1.0.0
+ *
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+package com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.model;
+
+import com.binance.connector.client.common.websocket.dtos.BaseDTO;
+import com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.JSON;
+import com.google.gson.Gson;
+import com.google.gson.JsonElement;
+import com.google.gson.JsonObject;
+import com.google.gson.TypeAdapter;
+import com.google.gson.TypeAdapterFactory;
+import com.google.gson.annotations.SerializedName;
+import com.google.gson.reflect.TypeToken;
+import com.google.gson.stream.JsonReader;
+import com.google.gson.stream.JsonWriter;
+import jakarta.validation.Valid;
+import jakarta.validation.constraints.*;
+import java.io.IOException;
+import java.nio.charset.StandardCharsets;
+import java.util.HashSet;
+import java.util.Map;
+import java.util.Objects;
+import java.util.Set;
+import java.util.TreeMap;
+import java.util.stream.Collectors;
+import org.hibernate.validator.constraints.*;
+
+/** AccountUpdate */
+@jakarta.annotation.Generated(
+ value = "org.openapitools.codegen.languages.JavaClientCodegen",
+ comments = "Generator version: 7.12.0")
+public class AccountUpdate extends BaseDTO {
+ public static final String SERIALIZED_NAME_E = "E";
+
+ @SerializedName(SERIALIZED_NAME_E)
+ @jakarta.annotation.Nullable
+ private Long E;
+
+ public static final String SERIALIZED_NAME_T = "T";
+
+ @SerializedName(SERIALIZED_NAME_T)
+ @jakarta.annotation.Nullable
+ private Long T;
+
+ public static final String SERIALIZED_NAME_I_LOWER_CASE = "i";
+
+ @SerializedName(SERIALIZED_NAME_I_LOWER_CASE)
+ @jakarta.annotation.Nullable
+ private String iLowerCase;
+
+ public static final String SERIALIZED_NAME_A_LOWER_CASE = "a";
+
+ @SerializedName(SERIALIZED_NAME_A_LOWER_CASE)
+ @jakarta.annotation.Nullable
+ private AccountUpdateA aLowerCase;
+
+ public AccountUpdate() {}
+
+ public AccountUpdate E(@jakarta.annotation.Nullable Long E) {
+ this.E = E;
+ return this;
+ }
+
+ /**
+ * Get E
+ *
+ * @return E
+ */
+ @jakarta.annotation.Nullable
+ public Long getE() {
+ return E;
+ }
+
+ public void setE(@jakarta.annotation.Nullable Long E) {
+ this.E = E;
+ }
+
+ public AccountUpdate T(@jakarta.annotation.Nullable Long T) {
+ this.T = T;
+ return this;
+ }
+
+ /**
+ * Get T
+ *
+ * @return T
+ */
+ @jakarta.annotation.Nullable
+ public Long getT() {
+ return T;
+ }
+
+ public void setT(@jakarta.annotation.Nullable Long T) {
+ this.T = T;
+ }
+
+ public AccountUpdate iLowerCase(@jakarta.annotation.Nullable String iLowerCase) {
+ this.iLowerCase = iLowerCase;
+ return this;
+ }
+
+ /**
+ * Get iLowerCase
+ *
+ * @return iLowerCase
+ */
+ @jakarta.annotation.Nullable
+ public String getiLowerCase() {
+ return iLowerCase;
+ }
+
+ public void setiLowerCase(@jakarta.annotation.Nullable String iLowerCase) {
+ this.iLowerCase = iLowerCase;
+ }
+
+ public AccountUpdate aLowerCase(@jakarta.annotation.Nullable AccountUpdateA aLowerCase) {
+ this.aLowerCase = aLowerCase;
+ return this;
+ }
+
+ /**
+ * Get aLowerCase
+ *
+ * @return aLowerCase
+ */
+ @jakarta.annotation.Nullable
+ @Valid
+ public AccountUpdateA getaLowerCase() {
+ return aLowerCase;
+ }
+
+ public void setaLowerCase(@jakarta.annotation.Nullable AccountUpdateA aLowerCase) {
+ this.aLowerCase = aLowerCase;
+ }
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ AccountUpdate accountUpdate = (AccountUpdate) o;
+ return Objects.equals(this.E, accountUpdate.E)
+ && Objects.equals(this.T, accountUpdate.T)
+ && Objects.equals(this.iLowerCase, accountUpdate.iLowerCase)
+ && Objects.equals(this.aLowerCase, accountUpdate.aLowerCase);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(E, T, iLowerCase, aLowerCase);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class AccountUpdate {\n");
+ sb.append(" E: ").append(toIndentedString(E)).append("\n");
+ sb.append(" T: ").append(toIndentedString(T)).append("\n");
+ sb.append(" iLowerCase: ").append(toIndentedString(iLowerCase)).append("\n");
+ sb.append(" aLowerCase: ").append(toIndentedString(aLowerCase)).append("\n");
+ sb.append("}");
+ return sb.toString();
+ }
+
+ public String toUrlQueryString() {
+ StringBuilder sb = new StringBuilder();
+ Map valMap = new TreeMap();
+ valMap.put("apiKey", getApiKey());
+ Long EValue = getE();
+ if (EValue != null) {
+ String EValueAsString = EValue.toString();
+ valMap.put("E", EValueAsString);
+ }
+ Long TValue = getT();
+ if (TValue != null) {
+ String TValueAsString = TValue.toString();
+ valMap.put("T", TValueAsString);
+ }
+ String iLowerCaseValue = getiLowerCase();
+ if (iLowerCaseValue != null) {
+ String iLowerCaseValueAsString = iLowerCaseValue.toString();
+ valMap.put("iLowerCase", iLowerCaseValueAsString);
+ }
+ AccountUpdateA aLowerCaseValue = getaLowerCase();
+ if (aLowerCaseValue != null) {
+ String aLowerCaseValueAsString = JSON.getGson().toJson(aLowerCaseValue);
+ valMap.put("aLowerCase", aLowerCaseValueAsString);
+ }
+
+ valMap.put("timestamp", getTimestamp());
+ return asciiEncode(
+ valMap.keySet().stream()
+ .map(key -> key + "=" + valMap.get(key))
+ .collect(Collectors.joining("&")));
+ }
+
+ public Map toMap() {
+ Map valMap = new TreeMap();
+ valMap.put("apiKey", getApiKey());
+ Object EValue = getE();
+ if (EValue != null) {
+ valMap.put("E", EValue);
+ }
+ Object TValue = getT();
+ if (TValue != null) {
+ valMap.put("T", TValue);
+ }
+ Object iLowerCaseValue = getiLowerCase();
+ if (iLowerCaseValue != null) {
+ valMap.put("iLowerCase", iLowerCaseValue);
+ }
+ Object aLowerCaseValue = getaLowerCase();
+ if (aLowerCaseValue != null) {
+ valMap.put("aLowerCase", aLowerCaseValue);
+ }
+
+ valMap.put("timestamp", getTimestamp());
+ return valMap;
+ }
+
+ public static String asciiEncode(String s) {
+ return new String(s.getBytes(), StandardCharsets.US_ASCII);
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces (except the first
+ * line).
+ */
+ private String toIndentedString(Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+
+ public static HashSet openapiFields;
+ public static HashSet openapiRequiredFields;
+
+ static {
+ // a set of all properties/fields (JSON key names)
+ openapiFields = new HashSet();
+ openapiFields.add("E");
+ openapiFields.add("T");
+ openapiFields.add("i");
+ openapiFields.add("a");
+
+ // a set of required properties/fields (JSON key names)
+ openapiRequiredFields = new HashSet();
+ }
+
+ /**
+ * Validates the JSON Element and throws an exception if issues found
+ *
+ * @param jsonElement JSON Element
+ * @throws IOException if the JSON Element is invalid with respect to AccountUpdate
+ */
+ public static void validateJsonElement(JsonElement jsonElement) throws IOException {
+ if (jsonElement == null) {
+ if (!AccountUpdate.openapiRequiredFields
+ .isEmpty()) { // has required fields but JSON element is null
+ throw new IllegalArgumentException(
+ String.format(
+ "The required field(s) %s in AccountUpdate is not found in the"
+ + " empty JSON string",
+ AccountUpdate.openapiRequiredFields.toString()));
+ }
+ }
+
+ Set> entries = jsonElement.getAsJsonObject().entrySet();
+ // check to see if the JSON string contains additional fields
+ for (Map.Entry entry : entries) {
+ if (!AccountUpdate.openapiFields.contains(entry.getKey())) {
+ throw new IllegalArgumentException(
+ String.format(
+ "The field `%s` in the JSON string is not defined in the"
+ + " `AccountUpdate` properties. JSON: %s",
+ entry.getKey(), jsonElement.toString()));
+ }
+ }
+ JsonObject jsonObj = jsonElement.getAsJsonObject();
+ if ((jsonObj.get("i") != null && !jsonObj.get("i").isJsonNull())
+ && !jsonObj.get("i").isJsonPrimitive()) {
+ throw new IllegalArgumentException(
+ String.format(
+ "Expected the field `i` to be a primitive type in the JSON string but"
+ + " got `%s`",
+ jsonObj.get("i").toString()));
+ }
+ // validate the optional field `a`
+ if (jsonObj.get("a") != null && !jsonObj.get("a").isJsonNull()) {
+ AccountUpdateA.validateJsonElement(jsonObj.get("a"));
+ }
+ }
+
+ public static class CustomTypeAdapterFactory implements TypeAdapterFactory {
+ @SuppressWarnings("unchecked")
+ @Override
+ public TypeAdapter create(Gson gson, TypeToken type) {
+ if (!AccountUpdate.class.isAssignableFrom(type.getRawType())) {
+ return null; // this class only serializes 'AccountUpdate' and its subtypes
+ }
+ final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class);
+ final TypeAdapter thisAdapter =
+ gson.getDelegateAdapter(this, TypeToken.get(AccountUpdate.class));
+
+ return (TypeAdapter)
+ new TypeAdapter() {
+ @Override
+ public void write(JsonWriter out, AccountUpdate value) throws IOException {
+ JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonObject();
+ elementAdapter.write(out, obj);
+ }
+
+ @Override
+ public AccountUpdate read(JsonReader in) throws IOException {
+ JsonElement jsonElement = elementAdapter.read(in);
+ // validateJsonElement(jsonElement);
+ return thisAdapter.fromJsonTree(jsonElement);
+ }
+ }.nullSafe();
+ }
+ }
+
+ /**
+ * Create an instance of AccountUpdate given an JSON string
+ *
+ * @param jsonString JSON string
+ * @return An instance of AccountUpdate
+ * @throws IOException if the JSON string is invalid with respect to AccountUpdate
+ */
+ public static AccountUpdate fromJson(String jsonString) throws IOException {
+ return JSON.getGson().fromJson(jsonString, AccountUpdate.class);
+ }
+
+ /**
+ * Convert an instance of AccountUpdate to an JSON string
+ *
+ * @return JSON string
+ */
+ public String toJson() {
+ return JSON.getGson().toJson(this);
+ }
+}
diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/AccountUpdateA.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/AccountUpdateA.java
new file mode 100644
index 00000000..4dc09f3c
--- /dev/null
+++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/AccountUpdateA.java
@@ -0,0 +1,373 @@
+/*
+ * Binance Derivatives Trading COIN Futures WebSocket Market Streams
+ * OpenAPI Specification for the Binance Derivatives Trading COIN Futures WebSocket Market Streams
+ *
+ * The version of the OpenAPI document: 1.0.0
+ *
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+package com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.model;
+
+import com.binance.connector.client.common.websocket.dtos.BaseDTO;
+import com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.JSON;
+import com.google.gson.Gson;
+import com.google.gson.JsonArray;
+import com.google.gson.JsonElement;
+import com.google.gson.JsonObject;
+import com.google.gson.TypeAdapter;
+import com.google.gson.TypeAdapterFactory;
+import com.google.gson.annotations.SerializedName;
+import com.google.gson.reflect.TypeToken;
+import com.google.gson.stream.JsonReader;
+import com.google.gson.stream.JsonWriter;
+import jakarta.validation.Valid;
+import jakarta.validation.constraints.*;
+import java.io.IOException;
+import java.nio.charset.StandardCharsets;
+import java.util.ArrayList;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Objects;
+import java.util.Set;
+import java.util.TreeMap;
+import java.util.stream.Collectors;
+import org.hibernate.validator.constraints.*;
+
+/** AccountUpdateA */
+@jakarta.annotation.Generated(
+ value = "org.openapitools.codegen.languages.JavaClientCodegen",
+ comments = "Generator version: 7.12.0")
+public class AccountUpdateA extends BaseDTO {
+ public static final String SERIALIZED_NAME_M_LOWER_CASE = "m";
+
+ @SerializedName(SERIALIZED_NAME_M_LOWER_CASE)
+ @jakarta.annotation.Nullable
+ private String mLowerCase;
+
+ public static final String SERIALIZED_NAME_B = "B";
+
+ @SerializedName(SERIALIZED_NAME_B)
+ @jakarta.annotation.Nullable
+ private List<@Valid AccountUpdateABInner> B;
+
+ public static final String SERIALIZED_NAME_P = "P";
+
+ @SerializedName(SERIALIZED_NAME_P)
+ @jakarta.annotation.Nullable
+ private List<@Valid AccountUpdateAPInner> P;
+
+ public AccountUpdateA() {}
+
+ public AccountUpdateA mLowerCase(@jakarta.annotation.Nullable String mLowerCase) {
+ this.mLowerCase = mLowerCase;
+ return this;
+ }
+
+ /**
+ * Get mLowerCase
+ *
+ * @return mLowerCase
+ */
+ @jakarta.annotation.Nullable
+ public String getmLowerCase() {
+ return mLowerCase;
+ }
+
+ public void setmLowerCase(@jakarta.annotation.Nullable String mLowerCase) {
+ this.mLowerCase = mLowerCase;
+ }
+
+ public AccountUpdateA B(@jakarta.annotation.Nullable List<@Valid AccountUpdateABInner> B) {
+ this.B = B;
+ return this;
+ }
+
+ public AccountUpdateA addBItem(AccountUpdateABInner BItem) {
+ if (this.B == null) {
+ this.B = new ArrayList<>();
+ }
+ this.B.add(BItem);
+ return this;
+ }
+
+ /**
+ * Get B
+ *
+ * @return B
+ */
+ @jakarta.annotation.Nullable
+ @Valid
+ public List<@Valid AccountUpdateABInner> getB() {
+ return B;
+ }
+
+ public void setB(@jakarta.annotation.Nullable List<@Valid AccountUpdateABInner> B) {
+ this.B = B;
+ }
+
+ public AccountUpdateA P(@jakarta.annotation.Nullable List<@Valid AccountUpdateAPInner> P) {
+ this.P = P;
+ return this;
+ }
+
+ public AccountUpdateA addPItem(AccountUpdateAPInner PItem) {
+ if (this.P == null) {
+ this.P = new ArrayList<>();
+ }
+ this.P.add(PItem);
+ return this;
+ }
+
+ /**
+ * Get P
+ *
+ * @return P
+ */
+ @jakarta.annotation.Nullable
+ @Valid
+ public List<@Valid AccountUpdateAPInner> getP() {
+ return P;
+ }
+
+ public void setP(@jakarta.annotation.Nullable List<@Valid AccountUpdateAPInner> P) {
+ this.P = P;
+ }
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ AccountUpdateA accountUpdateA = (AccountUpdateA) o;
+ return Objects.equals(this.mLowerCase, accountUpdateA.mLowerCase)
+ && Objects.equals(this.B, accountUpdateA.B)
+ && Objects.equals(this.P, accountUpdateA.P);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(mLowerCase, B, P);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class AccountUpdateA {\n");
+ sb.append(" mLowerCase: ").append(toIndentedString(mLowerCase)).append("\n");
+ sb.append(" B: ").append(toIndentedString(B)).append("\n");
+ sb.append(" P: ").append(toIndentedString(P)).append("\n");
+ sb.append("}");
+ return sb.toString();
+ }
+
+ public String toUrlQueryString() {
+ StringBuilder sb = new StringBuilder();
+ Map valMap = new TreeMap();
+ valMap.put("apiKey", getApiKey());
+ String mLowerCaseValue = getmLowerCase();
+ if (mLowerCaseValue != null) {
+ String mLowerCaseValueAsString = mLowerCaseValue.toString();
+ valMap.put("mLowerCase", mLowerCaseValueAsString);
+ }
+ List<@Valid AccountUpdateABInner> BValue = getB();
+ if (BValue != null) {
+ String BValueAsString = JSON.getGson().toJson(BValue);
+ valMap.put("B", BValueAsString);
+ }
+ List<@Valid AccountUpdateAPInner> PValue = getP();
+ if (PValue != null) {
+ String PValueAsString = JSON.getGson().toJson(PValue);
+ valMap.put("P", PValueAsString);
+ }
+
+ valMap.put("timestamp", getTimestamp());
+ return asciiEncode(
+ valMap.keySet().stream()
+ .map(key -> key + "=" + valMap.get(key))
+ .collect(Collectors.joining("&")));
+ }
+
+ public Map toMap() {
+ Map valMap = new TreeMap();
+ valMap.put("apiKey", getApiKey());
+ Object mLowerCaseValue = getmLowerCase();
+ if (mLowerCaseValue != null) {
+ valMap.put("mLowerCase", mLowerCaseValue);
+ }
+ Object BValue = getB();
+ if (BValue != null) {
+ valMap.put("B", BValue);
+ }
+ Object PValue = getP();
+ if (PValue != null) {
+ valMap.put("P", PValue);
+ }
+
+ valMap.put("timestamp", getTimestamp());
+ return valMap;
+ }
+
+ public static String asciiEncode(String s) {
+ return new String(s.getBytes(), StandardCharsets.US_ASCII);
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces (except the first
+ * line).
+ */
+ private String toIndentedString(Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+
+ public static HashSet openapiFields;
+ public static HashSet openapiRequiredFields;
+
+ static {
+ // a set of all properties/fields (JSON key names)
+ openapiFields = new HashSet();
+ openapiFields.add("m");
+ openapiFields.add("B");
+ openapiFields.add("P");
+
+ // a set of required properties/fields (JSON key names)
+ openapiRequiredFields = new HashSet();
+ }
+
+ /**
+ * Validates the JSON Element and throws an exception if issues found
+ *
+ * @param jsonElement JSON Element
+ * @throws IOException if the JSON Element is invalid with respect to AccountUpdateA
+ */
+ public static void validateJsonElement(JsonElement jsonElement) throws IOException {
+ if (jsonElement == null) {
+ if (!AccountUpdateA.openapiRequiredFields
+ .isEmpty()) { // has required fields but JSON element is null
+ throw new IllegalArgumentException(
+ String.format(
+ "The required field(s) %s in AccountUpdateA is not found in the"
+ + " empty JSON string",
+ AccountUpdateA.openapiRequiredFields.toString()));
+ }
+ }
+
+ Set> entries = jsonElement.getAsJsonObject().entrySet();
+ // check to see if the JSON string contains additional fields
+ for (Map.Entry entry : entries) {
+ if (!AccountUpdateA.openapiFields.contains(entry.getKey())) {
+ throw new IllegalArgumentException(
+ String.format(
+ "The field `%s` in the JSON string is not defined in the"
+ + " `AccountUpdateA` properties. JSON: %s",
+ entry.getKey(), jsonElement.toString()));
+ }
+ }
+ JsonObject jsonObj = jsonElement.getAsJsonObject();
+ if ((jsonObj.get("m") != null && !jsonObj.get("m").isJsonNull())
+ && !jsonObj.get("m").isJsonPrimitive()) {
+ throw new IllegalArgumentException(
+ String.format(
+ "Expected the field `m` to be a primitive type in the JSON string but"
+ + " got `%s`",
+ jsonObj.get("m").toString()));
+ }
+ if (jsonObj.get("B") != null && !jsonObj.get("B").isJsonNull()) {
+ JsonArray jsonArrayB = jsonObj.getAsJsonArray("B");
+ if (jsonArrayB != null) {
+ // ensure the json data is an array
+ if (!jsonObj.get("B").isJsonArray()) {
+ throw new IllegalArgumentException(
+ String.format(
+ "Expected the field `B` to be an array in the JSON string but"
+ + " got `%s`",
+ jsonObj.get("B").toString()));
+ }
+
+ // validate the optional field `B` (array)
+ for (int i = 0; i < jsonArrayB.size(); i++) {
+ AccountUpdateABInner.validateJsonElement(jsonArrayB.get(i));
+ }
+ ;
+ }
+ }
+ if (jsonObj.get("P") != null && !jsonObj.get("P").isJsonNull()) {
+ JsonArray jsonArrayP = jsonObj.getAsJsonArray("P");
+ if (jsonArrayP != null) {
+ // ensure the json data is an array
+ if (!jsonObj.get("P").isJsonArray()) {
+ throw new IllegalArgumentException(
+ String.format(
+ "Expected the field `P` to be an array in the JSON string but"
+ + " got `%s`",
+ jsonObj.get("P").toString()));
+ }
+
+ // validate the optional field `P` (array)
+ for (int i = 0; i < jsonArrayP.size(); i++) {
+ AccountUpdateAPInner.validateJsonElement(jsonArrayP.get(i));
+ }
+ ;
+ }
+ }
+ }
+
+ public static class CustomTypeAdapterFactory implements TypeAdapterFactory {
+ @SuppressWarnings("unchecked")
+ @Override
+ public TypeAdapter create(Gson gson, TypeToken type) {
+ if (!AccountUpdateA.class.isAssignableFrom(type.getRawType())) {
+ return null; // this class only serializes 'AccountUpdateA' and its subtypes
+ }
+ final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class);
+ final TypeAdapter thisAdapter =
+ gson.getDelegateAdapter(this, TypeToken.get(AccountUpdateA.class));
+
+ return (TypeAdapter)
+ new TypeAdapter() {
+ @Override
+ public void write(JsonWriter out, AccountUpdateA value) throws IOException {
+ JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonObject();
+ elementAdapter.write(out, obj);
+ }
+
+ @Override
+ public AccountUpdateA read(JsonReader in) throws IOException {
+ JsonElement jsonElement = elementAdapter.read(in);
+ // validateJsonElement(jsonElement);
+ return thisAdapter.fromJsonTree(jsonElement);
+ }
+ }.nullSafe();
+ }
+ }
+
+ /**
+ * Create an instance of AccountUpdateA given an JSON string
+ *
+ * @param jsonString JSON string
+ * @return An instance of AccountUpdateA
+ * @throws IOException if the JSON string is invalid with respect to AccountUpdateA
+ */
+ public static AccountUpdateA fromJson(String jsonString) throws IOException {
+ return JSON.getGson().fromJson(jsonString, AccountUpdateA.class);
+ }
+
+ /**
+ * Convert an instance of AccountUpdateA to an JSON string
+ *
+ * @return JSON string
+ */
+ public String toJson() {
+ return JSON.getGson().toJson(this);
+ }
+}
diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/AccountUpdateABInner.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/AccountUpdateABInner.java
new file mode 100644
index 00000000..acd6a889
--- /dev/null
+++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/AccountUpdateABInner.java
@@ -0,0 +1,375 @@
+/*
+ * Binance Derivatives Trading COIN Futures WebSocket Market Streams
+ * OpenAPI Specification for the Binance Derivatives Trading COIN Futures WebSocket Market Streams
+ *
+ * The version of the OpenAPI document: 1.0.0
+ *
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+package com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.model;
+
+import com.binance.connector.client.common.websocket.dtos.BaseDTO;
+import com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.JSON;
+import com.google.gson.Gson;
+import com.google.gson.JsonElement;
+import com.google.gson.JsonObject;
+import com.google.gson.TypeAdapter;
+import com.google.gson.TypeAdapterFactory;
+import com.google.gson.annotations.SerializedName;
+import com.google.gson.reflect.TypeToken;
+import com.google.gson.stream.JsonReader;
+import com.google.gson.stream.JsonWriter;
+import jakarta.validation.constraints.*;
+import java.io.IOException;
+import java.nio.charset.StandardCharsets;
+import java.util.HashSet;
+import java.util.Map;
+import java.util.Objects;
+import java.util.Set;
+import java.util.TreeMap;
+import java.util.stream.Collectors;
+import org.hibernate.validator.constraints.*;
+
+/** AccountUpdateABInner */
+@jakarta.annotation.Generated(
+ value = "org.openapitools.codegen.languages.JavaClientCodegen",
+ comments = "Generator version: 7.12.0")
+public class AccountUpdateABInner extends BaseDTO {
+ public static final String SERIALIZED_NAME_A_LOWER_CASE = "a";
+
+ @SerializedName(SERIALIZED_NAME_A_LOWER_CASE)
+ @jakarta.annotation.Nullable
+ private String aLowerCase;
+
+ public static final String SERIALIZED_NAME_WB = "wb";
+
+ @SerializedName(SERIALIZED_NAME_WB)
+ @jakarta.annotation.Nullable
+ private String wb;
+
+ public static final String SERIALIZED_NAME_CW = "cw";
+
+ @SerializedName(SERIALIZED_NAME_CW)
+ @jakarta.annotation.Nullable
+ private String cw;
+
+ public static final String SERIALIZED_NAME_BC = "bc";
+
+ @SerializedName(SERIALIZED_NAME_BC)
+ @jakarta.annotation.Nullable
+ private String bc;
+
+ public AccountUpdateABInner() {}
+
+ public AccountUpdateABInner aLowerCase(@jakarta.annotation.Nullable String aLowerCase) {
+ this.aLowerCase = aLowerCase;
+ return this;
+ }
+
+ /**
+ * Get aLowerCase
+ *
+ * @return aLowerCase
+ */
+ @jakarta.annotation.Nullable
+ public String getaLowerCase() {
+ return aLowerCase;
+ }
+
+ public void setaLowerCase(@jakarta.annotation.Nullable String aLowerCase) {
+ this.aLowerCase = aLowerCase;
+ }
+
+ public AccountUpdateABInner wb(@jakarta.annotation.Nullable String wb) {
+ this.wb = wb;
+ return this;
+ }
+
+ /**
+ * Get wb
+ *
+ * @return wb
+ */
+ @jakarta.annotation.Nullable
+ public String getWb() {
+ return wb;
+ }
+
+ public void setWb(@jakarta.annotation.Nullable String wb) {
+ this.wb = wb;
+ }
+
+ public AccountUpdateABInner cw(@jakarta.annotation.Nullable String cw) {
+ this.cw = cw;
+ return this;
+ }
+
+ /**
+ * Get cw
+ *
+ * @return cw
+ */
+ @jakarta.annotation.Nullable
+ public String getCw() {
+ return cw;
+ }
+
+ public void setCw(@jakarta.annotation.Nullable String cw) {
+ this.cw = cw;
+ }
+
+ public AccountUpdateABInner bc(@jakarta.annotation.Nullable String bc) {
+ this.bc = bc;
+ return this;
+ }
+
+ /**
+ * Get bc
+ *
+ * @return bc
+ */
+ @jakarta.annotation.Nullable
+ public String getBc() {
+ return bc;
+ }
+
+ public void setBc(@jakarta.annotation.Nullable String bc) {
+ this.bc = bc;
+ }
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ AccountUpdateABInner accountUpdateABInner = (AccountUpdateABInner) o;
+ return Objects.equals(this.aLowerCase, accountUpdateABInner.aLowerCase)
+ && Objects.equals(this.wb, accountUpdateABInner.wb)
+ && Objects.equals(this.cw, accountUpdateABInner.cw)
+ && Objects.equals(this.bc, accountUpdateABInner.bc);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(aLowerCase, wb, cw, bc);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class AccountUpdateABInner {\n");
+ sb.append(" aLowerCase: ").append(toIndentedString(aLowerCase)).append("\n");
+ sb.append(" wb: ").append(toIndentedString(wb)).append("\n");
+ sb.append(" cw: ").append(toIndentedString(cw)).append("\n");
+ sb.append(" bc: ").append(toIndentedString(bc)).append("\n");
+ sb.append("}");
+ return sb.toString();
+ }
+
+ public String toUrlQueryString() {
+ StringBuilder sb = new StringBuilder();
+ Map valMap = new TreeMap();
+ valMap.put("apiKey", getApiKey());
+ String aLowerCaseValue = getaLowerCase();
+ if (aLowerCaseValue != null) {
+ String aLowerCaseValueAsString = aLowerCaseValue.toString();
+ valMap.put("aLowerCase", aLowerCaseValueAsString);
+ }
+ String wbValue = getWb();
+ if (wbValue != null) {
+ String wbValueAsString = wbValue.toString();
+ valMap.put("wb", wbValueAsString);
+ }
+ String cwValue = getCw();
+ if (cwValue != null) {
+ String cwValueAsString = cwValue.toString();
+ valMap.put("cw", cwValueAsString);
+ }
+ String bcValue = getBc();
+ if (bcValue != null) {
+ String bcValueAsString = bcValue.toString();
+ valMap.put("bc", bcValueAsString);
+ }
+
+ valMap.put("timestamp", getTimestamp());
+ return asciiEncode(
+ valMap.keySet().stream()
+ .map(key -> key + "=" + valMap.get(key))
+ .collect(Collectors.joining("&")));
+ }
+
+ public Map toMap() {
+ Map valMap = new TreeMap();
+ valMap.put("apiKey", getApiKey());
+ Object aLowerCaseValue = getaLowerCase();
+ if (aLowerCaseValue != null) {
+ valMap.put("aLowerCase", aLowerCaseValue);
+ }
+ Object wbValue = getWb();
+ if (wbValue != null) {
+ valMap.put("wb", wbValue);
+ }
+ Object cwValue = getCw();
+ if (cwValue != null) {
+ valMap.put("cw", cwValue);
+ }
+ Object bcValue = getBc();
+ if (bcValue != null) {
+ valMap.put("bc", bcValue);
+ }
+
+ valMap.put("timestamp", getTimestamp());
+ return valMap;
+ }
+
+ public static String asciiEncode(String s) {
+ return new String(s.getBytes(), StandardCharsets.US_ASCII);
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces (except the first
+ * line).
+ */
+ private String toIndentedString(Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+
+ public static HashSet openapiFields;
+ public static HashSet openapiRequiredFields;
+
+ static {
+ // a set of all properties/fields (JSON key names)
+ openapiFields = new HashSet();
+ openapiFields.add("a");
+ openapiFields.add("wb");
+ openapiFields.add("cw");
+ openapiFields.add("bc");
+
+ // a set of required properties/fields (JSON key names)
+ openapiRequiredFields = new HashSet();
+ }
+
+ /**
+ * Validates the JSON Element and throws an exception if issues found
+ *
+ * @param jsonElement JSON Element
+ * @throws IOException if the JSON Element is invalid with respect to AccountUpdateABInner
+ */
+ public static void validateJsonElement(JsonElement jsonElement) throws IOException {
+ if (jsonElement == null) {
+ if (!AccountUpdateABInner.openapiRequiredFields
+ .isEmpty()) { // has required fields but JSON element is null
+ throw new IllegalArgumentException(
+ String.format(
+ "The required field(s) %s in AccountUpdateABInner is not found in"
+ + " the empty JSON string",
+ AccountUpdateABInner.openapiRequiredFields.toString()));
+ }
+ }
+
+ Set> entries = jsonElement.getAsJsonObject().entrySet();
+ // check to see if the JSON string contains additional fields
+ for (Map.Entry entry : entries) {
+ if (!AccountUpdateABInner.openapiFields.contains(entry.getKey())) {
+ throw new IllegalArgumentException(
+ String.format(
+ "The field `%s` in the JSON string is not defined in the"
+ + " `AccountUpdateABInner` properties. JSON: %s",
+ entry.getKey(), jsonElement.toString()));
+ }
+ }
+ JsonObject jsonObj = jsonElement.getAsJsonObject();
+ if ((jsonObj.get("a") != null && !jsonObj.get("a").isJsonNull())
+ && !jsonObj.get("a").isJsonPrimitive()) {
+ throw new IllegalArgumentException(
+ String.format(
+ "Expected the field `a` to be a primitive type in the JSON string but"
+ + " got `%s`",
+ jsonObj.get("a").toString()));
+ }
+ if ((jsonObj.get("wb") != null && !jsonObj.get("wb").isJsonNull())
+ && !jsonObj.get("wb").isJsonPrimitive()) {
+ throw new IllegalArgumentException(
+ String.format(
+ "Expected the field `wb` to be a primitive type in the JSON string but"
+ + " got `%s`",
+ jsonObj.get("wb").toString()));
+ }
+ if ((jsonObj.get("cw") != null && !jsonObj.get("cw").isJsonNull())
+ && !jsonObj.get("cw").isJsonPrimitive()) {
+ throw new IllegalArgumentException(
+ String.format(
+ "Expected the field `cw` to be a primitive type in the JSON string but"
+ + " got `%s`",
+ jsonObj.get("cw").toString()));
+ }
+ if ((jsonObj.get("bc") != null && !jsonObj.get("bc").isJsonNull())
+ && !jsonObj.get("bc").isJsonPrimitive()) {
+ throw new IllegalArgumentException(
+ String.format(
+ "Expected the field `bc` to be a primitive type in the JSON string but"
+ + " got `%s`",
+ jsonObj.get("bc").toString()));
+ }
+ }
+
+ public static class CustomTypeAdapterFactory implements TypeAdapterFactory {
+ @SuppressWarnings("unchecked")
+ @Override
+ public TypeAdapter create(Gson gson, TypeToken type) {
+ if (!AccountUpdateABInner.class.isAssignableFrom(type.getRawType())) {
+ return null; // this class only serializes 'AccountUpdateABInner' and its subtypes
+ }
+ final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class);
+ final TypeAdapter thisAdapter =
+ gson.getDelegateAdapter(this, TypeToken.get(AccountUpdateABInner.class));
+
+ return (TypeAdapter)
+ new TypeAdapter() {
+ @Override
+ public void write(JsonWriter out, AccountUpdateABInner value)
+ throws IOException {
+ JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonObject();
+ elementAdapter.write(out, obj);
+ }
+
+ @Override
+ public AccountUpdateABInner read(JsonReader in) throws IOException {
+ JsonElement jsonElement = elementAdapter.read(in);
+ // validateJsonElement(jsonElement);
+ return thisAdapter.fromJsonTree(jsonElement);
+ }
+ }.nullSafe();
+ }
+ }
+
+ /**
+ * Create an instance of AccountUpdateABInner given an JSON string
+ *
+ * @param jsonString JSON string
+ * @return An instance of AccountUpdateABInner
+ * @throws IOException if the JSON string is invalid with respect to AccountUpdateABInner
+ */
+ public static AccountUpdateABInner fromJson(String jsonString) throws IOException {
+ return JSON.getGson().fromJson(jsonString, AccountUpdateABInner.class);
+ }
+
+ /**
+ * Convert an instance of AccountUpdateABInner to an JSON string
+ *
+ * @return JSON string
+ */
+ public String toJson() {
+ return JSON.getGson().toJson(this);
+ }
+}
diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/AccountUpdateAPInner.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/AccountUpdateAPInner.java
new file mode 100644
index 00000000..e99ebd1d
--- /dev/null
+++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/AccountUpdateAPInner.java
@@ -0,0 +1,600 @@
+/*
+ * Binance Derivatives Trading COIN Futures WebSocket Market Streams
+ * OpenAPI Specification for the Binance Derivatives Trading COIN Futures WebSocket Market Streams
+ *
+ * The version of the OpenAPI document: 1.0.0
+ *
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+package com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.model;
+
+import com.binance.connector.client.common.websocket.dtos.BaseDTO;
+import com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.JSON;
+import com.google.gson.Gson;
+import com.google.gson.JsonElement;
+import com.google.gson.JsonObject;
+import com.google.gson.TypeAdapter;
+import com.google.gson.TypeAdapterFactory;
+import com.google.gson.annotations.SerializedName;
+import com.google.gson.reflect.TypeToken;
+import com.google.gson.stream.JsonReader;
+import com.google.gson.stream.JsonWriter;
+import jakarta.validation.constraints.*;
+import java.io.IOException;
+import java.nio.charset.StandardCharsets;
+import java.util.HashSet;
+import java.util.Map;
+import java.util.Objects;
+import java.util.Set;
+import java.util.TreeMap;
+import java.util.stream.Collectors;
+import org.hibernate.validator.constraints.*;
+
+/** AccountUpdateAPInner */
+@jakarta.annotation.Generated(
+ value = "org.openapitools.codegen.languages.JavaClientCodegen",
+ comments = "Generator version: 7.12.0")
+public class AccountUpdateAPInner extends BaseDTO {
+ public static final String SERIALIZED_NAME_S_LOWER_CASE = "s";
+
+ @SerializedName(SERIALIZED_NAME_S_LOWER_CASE)
+ @jakarta.annotation.Nullable
+ private String sLowerCase;
+
+ public static final String SERIALIZED_NAME_PA = "pa";
+
+ @SerializedName(SERIALIZED_NAME_PA)
+ @jakarta.annotation.Nullable
+ private String pa;
+
+ public static final String SERIALIZED_NAME_EP = "ep";
+
+ @SerializedName(SERIALIZED_NAME_EP)
+ @jakarta.annotation.Nullable
+ private String ep;
+
+ public static final String SERIALIZED_NAME_BEP = "bep";
+
+ @SerializedName(SERIALIZED_NAME_BEP)
+ @jakarta.annotation.Nullable
+ private String bep;
+
+ public static final String SERIALIZED_NAME_CR = "cr";
+
+ @SerializedName(SERIALIZED_NAME_CR)
+ @jakarta.annotation.Nullable
+ private String cr;
+
+ public static final String SERIALIZED_NAME_UP = "up";
+
+ @SerializedName(SERIALIZED_NAME_UP)
+ @jakarta.annotation.Nullable
+ private String up;
+
+ public static final String SERIALIZED_NAME_MT = "mt";
+
+ @SerializedName(SERIALIZED_NAME_MT)
+ @jakarta.annotation.Nullable
+ private String mt;
+
+ public static final String SERIALIZED_NAME_IW = "iw";
+
+ @SerializedName(SERIALIZED_NAME_IW)
+ @jakarta.annotation.Nullable
+ private String iw;
+
+ public static final String SERIALIZED_NAME_PS = "ps";
+
+ @SerializedName(SERIALIZED_NAME_PS)
+ @jakarta.annotation.Nullable
+ private String ps;
+
+ public AccountUpdateAPInner() {}
+
+ public AccountUpdateAPInner sLowerCase(@jakarta.annotation.Nullable String sLowerCase) {
+ this.sLowerCase = sLowerCase;
+ return this;
+ }
+
+ /**
+ * Get sLowerCase
+ *
+ * @return sLowerCase
+ */
+ @jakarta.annotation.Nullable
+ public String getsLowerCase() {
+ return sLowerCase;
+ }
+
+ public void setsLowerCase(@jakarta.annotation.Nullable String sLowerCase) {
+ this.sLowerCase = sLowerCase;
+ }
+
+ public AccountUpdateAPInner pa(@jakarta.annotation.Nullable String pa) {
+ this.pa = pa;
+ return this;
+ }
+
+ /**
+ * Get pa
+ *
+ * @return pa
+ */
+ @jakarta.annotation.Nullable
+ public String getPa() {
+ return pa;
+ }
+
+ public void setPa(@jakarta.annotation.Nullable String pa) {
+ this.pa = pa;
+ }
+
+ public AccountUpdateAPInner ep(@jakarta.annotation.Nullable String ep) {
+ this.ep = ep;
+ return this;
+ }
+
+ /**
+ * Get ep
+ *
+ * @return ep
+ */
+ @jakarta.annotation.Nullable
+ public String getEp() {
+ return ep;
+ }
+
+ public void setEp(@jakarta.annotation.Nullable String ep) {
+ this.ep = ep;
+ }
+
+ public AccountUpdateAPInner bep(@jakarta.annotation.Nullable String bep) {
+ this.bep = bep;
+ return this;
+ }
+
+ /**
+ * Get bep
+ *
+ * @return bep
+ */
+ @jakarta.annotation.Nullable
+ public String getBep() {
+ return bep;
+ }
+
+ public void setBep(@jakarta.annotation.Nullable String bep) {
+ this.bep = bep;
+ }
+
+ public AccountUpdateAPInner cr(@jakarta.annotation.Nullable String cr) {
+ this.cr = cr;
+ return this;
+ }
+
+ /**
+ * Get cr
+ *
+ * @return cr
+ */
+ @jakarta.annotation.Nullable
+ public String getCr() {
+ return cr;
+ }
+
+ public void setCr(@jakarta.annotation.Nullable String cr) {
+ this.cr = cr;
+ }
+
+ public AccountUpdateAPInner up(@jakarta.annotation.Nullable String up) {
+ this.up = up;
+ return this;
+ }
+
+ /**
+ * Get up
+ *
+ * @return up
+ */
+ @jakarta.annotation.Nullable
+ public String getUp() {
+ return up;
+ }
+
+ public void setUp(@jakarta.annotation.Nullable String up) {
+ this.up = up;
+ }
+
+ public AccountUpdateAPInner mt(@jakarta.annotation.Nullable String mt) {
+ this.mt = mt;
+ return this;
+ }
+
+ /**
+ * Get mt
+ *
+ * @return mt
+ */
+ @jakarta.annotation.Nullable
+ public String getMt() {
+ return mt;
+ }
+
+ public void setMt(@jakarta.annotation.Nullable String mt) {
+ this.mt = mt;
+ }
+
+ public AccountUpdateAPInner iw(@jakarta.annotation.Nullable String iw) {
+ this.iw = iw;
+ return this;
+ }
+
+ /**
+ * Get iw
+ *
+ * @return iw
+ */
+ @jakarta.annotation.Nullable
+ public String getIw() {
+ return iw;
+ }
+
+ public void setIw(@jakarta.annotation.Nullable String iw) {
+ this.iw = iw;
+ }
+
+ public AccountUpdateAPInner ps(@jakarta.annotation.Nullable String ps) {
+ this.ps = ps;
+ return this;
+ }
+
+ /**
+ * Get ps
+ *
+ * @return ps
+ */
+ @jakarta.annotation.Nullable
+ public String getPs() {
+ return ps;
+ }
+
+ public void setPs(@jakarta.annotation.Nullable String ps) {
+ this.ps = ps;
+ }
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ AccountUpdateAPInner accountUpdateAPInner = (AccountUpdateAPInner) o;
+ return Objects.equals(this.sLowerCase, accountUpdateAPInner.sLowerCase)
+ && Objects.equals(this.pa, accountUpdateAPInner.pa)
+ && Objects.equals(this.ep, accountUpdateAPInner.ep)
+ && Objects.equals(this.bep, accountUpdateAPInner.bep)
+ && Objects.equals(this.cr, accountUpdateAPInner.cr)
+ && Objects.equals(this.up, accountUpdateAPInner.up)
+ && Objects.equals(this.mt, accountUpdateAPInner.mt)
+ && Objects.equals(this.iw, accountUpdateAPInner.iw)
+ && Objects.equals(this.ps, accountUpdateAPInner.ps);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(sLowerCase, pa, ep, bep, cr, up, mt, iw, ps);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class AccountUpdateAPInner {\n");
+ sb.append(" sLowerCase: ").append(toIndentedString(sLowerCase)).append("\n");
+ sb.append(" pa: ").append(toIndentedString(pa)).append("\n");
+ sb.append(" ep: ").append(toIndentedString(ep)).append("\n");
+ sb.append(" bep: ").append(toIndentedString(bep)).append("\n");
+ sb.append(" cr: ").append(toIndentedString(cr)).append("\n");
+ sb.append(" up: ").append(toIndentedString(up)).append("\n");
+ sb.append(" mt: ").append(toIndentedString(mt)).append("\n");
+ sb.append(" iw: ").append(toIndentedString(iw)).append("\n");
+ sb.append(" ps: ").append(toIndentedString(ps)).append("\n");
+ sb.append("}");
+ return sb.toString();
+ }
+
+ public String toUrlQueryString() {
+ StringBuilder sb = new StringBuilder();
+ Map valMap = new TreeMap();
+ valMap.put("apiKey", getApiKey());
+ String sLowerCaseValue = getsLowerCase();
+ if (sLowerCaseValue != null) {
+ String sLowerCaseValueAsString = sLowerCaseValue.toString();
+ valMap.put("sLowerCase", sLowerCaseValueAsString);
+ }
+ String paValue = getPa();
+ if (paValue != null) {
+ String paValueAsString = paValue.toString();
+ valMap.put("pa", paValueAsString);
+ }
+ String epValue = getEp();
+ if (epValue != null) {
+ String epValueAsString = epValue.toString();
+ valMap.put("ep", epValueAsString);
+ }
+ String bepValue = getBep();
+ if (bepValue != null) {
+ String bepValueAsString = bepValue.toString();
+ valMap.put("bep", bepValueAsString);
+ }
+ String crValue = getCr();
+ if (crValue != null) {
+ String crValueAsString = crValue.toString();
+ valMap.put("cr", crValueAsString);
+ }
+ String upValue = getUp();
+ if (upValue != null) {
+ String upValueAsString = upValue.toString();
+ valMap.put("up", upValueAsString);
+ }
+ String mtValue = getMt();
+ if (mtValue != null) {
+ String mtValueAsString = mtValue.toString();
+ valMap.put("mt", mtValueAsString);
+ }
+ String iwValue = getIw();
+ if (iwValue != null) {
+ String iwValueAsString = iwValue.toString();
+ valMap.put("iw", iwValueAsString);
+ }
+ String psValue = getPs();
+ if (psValue != null) {
+ String psValueAsString = psValue.toString();
+ valMap.put("ps", psValueAsString);
+ }
+
+ valMap.put("timestamp", getTimestamp());
+ return asciiEncode(
+ valMap.keySet().stream()
+ .map(key -> key + "=" + valMap.get(key))
+ .collect(Collectors.joining("&")));
+ }
+
+ public Map toMap() {
+ Map valMap = new TreeMap();
+ valMap.put("apiKey", getApiKey());
+ Object sLowerCaseValue = getsLowerCase();
+ if (sLowerCaseValue != null) {
+ valMap.put("sLowerCase", sLowerCaseValue);
+ }
+ Object paValue = getPa();
+ if (paValue != null) {
+ valMap.put("pa", paValue);
+ }
+ Object epValue = getEp();
+ if (epValue != null) {
+ valMap.put("ep", epValue);
+ }
+ Object bepValue = getBep();
+ if (bepValue != null) {
+ valMap.put("bep", bepValue);
+ }
+ Object crValue = getCr();
+ if (crValue != null) {
+ valMap.put("cr", crValue);
+ }
+ Object upValue = getUp();
+ if (upValue != null) {
+ valMap.put("up", upValue);
+ }
+ Object mtValue = getMt();
+ if (mtValue != null) {
+ valMap.put("mt", mtValue);
+ }
+ Object iwValue = getIw();
+ if (iwValue != null) {
+ valMap.put("iw", iwValue);
+ }
+ Object psValue = getPs();
+ if (psValue != null) {
+ valMap.put("ps", psValue);
+ }
+
+ valMap.put("timestamp", getTimestamp());
+ return valMap;
+ }
+
+ public static String asciiEncode(String s) {
+ return new String(s.getBytes(), StandardCharsets.US_ASCII);
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces (except the first
+ * line).
+ */
+ private String toIndentedString(Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+
+ public static HashSet openapiFields;
+ public static HashSet openapiRequiredFields;
+
+ static {
+ // a set of all properties/fields (JSON key names)
+ openapiFields = new HashSet();
+ openapiFields.add("s");
+ openapiFields.add("pa");
+ openapiFields.add("ep");
+ openapiFields.add("bep");
+ openapiFields.add("cr");
+ openapiFields.add("up");
+ openapiFields.add("mt");
+ openapiFields.add("iw");
+ openapiFields.add("ps");
+
+ // a set of required properties/fields (JSON key names)
+ openapiRequiredFields = new HashSet();
+ }
+
+ /**
+ * Validates the JSON Element and throws an exception if issues found
+ *
+ * @param jsonElement JSON Element
+ * @throws IOException if the JSON Element is invalid with respect to AccountUpdateAPInner
+ */
+ public static void validateJsonElement(JsonElement jsonElement) throws IOException {
+ if (jsonElement == null) {
+ if (!AccountUpdateAPInner.openapiRequiredFields
+ .isEmpty()) { // has required fields but JSON element is null
+ throw new IllegalArgumentException(
+ String.format(
+ "The required field(s) %s in AccountUpdateAPInner is not found in"
+ + " the empty JSON string",
+ AccountUpdateAPInner.openapiRequiredFields.toString()));
+ }
+ }
+
+ Set> entries = jsonElement.getAsJsonObject().entrySet();
+ // check to see if the JSON string contains additional fields
+ for (Map.Entry entry : entries) {
+ if (!AccountUpdateAPInner.openapiFields.contains(entry.getKey())) {
+ throw new IllegalArgumentException(
+ String.format(
+ "The field `%s` in the JSON string is not defined in the"
+ + " `AccountUpdateAPInner` properties. JSON: %s",
+ entry.getKey(), jsonElement.toString()));
+ }
+ }
+ JsonObject jsonObj = jsonElement.getAsJsonObject();
+ if ((jsonObj.get("s") != null && !jsonObj.get("s").isJsonNull())
+ && !jsonObj.get("s").isJsonPrimitive()) {
+ throw new IllegalArgumentException(
+ String.format(
+ "Expected the field `s` to be a primitive type in the JSON string but"
+ + " got `%s`",
+ jsonObj.get("s").toString()));
+ }
+ if ((jsonObj.get("pa") != null && !jsonObj.get("pa").isJsonNull())
+ && !jsonObj.get("pa").isJsonPrimitive()) {
+ throw new IllegalArgumentException(
+ String.format(
+ "Expected the field `pa` to be a primitive type in the JSON string but"
+ + " got `%s`",
+ jsonObj.get("pa").toString()));
+ }
+ if ((jsonObj.get("ep") != null && !jsonObj.get("ep").isJsonNull())
+ && !jsonObj.get("ep").isJsonPrimitive()) {
+ throw new IllegalArgumentException(
+ String.format(
+ "Expected the field `ep` to be a primitive type in the JSON string but"
+ + " got `%s`",
+ jsonObj.get("ep").toString()));
+ }
+ if ((jsonObj.get("bep") != null && !jsonObj.get("bep").isJsonNull())
+ && !jsonObj.get("bep").isJsonPrimitive()) {
+ throw new IllegalArgumentException(
+ String.format(
+ "Expected the field `bep` to be a primitive type in the JSON string but"
+ + " got `%s`",
+ jsonObj.get("bep").toString()));
+ }
+ if ((jsonObj.get("cr") != null && !jsonObj.get("cr").isJsonNull())
+ && !jsonObj.get("cr").isJsonPrimitive()) {
+ throw new IllegalArgumentException(
+ String.format(
+ "Expected the field `cr` to be a primitive type in the JSON string but"
+ + " got `%s`",
+ jsonObj.get("cr").toString()));
+ }
+ if ((jsonObj.get("up") != null && !jsonObj.get("up").isJsonNull())
+ && !jsonObj.get("up").isJsonPrimitive()) {
+ throw new IllegalArgumentException(
+ String.format(
+ "Expected the field `up` to be a primitive type in the JSON string but"
+ + " got `%s`",
+ jsonObj.get("up").toString()));
+ }
+ if ((jsonObj.get("mt") != null && !jsonObj.get("mt").isJsonNull())
+ && !jsonObj.get("mt").isJsonPrimitive()) {
+ throw new IllegalArgumentException(
+ String.format(
+ "Expected the field `mt` to be a primitive type in the JSON string but"
+ + " got `%s`",
+ jsonObj.get("mt").toString()));
+ }
+ if ((jsonObj.get("iw") != null && !jsonObj.get("iw").isJsonNull())
+ && !jsonObj.get("iw").isJsonPrimitive()) {
+ throw new IllegalArgumentException(
+ String.format(
+ "Expected the field `iw` to be a primitive type in the JSON string but"
+ + " got `%s`",
+ jsonObj.get("iw").toString()));
+ }
+ if ((jsonObj.get("ps") != null && !jsonObj.get("ps").isJsonNull())
+ && !jsonObj.get("ps").isJsonPrimitive()) {
+ throw new IllegalArgumentException(
+ String.format(
+ "Expected the field `ps` to be a primitive type in the JSON string but"
+ + " got `%s`",
+ jsonObj.get("ps").toString()));
+ }
+ }
+
+ public static class CustomTypeAdapterFactory implements TypeAdapterFactory {
+ @SuppressWarnings("unchecked")
+ @Override
+ public TypeAdapter create(Gson gson, TypeToken type) {
+ if (!AccountUpdateAPInner.class.isAssignableFrom(type.getRawType())) {
+ return null; // this class only serializes 'AccountUpdateAPInner' and its subtypes
+ }
+ final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class);
+ final TypeAdapter thisAdapter =
+ gson.getDelegateAdapter(this, TypeToken.get(AccountUpdateAPInner.class));
+
+ return (TypeAdapter)
+ new TypeAdapter() {
+ @Override
+ public void write(JsonWriter out, AccountUpdateAPInner value)
+ throws IOException {
+ JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonObject();
+ elementAdapter.write(out, obj);
+ }
+
+ @Override
+ public AccountUpdateAPInner read(JsonReader in) throws IOException {
+ JsonElement jsonElement = elementAdapter.read(in);
+ // validateJsonElement(jsonElement);
+ return thisAdapter.fromJsonTree(jsonElement);
+ }
+ }.nullSafe();
+ }
+ }
+
+ /**
+ * Create an instance of AccountUpdateAPInner given an JSON string
+ *
+ * @param jsonString JSON string
+ * @return An instance of AccountUpdateAPInner
+ * @throws IOException if the JSON string is invalid with respect to AccountUpdateAPInner
+ */
+ public static AccountUpdateAPInner fromJson(String jsonString) throws IOException {
+ return JSON.getGson().fromJson(jsonString, AccountUpdateAPInner.class);
+ }
+
+ /**
+ * Convert an instance of AccountUpdateAPInner to an JSON string
+ *
+ * @return JSON string
+ */
+ public String toJson() {
+ return JSON.getGson().toJson(this);
+ }
+}
diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/GridUpdate.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/GridUpdate.java
new file mode 100644
index 00000000..dce9f6ab
--- /dev/null
+++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/GridUpdate.java
@@ -0,0 +1,311 @@
+/*
+ * Binance Derivatives Trading COIN Futures WebSocket Market Streams
+ * OpenAPI Specification for the Binance Derivatives Trading COIN Futures WebSocket Market Streams
+ *
+ * The version of the OpenAPI document: 1.0.0
+ *
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+package com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.model;
+
+import com.binance.connector.client.common.websocket.dtos.BaseDTO;
+import com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.JSON;
+import com.google.gson.Gson;
+import com.google.gson.JsonElement;
+import com.google.gson.JsonObject;
+import com.google.gson.TypeAdapter;
+import com.google.gson.TypeAdapterFactory;
+import com.google.gson.annotations.SerializedName;
+import com.google.gson.reflect.TypeToken;
+import com.google.gson.stream.JsonReader;
+import com.google.gson.stream.JsonWriter;
+import jakarta.validation.Valid;
+import jakarta.validation.constraints.*;
+import java.io.IOException;
+import java.nio.charset.StandardCharsets;
+import java.util.HashSet;
+import java.util.Map;
+import java.util.Objects;
+import java.util.Set;
+import java.util.TreeMap;
+import java.util.stream.Collectors;
+import org.hibernate.validator.constraints.*;
+
+/** GridUpdate */
+@jakarta.annotation.Generated(
+ value = "org.openapitools.codegen.languages.JavaClientCodegen",
+ comments = "Generator version: 7.12.0")
+public class GridUpdate extends BaseDTO {
+ public static final String SERIALIZED_NAME_T = "T";
+
+ @SerializedName(SERIALIZED_NAME_T)
+ @jakarta.annotation.Nullable
+ private Long T;
+
+ public static final String SERIALIZED_NAME_E = "E";
+
+ @SerializedName(SERIALIZED_NAME_E)
+ @jakarta.annotation.Nullable
+ private Long E;
+
+ public static final String SERIALIZED_NAME_GU = "gu";
+
+ @SerializedName(SERIALIZED_NAME_GU)
+ @jakarta.annotation.Nullable
+ private GridUpdateGu gu;
+
+ public GridUpdate() {}
+
+ public GridUpdate T(@jakarta.annotation.Nullable Long T) {
+ this.T = T;
+ return this;
+ }
+
+ /**
+ * Get T
+ *
+ * @return T
+ */
+ @jakarta.annotation.Nullable
+ public Long getT() {
+ return T;
+ }
+
+ public void setT(@jakarta.annotation.Nullable Long T) {
+ this.T = T;
+ }
+
+ public GridUpdate E(@jakarta.annotation.Nullable Long E) {
+ this.E = E;
+ return this;
+ }
+
+ /**
+ * Get E
+ *
+ * @return E
+ */
+ @jakarta.annotation.Nullable
+ public Long getE() {
+ return E;
+ }
+
+ public void setE(@jakarta.annotation.Nullable Long E) {
+ this.E = E;
+ }
+
+ public GridUpdate gu(@jakarta.annotation.Nullable GridUpdateGu gu) {
+ this.gu = gu;
+ return this;
+ }
+
+ /**
+ * Get gu
+ *
+ * @return gu
+ */
+ @jakarta.annotation.Nullable
+ @Valid
+ public GridUpdateGu getGu() {
+ return gu;
+ }
+
+ public void setGu(@jakarta.annotation.Nullable GridUpdateGu gu) {
+ this.gu = gu;
+ }
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ GridUpdate gridUpdate = (GridUpdate) o;
+ return Objects.equals(this.T, gridUpdate.T)
+ && Objects.equals(this.E, gridUpdate.E)
+ && Objects.equals(this.gu, gridUpdate.gu);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(T, E, gu);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class GridUpdate {\n");
+ sb.append(" T: ").append(toIndentedString(T)).append("\n");
+ sb.append(" E: ").append(toIndentedString(E)).append("\n");
+ sb.append(" gu: ").append(toIndentedString(gu)).append("\n");
+ sb.append("}");
+ return sb.toString();
+ }
+
+ public String toUrlQueryString() {
+ StringBuilder sb = new StringBuilder();
+ Map valMap = new TreeMap();
+ valMap.put("apiKey", getApiKey());
+ Long TValue = getT();
+ if (TValue != null) {
+ String TValueAsString = TValue.toString();
+ valMap.put("T", TValueAsString);
+ }
+ Long EValue = getE();
+ if (EValue != null) {
+ String EValueAsString = EValue.toString();
+ valMap.put("E", EValueAsString);
+ }
+ GridUpdateGu guValue = getGu();
+ if (guValue != null) {
+ String guValueAsString = JSON.getGson().toJson(guValue);
+ valMap.put("gu", guValueAsString);
+ }
+
+ valMap.put("timestamp", getTimestamp());
+ return asciiEncode(
+ valMap.keySet().stream()
+ .map(key -> key + "=" + valMap.get(key))
+ .collect(Collectors.joining("&")));
+ }
+
+ public Map toMap() {
+ Map valMap = new TreeMap();
+ valMap.put("apiKey", getApiKey());
+ Object TValue = getT();
+ if (TValue != null) {
+ valMap.put("T", TValue);
+ }
+ Object EValue = getE();
+ if (EValue != null) {
+ valMap.put("E", EValue);
+ }
+ Object guValue = getGu();
+ if (guValue != null) {
+ valMap.put("gu", guValue);
+ }
+
+ valMap.put("timestamp", getTimestamp());
+ return valMap;
+ }
+
+ public static String asciiEncode(String s) {
+ return new String(s.getBytes(), StandardCharsets.US_ASCII);
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces (except the first
+ * line).
+ */
+ private String toIndentedString(Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+
+ public static HashSet openapiFields;
+ public static HashSet openapiRequiredFields;
+
+ static {
+ // a set of all properties/fields (JSON key names)
+ openapiFields = new HashSet();
+ openapiFields.add("T");
+ openapiFields.add("E");
+ openapiFields.add("gu");
+
+ // a set of required properties/fields (JSON key names)
+ openapiRequiredFields = new HashSet();
+ }
+
+ /**
+ * Validates the JSON Element and throws an exception if issues found
+ *
+ * @param jsonElement JSON Element
+ * @throws IOException if the JSON Element is invalid with respect to GridUpdate
+ */
+ public static void validateJsonElement(JsonElement jsonElement) throws IOException {
+ if (jsonElement == null) {
+ if (!GridUpdate.openapiRequiredFields
+ .isEmpty()) { // has required fields but JSON element is null
+ throw new IllegalArgumentException(
+ String.format(
+ "The required field(s) %s in GridUpdate is not found in the empty"
+ + " JSON string",
+ GridUpdate.openapiRequiredFields.toString()));
+ }
+ }
+
+ Set> entries = jsonElement.getAsJsonObject().entrySet();
+ // check to see if the JSON string contains additional fields
+ for (Map.Entry entry : entries) {
+ if (!GridUpdate.openapiFields.contains(entry.getKey())) {
+ throw new IllegalArgumentException(
+ String.format(
+ "The field `%s` in the JSON string is not defined in the"
+ + " `GridUpdate` properties. JSON: %s",
+ entry.getKey(), jsonElement.toString()));
+ }
+ }
+ JsonObject jsonObj = jsonElement.getAsJsonObject();
+ // validate the optional field `gu`
+ if (jsonObj.get("gu") != null && !jsonObj.get("gu").isJsonNull()) {
+ GridUpdateGu.validateJsonElement(jsonObj.get("gu"));
+ }
+ }
+
+ public static class CustomTypeAdapterFactory implements TypeAdapterFactory {
+ @SuppressWarnings("unchecked")
+ @Override
+ public TypeAdapter create(Gson gson, TypeToken type) {
+ if (!GridUpdate.class.isAssignableFrom(type.getRawType())) {
+ return null; // this class only serializes 'GridUpdate' and its subtypes
+ }
+ final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class);
+ final TypeAdapter thisAdapter =
+ gson.getDelegateAdapter(this, TypeToken.get(GridUpdate.class));
+
+ return (TypeAdapter)
+ new TypeAdapter() {
+ @Override
+ public void write(JsonWriter out, GridUpdate value) throws IOException {
+ JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonObject();
+ elementAdapter.write(out, obj);
+ }
+
+ @Override
+ public GridUpdate read(JsonReader in) throws IOException {
+ JsonElement jsonElement = elementAdapter.read(in);
+ // validateJsonElement(jsonElement);
+ return thisAdapter.fromJsonTree(jsonElement);
+ }
+ }.nullSafe();
+ }
+ }
+
+ /**
+ * Create an instance of GridUpdate given an JSON string
+ *
+ * @param jsonString JSON string
+ * @return An instance of GridUpdate
+ * @throws IOException if the JSON string is invalid with respect to GridUpdate
+ */
+ public static GridUpdate fromJson(String jsonString) throws IOException {
+ return JSON.getGson().fromJson(jsonString, GridUpdate.class);
+ }
+
+ /**
+ * Convert an instance of GridUpdate to an JSON string
+ *
+ * @return JSON string
+ */
+ public String toJson() {
+ return JSON.getGson().toJson(this);
+ }
+}
diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/GridUpdateGu.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/GridUpdateGu.java
new file mode 100644
index 00000000..0b1f390c
--- /dev/null
+++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/GridUpdateGu.java
@@ -0,0 +1,628 @@
+/*
+ * Binance Derivatives Trading COIN Futures WebSocket Market Streams
+ * OpenAPI Specification for the Binance Derivatives Trading COIN Futures WebSocket Market Streams
+ *
+ * The version of the OpenAPI document: 1.0.0
+ *
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+package com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.model;
+
+import com.binance.connector.client.common.websocket.dtos.BaseDTO;
+import com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.JSON;
+import com.google.gson.Gson;
+import com.google.gson.JsonElement;
+import com.google.gson.JsonObject;
+import com.google.gson.TypeAdapter;
+import com.google.gson.TypeAdapterFactory;
+import com.google.gson.annotations.SerializedName;
+import com.google.gson.reflect.TypeToken;
+import com.google.gson.stream.JsonReader;
+import com.google.gson.stream.JsonWriter;
+import jakarta.validation.constraints.*;
+import java.io.IOException;
+import java.nio.charset.StandardCharsets;
+import java.util.HashSet;
+import java.util.Map;
+import java.util.Objects;
+import java.util.Set;
+import java.util.TreeMap;
+import java.util.stream.Collectors;
+import org.hibernate.validator.constraints.*;
+
+/** GridUpdateGu */
+@jakarta.annotation.Generated(
+ value = "org.openapitools.codegen.languages.JavaClientCodegen",
+ comments = "Generator version: 7.12.0")
+public class GridUpdateGu extends BaseDTO {
+ public static final String SERIALIZED_NAME_SI = "si";
+
+ @SerializedName(SERIALIZED_NAME_SI)
+ @jakarta.annotation.Nullable
+ private Long si;
+
+ public static final String SERIALIZED_NAME_ST = "st";
+
+ @SerializedName(SERIALIZED_NAME_ST)
+ @jakarta.annotation.Nullable
+ private String st;
+
+ public static final String SERIALIZED_NAME_SS = "ss";
+
+ @SerializedName(SERIALIZED_NAME_SS)
+ @jakarta.annotation.Nullable
+ private String ss;
+
+ public static final String SERIALIZED_NAME_S_LOWER_CASE = "s";
+
+ @SerializedName(SERIALIZED_NAME_S_LOWER_CASE)
+ @jakarta.annotation.Nullable
+ private String sLowerCase;
+
+ public static final String SERIALIZED_NAME_R_LOWER_CASE = "r";
+
+ @SerializedName(SERIALIZED_NAME_R_LOWER_CASE)
+ @jakarta.annotation.Nullable
+ private String rLowerCase;
+
+ public static final String SERIALIZED_NAME_UP = "up";
+
+ @SerializedName(SERIALIZED_NAME_UP)
+ @jakarta.annotation.Nullable
+ private String up;
+
+ public static final String SERIALIZED_NAME_UQ = "uq";
+
+ @SerializedName(SERIALIZED_NAME_UQ)
+ @jakarta.annotation.Nullable
+ private String uq;
+
+ public static final String SERIALIZED_NAME_UF = "uf";
+
+ @SerializedName(SERIALIZED_NAME_UF)
+ @jakarta.annotation.Nullable
+ private String uf;
+
+ public static final String SERIALIZED_NAME_MP = "mp";
+
+ @SerializedName(SERIALIZED_NAME_MP)
+ @jakarta.annotation.Nullable
+ private String mp;
+
+ public static final String SERIALIZED_NAME_UT = "ut";
+
+ @SerializedName(SERIALIZED_NAME_UT)
+ @jakarta.annotation.Nullable
+ private Long ut;
+
+ public GridUpdateGu() {}
+
+ public GridUpdateGu si(@jakarta.annotation.Nullable Long si) {
+ this.si = si;
+ return this;
+ }
+
+ /**
+ * Get si
+ *
+ * @return si
+ */
+ @jakarta.annotation.Nullable
+ public Long getSi() {
+ return si;
+ }
+
+ public void setSi(@jakarta.annotation.Nullable Long si) {
+ this.si = si;
+ }
+
+ public GridUpdateGu st(@jakarta.annotation.Nullable String st) {
+ this.st = st;
+ return this;
+ }
+
+ /**
+ * Get st
+ *
+ * @return st
+ */
+ @jakarta.annotation.Nullable
+ public String getSt() {
+ return st;
+ }
+
+ public void setSt(@jakarta.annotation.Nullable String st) {
+ this.st = st;
+ }
+
+ public GridUpdateGu ss(@jakarta.annotation.Nullable String ss) {
+ this.ss = ss;
+ return this;
+ }
+
+ /**
+ * Get ss
+ *
+ * @return ss
+ */
+ @jakarta.annotation.Nullable
+ public String getSs() {
+ return ss;
+ }
+
+ public void setSs(@jakarta.annotation.Nullable String ss) {
+ this.ss = ss;
+ }
+
+ public GridUpdateGu sLowerCase(@jakarta.annotation.Nullable String sLowerCase) {
+ this.sLowerCase = sLowerCase;
+ return this;
+ }
+
+ /**
+ * Get sLowerCase
+ *
+ * @return sLowerCase
+ */
+ @jakarta.annotation.Nullable
+ public String getsLowerCase() {
+ return sLowerCase;
+ }
+
+ public void setsLowerCase(@jakarta.annotation.Nullable String sLowerCase) {
+ this.sLowerCase = sLowerCase;
+ }
+
+ public GridUpdateGu rLowerCase(@jakarta.annotation.Nullable String rLowerCase) {
+ this.rLowerCase = rLowerCase;
+ return this;
+ }
+
+ /**
+ * Get rLowerCase
+ *
+ * @return rLowerCase
+ */
+ @jakarta.annotation.Nullable
+ public String getrLowerCase() {
+ return rLowerCase;
+ }
+
+ public void setrLowerCase(@jakarta.annotation.Nullable String rLowerCase) {
+ this.rLowerCase = rLowerCase;
+ }
+
+ public GridUpdateGu up(@jakarta.annotation.Nullable String up) {
+ this.up = up;
+ return this;
+ }
+
+ /**
+ * Get up
+ *
+ * @return up
+ */
+ @jakarta.annotation.Nullable
+ public String getUp() {
+ return up;
+ }
+
+ public void setUp(@jakarta.annotation.Nullable String up) {
+ this.up = up;
+ }
+
+ public GridUpdateGu uq(@jakarta.annotation.Nullable String uq) {
+ this.uq = uq;
+ return this;
+ }
+
+ /**
+ * Get uq
+ *
+ * @return uq
+ */
+ @jakarta.annotation.Nullable
+ public String getUq() {
+ return uq;
+ }
+
+ public void setUq(@jakarta.annotation.Nullable String uq) {
+ this.uq = uq;
+ }
+
+ public GridUpdateGu uf(@jakarta.annotation.Nullable String uf) {
+ this.uf = uf;
+ return this;
+ }
+
+ /**
+ * Get uf
+ *
+ * @return uf
+ */
+ @jakarta.annotation.Nullable
+ public String getUf() {
+ return uf;
+ }
+
+ public void setUf(@jakarta.annotation.Nullable String uf) {
+ this.uf = uf;
+ }
+
+ public GridUpdateGu mp(@jakarta.annotation.Nullable String mp) {
+ this.mp = mp;
+ return this;
+ }
+
+ /**
+ * Get mp
+ *
+ * @return mp
+ */
+ @jakarta.annotation.Nullable
+ public String getMp() {
+ return mp;
+ }
+
+ public void setMp(@jakarta.annotation.Nullable String mp) {
+ this.mp = mp;
+ }
+
+ public GridUpdateGu ut(@jakarta.annotation.Nullable Long ut) {
+ this.ut = ut;
+ return this;
+ }
+
+ /**
+ * Get ut
+ *
+ * @return ut
+ */
+ @jakarta.annotation.Nullable
+ public Long getUt() {
+ return ut;
+ }
+
+ public void setUt(@jakarta.annotation.Nullable Long ut) {
+ this.ut = ut;
+ }
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ GridUpdateGu gridUpdateGu = (GridUpdateGu) o;
+ return Objects.equals(this.si, gridUpdateGu.si)
+ && Objects.equals(this.st, gridUpdateGu.st)
+ && Objects.equals(this.ss, gridUpdateGu.ss)
+ && Objects.equals(this.sLowerCase, gridUpdateGu.sLowerCase)
+ && Objects.equals(this.rLowerCase, gridUpdateGu.rLowerCase)
+ && Objects.equals(this.up, gridUpdateGu.up)
+ && Objects.equals(this.uq, gridUpdateGu.uq)
+ && Objects.equals(this.uf, gridUpdateGu.uf)
+ && Objects.equals(this.mp, gridUpdateGu.mp)
+ && Objects.equals(this.ut, gridUpdateGu.ut);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(si, st, ss, sLowerCase, rLowerCase, up, uq, uf, mp, ut);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class GridUpdateGu {\n");
+ sb.append(" si: ").append(toIndentedString(si)).append("\n");
+ sb.append(" st: ").append(toIndentedString(st)).append("\n");
+ sb.append(" ss: ").append(toIndentedString(ss)).append("\n");
+ sb.append(" sLowerCase: ").append(toIndentedString(sLowerCase)).append("\n");
+ sb.append(" rLowerCase: ").append(toIndentedString(rLowerCase)).append("\n");
+ sb.append(" up: ").append(toIndentedString(up)).append("\n");
+ sb.append(" uq: ").append(toIndentedString(uq)).append("\n");
+ sb.append(" uf: ").append(toIndentedString(uf)).append("\n");
+ sb.append(" mp: ").append(toIndentedString(mp)).append("\n");
+ sb.append(" ut: ").append(toIndentedString(ut)).append("\n");
+ sb.append("}");
+ return sb.toString();
+ }
+
+ public String toUrlQueryString() {
+ StringBuilder sb = new StringBuilder();
+ Map valMap = new TreeMap();
+ valMap.put("apiKey", getApiKey());
+ Long siValue = getSi();
+ if (siValue != null) {
+ String siValueAsString = siValue.toString();
+ valMap.put("si", siValueAsString);
+ }
+ String stValue = getSt();
+ if (stValue != null) {
+ String stValueAsString = stValue.toString();
+ valMap.put("st", stValueAsString);
+ }
+ String ssValue = getSs();
+ if (ssValue != null) {
+ String ssValueAsString = ssValue.toString();
+ valMap.put("ss", ssValueAsString);
+ }
+ String sLowerCaseValue = getsLowerCase();
+ if (sLowerCaseValue != null) {
+ String sLowerCaseValueAsString = sLowerCaseValue.toString();
+ valMap.put("sLowerCase", sLowerCaseValueAsString);
+ }
+ String rLowerCaseValue = getrLowerCase();
+ if (rLowerCaseValue != null) {
+ String rLowerCaseValueAsString = rLowerCaseValue.toString();
+ valMap.put("rLowerCase", rLowerCaseValueAsString);
+ }
+ String upValue = getUp();
+ if (upValue != null) {
+ String upValueAsString = upValue.toString();
+ valMap.put("up", upValueAsString);
+ }
+ String uqValue = getUq();
+ if (uqValue != null) {
+ String uqValueAsString = uqValue.toString();
+ valMap.put("uq", uqValueAsString);
+ }
+ String ufValue = getUf();
+ if (ufValue != null) {
+ String ufValueAsString = ufValue.toString();
+ valMap.put("uf", ufValueAsString);
+ }
+ String mpValue = getMp();
+ if (mpValue != null) {
+ String mpValueAsString = mpValue.toString();
+ valMap.put("mp", mpValueAsString);
+ }
+ Long utValue = getUt();
+ if (utValue != null) {
+ String utValueAsString = utValue.toString();
+ valMap.put("ut", utValueAsString);
+ }
+
+ valMap.put("timestamp", getTimestamp());
+ return asciiEncode(
+ valMap.keySet().stream()
+ .map(key -> key + "=" + valMap.get(key))
+ .collect(Collectors.joining("&")));
+ }
+
+ public Map toMap() {
+ Map valMap = new TreeMap();
+ valMap.put("apiKey", getApiKey());
+ Object siValue = getSi();
+ if (siValue != null) {
+ valMap.put("si", siValue);
+ }
+ Object stValue = getSt();
+ if (stValue != null) {
+ valMap.put("st", stValue);
+ }
+ Object ssValue = getSs();
+ if (ssValue != null) {
+ valMap.put("ss", ssValue);
+ }
+ Object sLowerCaseValue = getsLowerCase();
+ if (sLowerCaseValue != null) {
+ valMap.put("sLowerCase", sLowerCaseValue);
+ }
+ Object rLowerCaseValue = getrLowerCase();
+ if (rLowerCaseValue != null) {
+ valMap.put("rLowerCase", rLowerCaseValue);
+ }
+ Object upValue = getUp();
+ if (upValue != null) {
+ valMap.put("up", upValue);
+ }
+ Object uqValue = getUq();
+ if (uqValue != null) {
+ valMap.put("uq", uqValue);
+ }
+ Object ufValue = getUf();
+ if (ufValue != null) {
+ valMap.put("uf", ufValue);
+ }
+ Object mpValue = getMp();
+ if (mpValue != null) {
+ valMap.put("mp", mpValue);
+ }
+ Object utValue = getUt();
+ if (utValue != null) {
+ valMap.put("ut", utValue);
+ }
+
+ valMap.put("timestamp", getTimestamp());
+ return valMap;
+ }
+
+ public static String asciiEncode(String s) {
+ return new String(s.getBytes(), StandardCharsets.US_ASCII);
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces (except the first
+ * line).
+ */
+ private String toIndentedString(Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+
+ public static HashSet openapiFields;
+ public static HashSet openapiRequiredFields;
+
+ static {
+ // a set of all properties/fields (JSON key names)
+ openapiFields = new HashSet();
+ openapiFields.add("si");
+ openapiFields.add("st");
+ openapiFields.add("ss");
+ openapiFields.add("s");
+ openapiFields.add("r");
+ openapiFields.add("up");
+ openapiFields.add("uq");
+ openapiFields.add("uf");
+ openapiFields.add("mp");
+ openapiFields.add("ut");
+
+ // a set of required properties/fields (JSON key names)
+ openapiRequiredFields = new HashSet();
+ }
+
+ /**
+ * Validates the JSON Element and throws an exception if issues found
+ *
+ * @param jsonElement JSON Element
+ * @throws IOException if the JSON Element is invalid with respect to GridUpdateGu
+ */
+ public static void validateJsonElement(JsonElement jsonElement) throws IOException {
+ if (jsonElement == null) {
+ if (!GridUpdateGu.openapiRequiredFields
+ .isEmpty()) { // has required fields but JSON element is null
+ throw new IllegalArgumentException(
+ String.format(
+ "The required field(s) %s in GridUpdateGu is not found in the empty"
+ + " JSON string",
+ GridUpdateGu.openapiRequiredFields.toString()));
+ }
+ }
+
+ Set> entries = jsonElement.getAsJsonObject().entrySet();
+ // check to see if the JSON string contains additional fields
+ for (Map.Entry entry : entries) {
+ if (!GridUpdateGu.openapiFields.contains(entry.getKey())) {
+ throw new IllegalArgumentException(
+ String.format(
+ "The field `%s` in the JSON string is not defined in the"
+ + " `GridUpdateGu` properties. JSON: %s",
+ entry.getKey(), jsonElement.toString()));
+ }
+ }
+ JsonObject jsonObj = jsonElement.getAsJsonObject();
+ if ((jsonObj.get("st") != null && !jsonObj.get("st").isJsonNull())
+ && !jsonObj.get("st").isJsonPrimitive()) {
+ throw new IllegalArgumentException(
+ String.format(
+ "Expected the field `st` to be a primitive type in the JSON string but"
+ + " got `%s`",
+ jsonObj.get("st").toString()));
+ }
+ if ((jsonObj.get("ss") != null && !jsonObj.get("ss").isJsonNull())
+ && !jsonObj.get("ss").isJsonPrimitive()) {
+ throw new IllegalArgumentException(
+ String.format(
+ "Expected the field `ss` to be a primitive type in the JSON string but"
+ + " got `%s`",
+ jsonObj.get("ss").toString()));
+ }
+ if ((jsonObj.get("s") != null && !jsonObj.get("s").isJsonNull())
+ && !jsonObj.get("s").isJsonPrimitive()) {
+ throw new IllegalArgumentException(
+ String.format(
+ "Expected the field `s` to be a primitive type in the JSON string but"
+ + " got `%s`",
+ jsonObj.get("s").toString()));
+ }
+ if ((jsonObj.get("r") != null && !jsonObj.get("r").isJsonNull())
+ && !jsonObj.get("r").isJsonPrimitive()) {
+ throw new IllegalArgumentException(
+ String.format(
+ "Expected the field `r` to be a primitive type in the JSON string but"
+ + " got `%s`",
+ jsonObj.get("r").toString()));
+ }
+ if ((jsonObj.get("up") != null && !jsonObj.get("up").isJsonNull())
+ && !jsonObj.get("up").isJsonPrimitive()) {
+ throw new IllegalArgumentException(
+ String.format(
+ "Expected the field `up` to be a primitive type in the JSON string but"
+ + " got `%s`",
+ jsonObj.get("up").toString()));
+ }
+ if ((jsonObj.get("uq") != null && !jsonObj.get("uq").isJsonNull())
+ && !jsonObj.get("uq").isJsonPrimitive()) {
+ throw new IllegalArgumentException(
+ String.format(
+ "Expected the field `uq` to be a primitive type in the JSON string but"
+ + " got `%s`",
+ jsonObj.get("uq").toString()));
+ }
+ if ((jsonObj.get("uf") != null && !jsonObj.get("uf").isJsonNull())
+ && !jsonObj.get("uf").isJsonPrimitive()) {
+ throw new IllegalArgumentException(
+ String.format(
+ "Expected the field `uf` to be a primitive type in the JSON string but"
+ + " got `%s`",
+ jsonObj.get("uf").toString()));
+ }
+ if ((jsonObj.get("mp") != null && !jsonObj.get("mp").isJsonNull())
+ && !jsonObj.get("mp").isJsonPrimitive()) {
+ throw new IllegalArgumentException(
+ String.format(
+ "Expected the field `mp` to be a primitive type in the JSON string but"
+ + " got `%s`",
+ jsonObj.get("mp").toString()));
+ }
+ }
+
+ public static class CustomTypeAdapterFactory implements TypeAdapterFactory {
+ @SuppressWarnings("unchecked")
+ @Override
+ public TypeAdapter create(Gson gson, TypeToken type) {
+ if (!GridUpdateGu.class.isAssignableFrom(type.getRawType())) {
+ return null; // this class only serializes 'GridUpdateGu' and its subtypes
+ }
+ final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class);
+ final TypeAdapter thisAdapter =
+ gson.getDelegateAdapter(this, TypeToken.get(GridUpdateGu.class));
+
+ return (TypeAdapter)
+ new TypeAdapter() {
+ @Override
+ public void write(JsonWriter out, GridUpdateGu value) throws IOException {
+ JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonObject();
+ elementAdapter.write(out, obj);
+ }
+
+ @Override
+ public GridUpdateGu read(JsonReader in) throws IOException {
+ JsonElement jsonElement = elementAdapter.read(in);
+ // validateJsonElement(jsonElement);
+ return thisAdapter.fromJsonTree(jsonElement);
+ }
+ }.nullSafe();
+ }
+ }
+
+ /**
+ * Create an instance of GridUpdateGu given an JSON string
+ *
+ * @param jsonString JSON string
+ * @return An instance of GridUpdateGu
+ * @throws IOException if the JSON string is invalid with respect to GridUpdateGu
+ */
+ public static GridUpdateGu fromJson(String jsonString) throws IOException {
+ return JSON.getGson().fromJson(jsonString, GridUpdateGu.class);
+ }
+
+ /**
+ * Convert an instance of GridUpdateGu to an JSON string
+ *
+ * @return JSON string
+ */
+ public String toJson() {
+ return JSON.getGson().toJson(this);
+ }
+}
diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/Listenkeyexpired.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/Listenkeyexpired.java
new file mode 100644
index 00000000..83ee292f
--- /dev/null
+++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/Listenkeyexpired.java
@@ -0,0 +1,277 @@
+/*
+ * Binance Derivatives Trading COIN Futures WebSocket Market Streams
+ * OpenAPI Specification for the Binance Derivatives Trading COIN Futures WebSocket Market Streams
+ *
+ * The version of the OpenAPI document: 1.0.0
+ *
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+package com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.model;
+
+import com.binance.connector.client.common.websocket.dtos.BaseDTO;
+import com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.JSON;
+import com.google.gson.Gson;
+import com.google.gson.JsonElement;
+import com.google.gson.JsonObject;
+import com.google.gson.TypeAdapter;
+import com.google.gson.TypeAdapterFactory;
+import com.google.gson.annotations.SerializedName;
+import com.google.gson.reflect.TypeToken;
+import com.google.gson.stream.JsonReader;
+import com.google.gson.stream.JsonWriter;
+import jakarta.validation.constraints.*;
+import java.io.IOException;
+import java.nio.charset.StandardCharsets;
+import java.util.HashSet;
+import java.util.Map;
+import java.util.Objects;
+import java.util.Set;
+import java.util.TreeMap;
+import java.util.stream.Collectors;
+import org.hibernate.validator.constraints.*;
+
+/** Listenkeyexpired */
+@jakarta.annotation.Generated(
+ value = "org.openapitools.codegen.languages.JavaClientCodegen",
+ comments = "Generator version: 7.12.0")
+public class Listenkeyexpired extends BaseDTO {
+ public static final String SERIALIZED_NAME_E = "E";
+
+ @SerializedName(SERIALIZED_NAME_E)
+ @jakarta.annotation.Nullable
+ private Long E;
+
+ public static final String SERIALIZED_NAME_LISTEN_KEY = "listenKey";
+
+ @SerializedName(SERIALIZED_NAME_LISTEN_KEY)
+ @jakarta.annotation.Nullable
+ private String listenKey;
+
+ public Listenkeyexpired() {}
+
+ public Listenkeyexpired E(@jakarta.annotation.Nullable Long E) {
+ this.E = E;
+ return this;
+ }
+
+ /**
+ * Get E
+ *
+ * @return E
+ */
+ @jakarta.annotation.Nullable
+ public Long getE() {
+ return E;
+ }
+
+ public void setE(@jakarta.annotation.Nullable Long E) {
+ this.E = E;
+ }
+
+ public Listenkeyexpired listenKey(@jakarta.annotation.Nullable String listenKey) {
+ this.listenKey = listenKey;
+ return this;
+ }
+
+ /**
+ * Get listenKey
+ *
+ * @return listenKey
+ */
+ @jakarta.annotation.Nullable
+ public String getListenKey() {
+ return listenKey;
+ }
+
+ public void setListenKey(@jakarta.annotation.Nullable String listenKey) {
+ this.listenKey = listenKey;
+ }
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ Listenkeyexpired listenkeyexpired = (Listenkeyexpired) o;
+ return Objects.equals(this.E, listenkeyexpired.E)
+ && Objects.equals(this.listenKey, listenkeyexpired.listenKey);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(E, listenKey);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class Listenkeyexpired {\n");
+ sb.append(" E: ").append(toIndentedString(E)).append("\n");
+ sb.append(" listenKey: ").append(toIndentedString(listenKey)).append("\n");
+ sb.append("}");
+ return sb.toString();
+ }
+
+ public String toUrlQueryString() {
+ StringBuilder sb = new StringBuilder();
+ Map valMap = new TreeMap();
+ valMap.put("apiKey", getApiKey());
+ Long EValue = getE();
+ if (EValue != null) {
+ String EValueAsString = EValue.toString();
+ valMap.put("E", EValueAsString);
+ }
+ String listenKeyValue = getListenKey();
+ if (listenKeyValue != null) {
+ String listenKeyValueAsString = listenKeyValue.toString();
+ valMap.put("listenKey", listenKeyValueAsString);
+ }
+
+ valMap.put("timestamp", getTimestamp());
+ return asciiEncode(
+ valMap.keySet().stream()
+ .map(key -> key + "=" + valMap.get(key))
+ .collect(Collectors.joining("&")));
+ }
+
+ public Map toMap() {
+ Map valMap = new TreeMap();
+ valMap.put("apiKey", getApiKey());
+ Object EValue = getE();
+ if (EValue != null) {
+ valMap.put("E", EValue);
+ }
+ Object listenKeyValue = getListenKey();
+ if (listenKeyValue != null) {
+ valMap.put("listenKey", listenKeyValue);
+ }
+
+ valMap.put("timestamp", getTimestamp());
+ return valMap;
+ }
+
+ public static String asciiEncode(String s) {
+ return new String(s.getBytes(), StandardCharsets.US_ASCII);
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces (except the first
+ * line).
+ */
+ private String toIndentedString(Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+
+ public static HashSet openapiFields;
+ public static HashSet openapiRequiredFields;
+
+ static {
+ // a set of all properties/fields (JSON key names)
+ openapiFields = new HashSet();
+ openapiFields.add("E");
+ openapiFields.add("listenKey");
+
+ // a set of required properties/fields (JSON key names)
+ openapiRequiredFields = new HashSet();
+ }
+
+ /**
+ * Validates the JSON Element and throws an exception if issues found
+ *
+ * @param jsonElement JSON Element
+ * @throws IOException if the JSON Element is invalid with respect to Listenkeyexpired
+ */
+ public static void validateJsonElement(JsonElement jsonElement) throws IOException {
+ if (jsonElement == null) {
+ if (!Listenkeyexpired.openapiRequiredFields
+ .isEmpty()) { // has required fields but JSON element is null
+ throw new IllegalArgumentException(
+ String.format(
+ "The required field(s) %s in Listenkeyexpired is not found in the"
+ + " empty JSON string",
+ Listenkeyexpired.openapiRequiredFields.toString()));
+ }
+ }
+
+ Set> entries = jsonElement.getAsJsonObject().entrySet();
+ // check to see if the JSON string contains additional fields
+ for (Map.Entry entry : entries) {
+ if (!Listenkeyexpired.openapiFields.contains(entry.getKey())) {
+ throw new IllegalArgumentException(
+ String.format(
+ "The field `%s` in the JSON string is not defined in the"
+ + " `Listenkeyexpired` properties. JSON: %s",
+ entry.getKey(), jsonElement.toString()));
+ }
+ }
+ JsonObject jsonObj = jsonElement.getAsJsonObject();
+ if ((jsonObj.get("listenKey") != null && !jsonObj.get("listenKey").isJsonNull())
+ && !jsonObj.get("listenKey").isJsonPrimitive()) {
+ throw new IllegalArgumentException(
+ String.format(
+ "Expected the field `listenKey` to be a primitive type in the JSON"
+ + " string but got `%s`",
+ jsonObj.get("listenKey").toString()));
+ }
+ }
+
+ public static class CustomTypeAdapterFactory implements TypeAdapterFactory {
+ @SuppressWarnings("unchecked")
+ @Override
+ public TypeAdapter create(Gson gson, TypeToken type) {
+ if (!Listenkeyexpired.class.isAssignableFrom(type.getRawType())) {
+ return null; // this class only serializes 'Listenkeyexpired' and its subtypes
+ }
+ final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class);
+ final TypeAdapter thisAdapter =
+ gson.getDelegateAdapter(this, TypeToken.get(Listenkeyexpired.class));
+
+ return (TypeAdapter)
+ new TypeAdapter() {
+ @Override
+ public void write(JsonWriter out, Listenkeyexpired value)
+ throws IOException {
+ JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonObject();
+ elementAdapter.write(out, obj);
+ }
+
+ @Override
+ public Listenkeyexpired read(JsonReader in) throws IOException {
+ JsonElement jsonElement = elementAdapter.read(in);
+ // validateJsonElement(jsonElement);
+ return thisAdapter.fromJsonTree(jsonElement);
+ }
+ }.nullSafe();
+ }
+ }
+
+ /**
+ * Create an instance of Listenkeyexpired given an JSON string
+ *
+ * @param jsonString JSON string
+ * @return An instance of Listenkeyexpired
+ * @throws IOException if the JSON string is invalid with respect to Listenkeyexpired
+ */
+ public static Listenkeyexpired fromJson(String jsonString) throws IOException {
+ return JSON.getGson().fromJson(jsonString, Listenkeyexpired.class);
+ }
+
+ /**
+ * Convert an instance of Listenkeyexpired to an JSON string
+ *
+ * @return JSON string
+ */
+ public String toJson() {
+ return JSON.getGson().toJson(this);
+ }
+}
diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/MarginCall.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/MarginCall.java
new file mode 100644
index 00000000..06773496
--- /dev/null
+++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/MarginCall.java
@@ -0,0 +1,392 @@
+/*
+ * Binance Derivatives Trading COIN Futures WebSocket Market Streams
+ * OpenAPI Specification for the Binance Derivatives Trading COIN Futures WebSocket Market Streams
+ *
+ * The version of the OpenAPI document: 1.0.0
+ *
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+package com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.model;
+
+import com.binance.connector.client.common.websocket.dtos.BaseDTO;
+import com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.JSON;
+import com.google.gson.Gson;
+import com.google.gson.JsonArray;
+import com.google.gson.JsonElement;
+import com.google.gson.JsonObject;
+import com.google.gson.TypeAdapter;
+import com.google.gson.TypeAdapterFactory;
+import com.google.gson.annotations.SerializedName;
+import com.google.gson.reflect.TypeToken;
+import com.google.gson.stream.JsonReader;
+import com.google.gson.stream.JsonWriter;
+import jakarta.validation.Valid;
+import jakarta.validation.constraints.*;
+import java.io.IOException;
+import java.nio.charset.StandardCharsets;
+import java.util.ArrayList;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Objects;
+import java.util.Set;
+import java.util.TreeMap;
+import java.util.stream.Collectors;
+import org.hibernate.validator.constraints.*;
+
+/** MarginCall */
+@jakarta.annotation.Generated(
+ value = "org.openapitools.codegen.languages.JavaClientCodegen",
+ comments = "Generator version: 7.12.0")
+public class MarginCall extends BaseDTO {
+ public static final String SERIALIZED_NAME_E = "E";
+
+ @SerializedName(SERIALIZED_NAME_E)
+ @jakarta.annotation.Nullable
+ private Long E;
+
+ public static final String SERIALIZED_NAME_I_LOWER_CASE = "i";
+
+ @SerializedName(SERIALIZED_NAME_I_LOWER_CASE)
+ @jakarta.annotation.Nullable
+ private String iLowerCase;
+
+ public static final String SERIALIZED_NAME_CW = "cw";
+
+ @SerializedName(SERIALIZED_NAME_CW)
+ @jakarta.annotation.Nullable
+ private String cw;
+
+ public static final String SERIALIZED_NAME_P_LOWER_CASE = "p";
+
+ @SerializedName(SERIALIZED_NAME_P_LOWER_CASE)
+ @jakarta.annotation.Nullable
+ private List<@Valid MarginCallPInner> pLowerCase;
+
+ public MarginCall() {}
+
+ public MarginCall E(@jakarta.annotation.Nullable Long E) {
+ this.E = E;
+ return this;
+ }
+
+ /**
+ * Get E
+ *
+ * @return E
+ */
+ @jakarta.annotation.Nullable
+ public Long getE() {
+ return E;
+ }
+
+ public void setE(@jakarta.annotation.Nullable Long E) {
+ this.E = E;
+ }
+
+ public MarginCall iLowerCase(@jakarta.annotation.Nullable String iLowerCase) {
+ this.iLowerCase = iLowerCase;
+ return this;
+ }
+
+ /**
+ * Get iLowerCase
+ *
+ * @return iLowerCase
+ */
+ @jakarta.annotation.Nullable
+ public String getiLowerCase() {
+ return iLowerCase;
+ }
+
+ public void setiLowerCase(@jakarta.annotation.Nullable String iLowerCase) {
+ this.iLowerCase = iLowerCase;
+ }
+
+ public MarginCall cw(@jakarta.annotation.Nullable String cw) {
+ this.cw = cw;
+ return this;
+ }
+
+ /**
+ * Get cw
+ *
+ * @return cw
+ */
+ @jakarta.annotation.Nullable
+ public String getCw() {
+ return cw;
+ }
+
+ public void setCw(@jakarta.annotation.Nullable String cw) {
+ this.cw = cw;
+ }
+
+ public MarginCall pLowerCase(
+ @jakarta.annotation.Nullable List<@Valid MarginCallPInner> pLowerCase) {
+ this.pLowerCase = pLowerCase;
+ return this;
+ }
+
+ public MarginCall addPLowerCaseItem(MarginCallPInner pLowerCaseItem) {
+ if (this.pLowerCase == null) {
+ this.pLowerCase = new ArrayList<>();
+ }
+ this.pLowerCase.add(pLowerCaseItem);
+ return this;
+ }
+
+ /**
+ * Get pLowerCase
+ *
+ * @return pLowerCase
+ */
+ @jakarta.annotation.Nullable
+ @Valid
+ public List<@Valid MarginCallPInner> getpLowerCase() {
+ return pLowerCase;
+ }
+
+ public void setpLowerCase(
+ @jakarta.annotation.Nullable List<@Valid MarginCallPInner> pLowerCase) {
+ this.pLowerCase = pLowerCase;
+ }
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ MarginCall marginCall = (MarginCall) o;
+ return Objects.equals(this.E, marginCall.E)
+ && Objects.equals(this.iLowerCase, marginCall.iLowerCase)
+ && Objects.equals(this.cw, marginCall.cw)
+ && Objects.equals(this.pLowerCase, marginCall.pLowerCase);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(E, iLowerCase, cw, pLowerCase);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class MarginCall {\n");
+ sb.append(" E: ").append(toIndentedString(E)).append("\n");
+ sb.append(" iLowerCase: ").append(toIndentedString(iLowerCase)).append("\n");
+ sb.append(" cw: ").append(toIndentedString(cw)).append("\n");
+ sb.append(" pLowerCase: ").append(toIndentedString(pLowerCase)).append("\n");
+ sb.append("}");
+ return sb.toString();
+ }
+
+ public String toUrlQueryString() {
+ StringBuilder sb = new StringBuilder();
+ Map valMap = new TreeMap();
+ valMap.put("apiKey", getApiKey());
+ Long EValue = getE();
+ if (EValue != null) {
+ String EValueAsString = EValue.toString();
+ valMap.put("E", EValueAsString);
+ }
+ String iLowerCaseValue = getiLowerCase();
+ if (iLowerCaseValue != null) {
+ String iLowerCaseValueAsString = iLowerCaseValue.toString();
+ valMap.put("iLowerCase", iLowerCaseValueAsString);
+ }
+ String cwValue = getCw();
+ if (cwValue != null) {
+ String cwValueAsString = cwValue.toString();
+ valMap.put("cw", cwValueAsString);
+ }
+ List<@Valid MarginCallPInner> pLowerCaseValue = getpLowerCase();
+ if (pLowerCaseValue != null) {
+ String pLowerCaseValueAsString = JSON.getGson().toJson(pLowerCaseValue);
+ valMap.put("pLowerCase", pLowerCaseValueAsString);
+ }
+
+ valMap.put("timestamp", getTimestamp());
+ return asciiEncode(
+ valMap.keySet().stream()
+ .map(key -> key + "=" + valMap.get(key))
+ .collect(Collectors.joining("&")));
+ }
+
+ public Map toMap() {
+ Map valMap = new TreeMap();
+ valMap.put("apiKey", getApiKey());
+ Object EValue = getE();
+ if (EValue != null) {
+ valMap.put("E", EValue);
+ }
+ Object iLowerCaseValue = getiLowerCase();
+ if (iLowerCaseValue != null) {
+ valMap.put("iLowerCase", iLowerCaseValue);
+ }
+ Object cwValue = getCw();
+ if (cwValue != null) {
+ valMap.put("cw", cwValue);
+ }
+ Object pLowerCaseValue = getpLowerCase();
+ if (pLowerCaseValue != null) {
+ valMap.put("pLowerCase", pLowerCaseValue);
+ }
+
+ valMap.put("timestamp", getTimestamp());
+ return valMap;
+ }
+
+ public static String asciiEncode(String s) {
+ return new String(s.getBytes(), StandardCharsets.US_ASCII);
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces (except the first
+ * line).
+ */
+ private String toIndentedString(Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+
+ public static HashSet openapiFields;
+ public static HashSet openapiRequiredFields;
+
+ static {
+ // a set of all properties/fields (JSON key names)
+ openapiFields = new HashSet();
+ openapiFields.add("E");
+ openapiFields.add("i");
+ openapiFields.add("cw");
+ openapiFields.add("p");
+
+ // a set of required properties/fields (JSON key names)
+ openapiRequiredFields = new HashSet();
+ }
+
+ /**
+ * Validates the JSON Element and throws an exception if issues found
+ *
+ * @param jsonElement JSON Element
+ * @throws IOException if the JSON Element is invalid with respect to MarginCall
+ */
+ public static void validateJsonElement(JsonElement jsonElement) throws IOException {
+ if (jsonElement == null) {
+ if (!MarginCall.openapiRequiredFields
+ .isEmpty()) { // has required fields but JSON element is null
+ throw new IllegalArgumentException(
+ String.format(
+ "The required field(s) %s in MarginCall is not found in the empty"
+ + " JSON string",
+ MarginCall.openapiRequiredFields.toString()));
+ }
+ }
+
+ Set> entries = jsonElement.getAsJsonObject().entrySet();
+ // check to see if the JSON string contains additional fields
+ for (Map.Entry entry : entries) {
+ if (!MarginCall.openapiFields.contains(entry.getKey())) {
+ throw new IllegalArgumentException(
+ String.format(
+ "The field `%s` in the JSON string is not defined in the"
+ + " `MarginCall` properties. JSON: %s",
+ entry.getKey(), jsonElement.toString()));
+ }
+ }
+ JsonObject jsonObj = jsonElement.getAsJsonObject();
+ if ((jsonObj.get("i") != null && !jsonObj.get("i").isJsonNull())
+ && !jsonObj.get("i").isJsonPrimitive()) {
+ throw new IllegalArgumentException(
+ String.format(
+ "Expected the field `i` to be a primitive type in the JSON string but"
+ + " got `%s`",
+ jsonObj.get("i").toString()));
+ }
+ if ((jsonObj.get("cw") != null && !jsonObj.get("cw").isJsonNull())
+ && !jsonObj.get("cw").isJsonPrimitive()) {
+ throw new IllegalArgumentException(
+ String.format(
+ "Expected the field `cw` to be a primitive type in the JSON string but"
+ + " got `%s`",
+ jsonObj.get("cw").toString()));
+ }
+ if (jsonObj.get("p") != null && !jsonObj.get("p").isJsonNull()) {
+ JsonArray jsonArraypLowerCase = jsonObj.getAsJsonArray("p");
+ if (jsonArraypLowerCase != null) {
+ // ensure the json data is an array
+ if (!jsonObj.get("p").isJsonArray()) {
+ throw new IllegalArgumentException(
+ String.format(
+ "Expected the field `p` to be an array in the JSON string but"
+ + " got `%s`",
+ jsonObj.get("p").toString()));
+ }
+
+ // validate the optional field `p` (array)
+ for (int i = 0; i < jsonArraypLowerCase.size(); i++) {
+ MarginCallPInner.validateJsonElement(jsonArraypLowerCase.get(i));
+ }
+ ;
+ }
+ }
+ }
+
+ public static class CustomTypeAdapterFactory implements TypeAdapterFactory {
+ @SuppressWarnings("unchecked")
+ @Override
+ public TypeAdapter create(Gson gson, TypeToken type) {
+ if (!MarginCall.class.isAssignableFrom(type.getRawType())) {
+ return null; // this class only serializes 'MarginCall' and its subtypes
+ }
+ final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class);
+ final TypeAdapter thisAdapter =
+ gson.getDelegateAdapter(this, TypeToken.get(MarginCall.class));
+
+ return (TypeAdapter)
+ new TypeAdapter() {
+ @Override
+ public void write(JsonWriter out, MarginCall value) throws IOException {
+ JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonObject();
+ elementAdapter.write(out, obj);
+ }
+
+ @Override
+ public MarginCall read(JsonReader in) throws IOException {
+ JsonElement jsonElement = elementAdapter.read(in);
+ // validateJsonElement(jsonElement);
+ return thisAdapter.fromJsonTree(jsonElement);
+ }
+ }.nullSafe();
+ }
+ }
+
+ /**
+ * Create an instance of MarginCall given an JSON string
+ *
+ * @param jsonString JSON string
+ * @return An instance of MarginCall
+ * @throws IOException if the JSON string is invalid with respect to MarginCall
+ */
+ public static MarginCall fromJson(String jsonString) throws IOException {
+ return JSON.getGson().fromJson(jsonString, MarginCall.class);
+ }
+
+ /**
+ * Convert an instance of MarginCall to an JSON string
+ *
+ * @return JSON string
+ */
+ public String toJson() {
+ return JSON.getGson().toJson(this);
+ }
+}
diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/MarginCallPInner.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/MarginCallPInner.java
new file mode 100644
index 00000000..5411dc34
--- /dev/null
+++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/MarginCallPInner.java
@@ -0,0 +1,555 @@
+/*
+ * Binance Derivatives Trading COIN Futures WebSocket Market Streams
+ * OpenAPI Specification for the Binance Derivatives Trading COIN Futures WebSocket Market Streams
+ *
+ * The version of the OpenAPI document: 1.0.0
+ *
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+package com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.model;
+
+import com.binance.connector.client.common.websocket.dtos.BaseDTO;
+import com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.JSON;
+import com.google.gson.Gson;
+import com.google.gson.JsonElement;
+import com.google.gson.JsonObject;
+import com.google.gson.TypeAdapter;
+import com.google.gson.TypeAdapterFactory;
+import com.google.gson.annotations.SerializedName;
+import com.google.gson.reflect.TypeToken;
+import com.google.gson.stream.JsonReader;
+import com.google.gson.stream.JsonWriter;
+import jakarta.validation.constraints.*;
+import java.io.IOException;
+import java.nio.charset.StandardCharsets;
+import java.util.HashSet;
+import java.util.Map;
+import java.util.Objects;
+import java.util.Set;
+import java.util.TreeMap;
+import java.util.stream.Collectors;
+import org.hibernate.validator.constraints.*;
+
+/** MarginCallPInner */
+@jakarta.annotation.Generated(
+ value = "org.openapitools.codegen.languages.JavaClientCodegen",
+ comments = "Generator version: 7.12.0")
+public class MarginCallPInner extends BaseDTO {
+ public static final String SERIALIZED_NAME_S_LOWER_CASE = "s";
+
+ @SerializedName(SERIALIZED_NAME_S_LOWER_CASE)
+ @jakarta.annotation.Nullable
+ private String sLowerCase;
+
+ public static final String SERIALIZED_NAME_PS = "ps";
+
+ @SerializedName(SERIALIZED_NAME_PS)
+ @jakarta.annotation.Nullable
+ private String ps;
+
+ public static final String SERIALIZED_NAME_PA = "pa";
+
+ @SerializedName(SERIALIZED_NAME_PA)
+ @jakarta.annotation.Nullable
+ private String pa;
+
+ public static final String SERIALIZED_NAME_MT = "mt";
+
+ @SerializedName(SERIALIZED_NAME_MT)
+ @jakarta.annotation.Nullable
+ private String mt;
+
+ public static final String SERIALIZED_NAME_IW = "iw";
+
+ @SerializedName(SERIALIZED_NAME_IW)
+ @jakarta.annotation.Nullable
+ private String iw;
+
+ public static final String SERIALIZED_NAME_MP = "mp";
+
+ @SerializedName(SERIALIZED_NAME_MP)
+ @jakarta.annotation.Nullable
+ private String mp;
+
+ public static final String SERIALIZED_NAME_UP = "up";
+
+ @SerializedName(SERIALIZED_NAME_UP)
+ @jakarta.annotation.Nullable
+ private String up;
+
+ public static final String SERIALIZED_NAME_MM = "mm";
+
+ @SerializedName(SERIALIZED_NAME_MM)
+ @jakarta.annotation.Nullable
+ private String mm;
+
+ public MarginCallPInner() {}
+
+ public MarginCallPInner sLowerCase(@jakarta.annotation.Nullable String sLowerCase) {
+ this.sLowerCase = sLowerCase;
+ return this;
+ }
+
+ /**
+ * Get sLowerCase
+ *
+ * @return sLowerCase
+ */
+ @jakarta.annotation.Nullable
+ public String getsLowerCase() {
+ return sLowerCase;
+ }
+
+ public void setsLowerCase(@jakarta.annotation.Nullable String sLowerCase) {
+ this.sLowerCase = sLowerCase;
+ }
+
+ public MarginCallPInner ps(@jakarta.annotation.Nullable String ps) {
+ this.ps = ps;
+ return this;
+ }
+
+ /**
+ * Get ps
+ *
+ * @return ps
+ */
+ @jakarta.annotation.Nullable
+ public String getPs() {
+ return ps;
+ }
+
+ public void setPs(@jakarta.annotation.Nullable String ps) {
+ this.ps = ps;
+ }
+
+ public MarginCallPInner pa(@jakarta.annotation.Nullable String pa) {
+ this.pa = pa;
+ return this;
+ }
+
+ /**
+ * Get pa
+ *
+ * @return pa
+ */
+ @jakarta.annotation.Nullable
+ public String getPa() {
+ return pa;
+ }
+
+ public void setPa(@jakarta.annotation.Nullable String pa) {
+ this.pa = pa;
+ }
+
+ public MarginCallPInner mt(@jakarta.annotation.Nullable String mt) {
+ this.mt = mt;
+ return this;
+ }
+
+ /**
+ * Get mt
+ *
+ * @return mt
+ */
+ @jakarta.annotation.Nullable
+ public String getMt() {
+ return mt;
+ }
+
+ public void setMt(@jakarta.annotation.Nullable String mt) {
+ this.mt = mt;
+ }
+
+ public MarginCallPInner iw(@jakarta.annotation.Nullable String iw) {
+ this.iw = iw;
+ return this;
+ }
+
+ /**
+ * Get iw
+ *
+ * @return iw
+ */
+ @jakarta.annotation.Nullable
+ public String getIw() {
+ return iw;
+ }
+
+ public void setIw(@jakarta.annotation.Nullable String iw) {
+ this.iw = iw;
+ }
+
+ public MarginCallPInner mp(@jakarta.annotation.Nullable String mp) {
+ this.mp = mp;
+ return this;
+ }
+
+ /**
+ * Get mp
+ *
+ * @return mp
+ */
+ @jakarta.annotation.Nullable
+ public String getMp() {
+ return mp;
+ }
+
+ public void setMp(@jakarta.annotation.Nullable String mp) {
+ this.mp = mp;
+ }
+
+ public MarginCallPInner up(@jakarta.annotation.Nullable String up) {
+ this.up = up;
+ return this;
+ }
+
+ /**
+ * Get up
+ *
+ * @return up
+ */
+ @jakarta.annotation.Nullable
+ public String getUp() {
+ return up;
+ }
+
+ public void setUp(@jakarta.annotation.Nullable String up) {
+ this.up = up;
+ }
+
+ public MarginCallPInner mm(@jakarta.annotation.Nullable String mm) {
+ this.mm = mm;
+ return this;
+ }
+
+ /**
+ * Get mm
+ *
+ * @return mm
+ */
+ @jakarta.annotation.Nullable
+ public String getMm() {
+ return mm;
+ }
+
+ public void setMm(@jakarta.annotation.Nullable String mm) {
+ this.mm = mm;
+ }
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ MarginCallPInner marginCallPInner = (MarginCallPInner) o;
+ return Objects.equals(this.sLowerCase, marginCallPInner.sLowerCase)
+ && Objects.equals(this.ps, marginCallPInner.ps)
+ && Objects.equals(this.pa, marginCallPInner.pa)
+ && Objects.equals(this.mt, marginCallPInner.mt)
+ && Objects.equals(this.iw, marginCallPInner.iw)
+ && Objects.equals(this.mp, marginCallPInner.mp)
+ && Objects.equals(this.up, marginCallPInner.up)
+ && Objects.equals(this.mm, marginCallPInner.mm);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(sLowerCase, ps, pa, mt, iw, mp, up, mm);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class MarginCallPInner {\n");
+ sb.append(" sLowerCase: ").append(toIndentedString(sLowerCase)).append("\n");
+ sb.append(" ps: ").append(toIndentedString(ps)).append("\n");
+ sb.append(" pa: ").append(toIndentedString(pa)).append("\n");
+ sb.append(" mt: ").append(toIndentedString(mt)).append("\n");
+ sb.append(" iw: ").append(toIndentedString(iw)).append("\n");
+ sb.append(" mp: ").append(toIndentedString(mp)).append("\n");
+ sb.append(" up: ").append(toIndentedString(up)).append("\n");
+ sb.append(" mm: ").append(toIndentedString(mm)).append("\n");
+ sb.append("}");
+ return sb.toString();
+ }
+
+ public String toUrlQueryString() {
+ StringBuilder sb = new StringBuilder();
+ Map valMap = new TreeMap();
+ valMap.put("apiKey", getApiKey());
+ String sLowerCaseValue = getsLowerCase();
+ if (sLowerCaseValue != null) {
+ String sLowerCaseValueAsString = sLowerCaseValue.toString();
+ valMap.put("sLowerCase", sLowerCaseValueAsString);
+ }
+ String psValue = getPs();
+ if (psValue != null) {
+ String psValueAsString = psValue.toString();
+ valMap.put("ps", psValueAsString);
+ }
+ String paValue = getPa();
+ if (paValue != null) {
+ String paValueAsString = paValue.toString();
+ valMap.put("pa", paValueAsString);
+ }
+ String mtValue = getMt();
+ if (mtValue != null) {
+ String mtValueAsString = mtValue.toString();
+ valMap.put("mt", mtValueAsString);
+ }
+ String iwValue = getIw();
+ if (iwValue != null) {
+ String iwValueAsString = iwValue.toString();
+ valMap.put("iw", iwValueAsString);
+ }
+ String mpValue = getMp();
+ if (mpValue != null) {
+ String mpValueAsString = mpValue.toString();
+ valMap.put("mp", mpValueAsString);
+ }
+ String upValue = getUp();
+ if (upValue != null) {
+ String upValueAsString = upValue.toString();
+ valMap.put("up", upValueAsString);
+ }
+ String mmValue = getMm();
+ if (mmValue != null) {
+ String mmValueAsString = mmValue.toString();
+ valMap.put("mm", mmValueAsString);
+ }
+
+ valMap.put("timestamp", getTimestamp());
+ return asciiEncode(
+ valMap.keySet().stream()
+ .map(key -> key + "=" + valMap.get(key))
+ .collect(Collectors.joining("&")));
+ }
+
+ public Map toMap() {
+ Map valMap = new TreeMap();
+ valMap.put("apiKey", getApiKey());
+ Object sLowerCaseValue = getsLowerCase();
+ if (sLowerCaseValue != null) {
+ valMap.put("sLowerCase", sLowerCaseValue);
+ }
+ Object psValue = getPs();
+ if (psValue != null) {
+ valMap.put("ps", psValue);
+ }
+ Object paValue = getPa();
+ if (paValue != null) {
+ valMap.put("pa", paValue);
+ }
+ Object mtValue = getMt();
+ if (mtValue != null) {
+ valMap.put("mt", mtValue);
+ }
+ Object iwValue = getIw();
+ if (iwValue != null) {
+ valMap.put("iw", iwValue);
+ }
+ Object mpValue = getMp();
+ if (mpValue != null) {
+ valMap.put("mp", mpValue);
+ }
+ Object upValue = getUp();
+ if (upValue != null) {
+ valMap.put("up", upValue);
+ }
+ Object mmValue = getMm();
+ if (mmValue != null) {
+ valMap.put("mm", mmValue);
+ }
+
+ valMap.put("timestamp", getTimestamp());
+ return valMap;
+ }
+
+ public static String asciiEncode(String s) {
+ return new String(s.getBytes(), StandardCharsets.US_ASCII);
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces (except the first
+ * line).
+ */
+ private String toIndentedString(Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+
+ public static HashSet openapiFields;
+ public static HashSet openapiRequiredFields;
+
+ static {
+ // a set of all properties/fields (JSON key names)
+ openapiFields = new HashSet();
+ openapiFields.add("s");
+ openapiFields.add("ps");
+ openapiFields.add("pa");
+ openapiFields.add("mt");
+ openapiFields.add("iw");
+ openapiFields.add("mp");
+ openapiFields.add("up");
+ openapiFields.add("mm");
+
+ // a set of required properties/fields (JSON key names)
+ openapiRequiredFields = new HashSet();
+ }
+
+ /**
+ * Validates the JSON Element and throws an exception if issues found
+ *
+ * @param jsonElement JSON Element
+ * @throws IOException if the JSON Element is invalid with respect to MarginCallPInner
+ */
+ public static void validateJsonElement(JsonElement jsonElement) throws IOException {
+ if (jsonElement == null) {
+ if (!MarginCallPInner.openapiRequiredFields
+ .isEmpty()) { // has required fields but JSON element is null
+ throw new IllegalArgumentException(
+ String.format(
+ "The required field(s) %s in MarginCallPInner is not found in the"
+ + " empty JSON string",
+ MarginCallPInner.openapiRequiredFields.toString()));
+ }
+ }
+
+ Set> entries = jsonElement.getAsJsonObject().entrySet();
+ // check to see if the JSON string contains additional fields
+ for (Map.Entry entry : entries) {
+ if (!MarginCallPInner.openapiFields.contains(entry.getKey())) {
+ throw new IllegalArgumentException(
+ String.format(
+ "The field `%s` in the JSON string is not defined in the"
+ + " `MarginCallPInner` properties. JSON: %s",
+ entry.getKey(), jsonElement.toString()));
+ }
+ }
+ JsonObject jsonObj = jsonElement.getAsJsonObject();
+ if ((jsonObj.get("s") != null && !jsonObj.get("s").isJsonNull())
+ && !jsonObj.get("s").isJsonPrimitive()) {
+ throw new IllegalArgumentException(
+ String.format(
+ "Expected the field `s` to be a primitive type in the JSON string but"
+ + " got `%s`",
+ jsonObj.get("s").toString()));
+ }
+ if ((jsonObj.get("ps") != null && !jsonObj.get("ps").isJsonNull())
+ && !jsonObj.get("ps").isJsonPrimitive()) {
+ throw new IllegalArgumentException(
+ String.format(
+ "Expected the field `ps` to be a primitive type in the JSON string but"
+ + " got `%s`",
+ jsonObj.get("ps").toString()));
+ }
+ if ((jsonObj.get("pa") != null && !jsonObj.get("pa").isJsonNull())
+ && !jsonObj.get("pa").isJsonPrimitive()) {
+ throw new IllegalArgumentException(
+ String.format(
+ "Expected the field `pa` to be a primitive type in the JSON string but"
+ + " got `%s`",
+ jsonObj.get("pa").toString()));
+ }
+ if ((jsonObj.get("mt") != null && !jsonObj.get("mt").isJsonNull())
+ && !jsonObj.get("mt").isJsonPrimitive()) {
+ throw new IllegalArgumentException(
+ String.format(
+ "Expected the field `mt` to be a primitive type in the JSON string but"
+ + " got `%s`",
+ jsonObj.get("mt").toString()));
+ }
+ if ((jsonObj.get("iw") != null && !jsonObj.get("iw").isJsonNull())
+ && !jsonObj.get("iw").isJsonPrimitive()) {
+ throw new IllegalArgumentException(
+ String.format(
+ "Expected the field `iw` to be a primitive type in the JSON string but"
+ + " got `%s`",
+ jsonObj.get("iw").toString()));
+ }
+ if ((jsonObj.get("mp") != null && !jsonObj.get("mp").isJsonNull())
+ && !jsonObj.get("mp").isJsonPrimitive()) {
+ throw new IllegalArgumentException(
+ String.format(
+ "Expected the field `mp` to be a primitive type in the JSON string but"
+ + " got `%s`",
+ jsonObj.get("mp").toString()));
+ }
+ if ((jsonObj.get("up") != null && !jsonObj.get("up").isJsonNull())
+ && !jsonObj.get("up").isJsonPrimitive()) {
+ throw new IllegalArgumentException(
+ String.format(
+ "Expected the field `up` to be a primitive type in the JSON string but"
+ + " got `%s`",
+ jsonObj.get("up").toString()));
+ }
+ if ((jsonObj.get("mm") != null && !jsonObj.get("mm").isJsonNull())
+ && !jsonObj.get("mm").isJsonPrimitive()) {
+ throw new IllegalArgumentException(
+ String.format(
+ "Expected the field `mm` to be a primitive type in the JSON string but"
+ + " got `%s`",
+ jsonObj.get("mm").toString()));
+ }
+ }
+
+ public static class CustomTypeAdapterFactory implements TypeAdapterFactory {
+ @SuppressWarnings("unchecked")
+ @Override
+ public TypeAdapter create(Gson gson, TypeToken type) {
+ if (!MarginCallPInner.class.isAssignableFrom(type.getRawType())) {
+ return null; // this class only serializes 'MarginCallPInner' and its subtypes
+ }
+ final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class);
+ final TypeAdapter thisAdapter =
+ gson.getDelegateAdapter(this, TypeToken.get(MarginCallPInner.class));
+
+ return (TypeAdapter)
+ new TypeAdapter() {
+ @Override
+ public void write(JsonWriter out, MarginCallPInner value)
+ throws IOException {
+ JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonObject();
+ elementAdapter.write(out, obj);
+ }
+
+ @Override
+ public MarginCallPInner read(JsonReader in) throws IOException {
+ JsonElement jsonElement = elementAdapter.read(in);
+ // validateJsonElement(jsonElement);
+ return thisAdapter.fromJsonTree(jsonElement);
+ }
+ }.nullSafe();
+ }
+ }
+
+ /**
+ * Create an instance of MarginCallPInner given an JSON string
+ *
+ * @param jsonString JSON string
+ * @return An instance of MarginCallPInner
+ * @throws IOException if the JSON string is invalid with respect to MarginCallPInner
+ */
+ public static MarginCallPInner fromJson(String jsonString) throws IOException {
+ return JSON.getGson().fromJson(jsonString, MarginCallPInner.class);
+ }
+
+ /**
+ * Convert an instance of MarginCallPInner to an JSON string
+ *
+ * @return JSON string
+ */
+ public String toJson() {
+ return JSON.getGson().toJson(this);
+ }
+}
diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/OrderTradeUpdate.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/OrderTradeUpdate.java
new file mode 100644
index 00000000..675563de
--- /dev/null
+++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/model/OrderTradeUpdate.java
@@ -0,0 +1,357 @@
+/*
+ * Binance Derivatives Trading COIN Futures WebSocket Market Streams
+ * OpenAPI Specification for the Binance Derivatives Trading COIN Futures WebSocket Market Streams
+ *
+ * The version of the OpenAPI document: 1.0.0
+ *
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+package com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.model;
+
+import com.binance.connector.client.common.websocket.dtos.BaseDTO;
+import com.binance.connector.client.derivatives_trading_coin_futures.websocket.stream.JSON;
+import com.google.gson.Gson;
+import com.google.gson.JsonElement;
+import com.google.gson.JsonObject;
+import com.google.gson.TypeAdapter;
+import com.google.gson.TypeAdapterFactory;
+import com.google.gson.annotations.SerializedName;
+import com.google.gson.reflect.TypeToken;
+import com.google.gson.stream.JsonReader;
+import com.google.gson.stream.JsonWriter;
+import jakarta.validation.Valid;
+import jakarta.validation.constraints.*;
+import java.io.IOException;
+import java.nio.charset.StandardCharsets;
+import java.util.HashSet;
+import java.util.Map;
+import java.util.Objects;
+import java.util.Set;
+import java.util.TreeMap;
+import java.util.stream.Collectors;
+import org.hibernate.validator.constraints.*;
+
+/** OrderTradeUpdate */
+@jakarta.annotation.Generated(
+ value = "org.openapitools.codegen.languages.JavaClientCodegen",
+ comments = "Generator version: 7.12.0")
+public class OrderTradeUpdate extends BaseDTO {
+ public static final String SERIALIZED_NAME_E = "E";
+
+ @SerializedName(SERIALIZED_NAME_E)
+ @jakarta.annotation.Nullable
+ private Long E;
+
+ public static final String SERIALIZED_NAME_T = "T";
+
+ @SerializedName(SERIALIZED_NAME_T)
+ @jakarta.annotation.Nullable
+ private Long T;
+
+ public static final String SERIALIZED_NAME_I_LOWER_CASE = "i";
+
+ @SerializedName(SERIALIZED_NAME_I_LOWER_CASE)
+ @jakarta.annotation.Nullable
+ private String iLowerCase;
+
+ public static final String SERIALIZED_NAME_O_LOWER_CASE = "o";
+
+ @SerializedName(SERIALIZED_NAME_O_LOWER_CASE)
+ @jakarta.annotation.Nullable
+ private OrderTradeUpdateO oLowerCase;
+
+ public OrderTradeUpdate() {}
+
+ public OrderTradeUpdate E(@jakarta.annotation.Nullable Long E) {
+ this.E = E;
+ return this;
+ }
+
+ /**
+ * Get E
+ *
+ * @return E
+ */
+ @jakarta.annotation.Nullable
+ public Long getE() {
+ return E;
+ }
+
+ public void setE(@jakarta.annotation.Nullable Long E) {
+ this.E = E;
+ }
+
+ public OrderTradeUpdate T(@jakarta.annotation.Nullable Long T) {
+ this.T = T;
+ return this;
+ }
+
+ /**
+ * Get T
+ *
+ * @return T
+ */
+ @jakarta.annotation.Nullable
+ public Long getT() {
+ return T;
+ }
+
+ public void setT(@jakarta.annotation.Nullable Long T) {
+ this.T = T;
+ }
+
+ public OrderTradeUpdate iLowerCase(@jakarta.annotation.Nullable String iLowerCase) {
+ this.iLowerCase = iLowerCase;
+ return this;
+ }
+
+ /**
+ * Get iLowerCase
+ *
+ * @return iLowerCase
+ */
+ @jakarta.annotation.Nullable
+ public String getiLowerCase() {
+ return iLowerCase;
+ }
+
+ public void setiLowerCase(@jakarta.annotation.Nullable String iLowerCase) {
+ this.iLowerCase = iLowerCase;
+ }
+
+ public OrderTradeUpdate oLowerCase(@jakarta.annotation.Nullable OrderTradeUpdateO oLowerCase) {
+ this.oLowerCase = oLowerCase;
+ return this;
+ }
+
+ /**
+ * Get oLowerCase
+ *
+ * @return oLowerCase
+ */
+ @jakarta.annotation.Nullable
+ @Valid
+ public OrderTradeUpdateO getoLowerCase() {
+ return oLowerCase;
+ }
+
+ public void setoLowerCase(@jakarta.annotation.Nullable OrderTradeUpdateO oLowerCase) {
+ this.oLowerCase = oLowerCase;
+ }
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ OrderTradeUpdate orderTradeUpdate = (OrderTradeUpdate) o;
+ return Objects.equals(this.E, orderTradeUpdate.E)
+ && Objects.equals(this.T, orderTradeUpdate.T)
+ && Objects.equals(this.iLowerCase, orderTradeUpdate.iLowerCase)
+ && Objects.equals(this.oLowerCase, orderTradeUpdate.oLowerCase);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(E, T, iLowerCase, oLowerCase);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class OrderTradeUpdate {\n");
+ sb.append(" E: ").append(toIndentedString(E)).append("\n");
+ sb.append(" T: ").append(toIndentedString(T)).append("\n");
+ sb.append(" iLowerCase: ").append(toIndentedString(iLowerCase)).append("\n");
+ sb.append(" oLowerCase: ").append(toIndentedString(oLowerCase)).append("\n");
+ sb.append("}");
+ return sb.toString();
+ }
+
+ public String toUrlQueryString() {
+ StringBuilder sb = new StringBuilder();
+ Map valMap = new TreeMap();
+ valMap.put("apiKey", getApiKey());
+ Long EValue = getE();
+ if (EValue != null) {
+ String EValueAsString = EValue.toString();
+ valMap.put("E", EValueAsString);
+ }
+ Long TValue = getT();
+ if (TValue != null) {
+ String TValueAsString = TValue.toString();
+ valMap.put("T", TValueAsString);
+ }
+ String iLowerCaseValue = getiLowerCase();
+ if (iLowerCaseValue != null) {
+ String iLowerCaseValueAsString = iLowerCaseValue.toString();
+ valMap.put("iLowerCase", iLowerCaseValueAsString);
+ }
+ OrderTradeUpdateO oLowerCaseValue = getoLowerCase();
+ if (oLowerCaseValue != null) {
+ String oLowerCaseValueAsString = JSON.getGson().toJson(oLowerCaseValue);
+ valMap.put("oLowerCase", oLowerCaseValueAsString);
+ }
+
+ valMap.put("timestamp", getTimestamp());
+ return asciiEncode(
+ valMap.keySet().stream()
+ .map(key -> key + "=" + valMap.get(key))
+ .collect(Collectors.joining("&")));
+ }
+
+ public Map toMap() {
+ Map valMap = new TreeMap();
+ valMap.put("apiKey", getApiKey());
+ Object EValue = getE();
+ if (EValue != null) {
+ valMap.put("E", EValue);
+ }
+ Object TValue = getT();
+ if (TValue != null) {
+ valMap.put("T", TValue);
+ }
+ Object iLowerCaseValue = getiLowerCase();
+ if (iLowerCaseValue != null) {
+ valMap.put("iLowerCase", iLowerCaseValue);
+ }
+ Object oLowerCaseValue = getoLowerCase();
+ if (oLowerCaseValue != null) {
+ valMap.put("oLowerCase", oLowerCaseValue);
+ }
+
+ valMap.put("timestamp", getTimestamp());
+ return valMap;
+ }
+
+ public static String asciiEncode(String s) {
+ return new String(s.getBytes(), StandardCharsets.US_ASCII);
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces (except the first
+ * line).
+ */
+ private String toIndentedString(Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+
+ public static HashSet openapiFields;
+ public static HashSet openapiRequiredFields;
+
+ static {
+ // a set of all properties/fields (JSON key names)
+ openapiFields = new HashSet();
+ openapiFields.add("E");
+ openapiFields.add("T");
+ openapiFields.add("i");
+ openapiFields.add("o");
+
+ // a set of required properties/fields (JSON key names)
+ openapiRequiredFields = new HashSet();
+ }
+
+ /**
+ * Validates the JSON Element and throws an exception if issues found
+ *
+ * @param jsonElement JSON Element
+ * @throws IOException if the JSON Element is invalid with respect to OrderTradeUpdate
+ */
+ public static void validateJsonElement(JsonElement jsonElement) throws IOException {
+ if (jsonElement == null) {
+ if (!OrderTradeUpdate.openapiRequiredFields
+ .isEmpty()) { // has required fields but JSON element is null
+ throw new IllegalArgumentException(
+ String.format(
+ "The required field(s) %s in OrderTradeUpdate is not found in the"
+ + " empty JSON string",
+ OrderTradeUpdate.openapiRequiredFields.toString()));
+ }
+ }
+
+ Set> entries = jsonElement.getAsJsonObject().entrySet();
+ // check to see if the JSON string contains additional fields
+ for (Map.Entry entry : entries) {
+ if (!OrderTradeUpdate.openapiFields.contains(entry.getKey())) {
+ throw new IllegalArgumentException(
+ String.format(
+ "The field `%s` in the JSON string is not defined in the"
+ + " `OrderTradeUpdate` properties. JSON: %s",
+ entry.getKey(), jsonElement.toString()));
+ }
+ }
+ JsonObject jsonObj = jsonElement.getAsJsonObject();
+ if ((jsonObj.get("i") != null && !jsonObj.get("i").isJsonNull())
+ && !jsonObj.get("i").isJsonPrimitive()) {
+ throw new IllegalArgumentException(
+ String.format(
+ "Expected the field `i` to be a primitive type in the JSON string but"
+ + " got `%s`",
+ jsonObj.get("i").toString()));
+ }
+ // validate the optional field `o`
+ if (jsonObj.get("o") != null && !jsonObj.get("o").isJsonNull()) {
+ OrderTradeUpdateO.validateJsonElement(jsonObj.get("o"));
+ }
+ }
+
+ public static class CustomTypeAdapterFactory implements TypeAdapterFactory {
+ @SuppressWarnings("unchecked")
+ @Override
+ public TypeAdapter create(Gson gson, TypeToken