@binance/derivatives-trading-options 4.0.2 → 5.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -199,6 +199,40 @@ Choose between `single` and `pool` connection modes for WebSocket Streams. The `
199
199
 
200
200
  To enhance security, you can use certificate pinning with the `agent` option in the configuration. This ensures the client only communicates with servers using specific certificates. See the [Certificate Pinning example](./docs/websocket-streams/certificate-pinning.md) for detailed usage.
201
201
 
202
+ #### Subscribe to User Data Streams
203
+
204
+ You can consume the user data stream, which sends account-level events such as account and order updates. First create a listen-key via REST API; then:
205
+
206
+ ```typescript
207
+ import { DerivativesTradingOptions, DERIVATIVES_TRADING_OPTIONS_WS_STREAMS_PROD_URL } from '@binance/derivatives-trading-options';
208
+
209
+ const configurationWebsocketStreams = {
210
+ wsURL: DERIVATIVES_TRADING_OPTIONS_WS_STREAMS_PROD_URL,
211
+ };
212
+ const client = new DerivativesTradingOptions({ configurationWebsocketStreams });
213
+
214
+ client.websocketStreams
215
+ .connect()
216
+ .then((connection) => {
217
+ const stream = connection.userData('listenKey');
218
+ stream.on('message', (data) => {
219
+ switch (data.e) {
220
+ case 'ACCOUNT_UPDATE':
221
+ console.log('account update stream', data);
222
+ break;
223
+ case 'ORDER_TRADE_UPDATE':
224
+ console.log('order trade update stream', data);
225
+ break;
226
+ // …handle other variants…
227
+ default:
228
+ console.log('unknown stream', data);
229
+ break;
230
+ }
231
+ });
232
+ })
233
+ .catch((err) => console.error(err));
234
+ ```
235
+
202
236
  #### Unsubscribing from Streams
203
237
 
204
238
  You can unsubscribe from specific WebSocket streams using the `unsubscribe` method. This is useful for managing active subscriptions without closing the connection.
package/dist/index.d.mts CHANGED
@@ -7476,6 +7476,219 @@ declare namespace index$1 {
7476
7476
  export { type index$1_AcceptBlockTradeOrderRequest as AcceptBlockTradeOrderRequest, type index$1_AcceptBlockTradeOrderResponse as AcceptBlockTradeOrderResponse, type index$1_AcceptBlockTradeOrderResponseLegsInner as AcceptBlockTradeOrderResponseLegsInner, index$1_AccountApi as AccountApi, type index$1_AccountApiInterface as AccountApiInterface, type index$1_AccountBlockTradeListRequest as AccountBlockTradeListRequest, type index$1_AccountBlockTradeListResponse as AccountBlockTradeListResponse, type index$1_AccountBlockTradeListResponseInner as AccountBlockTradeListResponseInner, type index$1_AccountBlockTradeListResponseInnerLegsInner as AccountBlockTradeListResponseInnerLegsInner, type index$1_AccountFundingFlowRequest as AccountFundingFlowRequest, type index$1_AccountFundingFlowResponse as AccountFundingFlowResponse, type index$1_AccountFundingFlowResponseInner as AccountFundingFlowResponseInner, type index$1_AccountTradeListRequest as AccountTradeListRequest, type index$1_AccountTradeListResponse as AccountTradeListResponse, type index$1_AccountTradeListResponseInner as AccountTradeListResponseInner, type index$1_AutoCancelAllOpenOrdersRequest as AutoCancelAllOpenOrdersRequest, type index$1_AutoCancelAllOpenOrdersResponse as AutoCancelAllOpenOrdersResponse, type index$1_CancelAllOptionOrdersByUnderlyingRequest as CancelAllOptionOrdersByUnderlyingRequest, type index$1_CancelAllOptionOrdersByUnderlyingResponse as CancelAllOptionOrdersByUnderlyingResponse, type index$1_CancelAllOptionOrdersOnSpecificSymbolRequest as CancelAllOptionOrdersOnSpecificSymbolRequest, type index$1_CancelAllOptionOrdersOnSpecificSymbolResponse as CancelAllOptionOrdersOnSpecificSymbolResponse, type index$1_CancelBlockTradeOrderRequest as CancelBlockTradeOrderRequest, type index$1_CancelMultipleOptionOrdersRequest as CancelMultipleOptionOrdersRequest, type index$1_CancelMultipleOptionOrdersResponse as CancelMultipleOptionOrdersResponse, type index$1_CancelMultipleOptionOrdersResponseInner as CancelMultipleOptionOrdersResponseInner, type index$1_CancelOptionOrderRequest as CancelOptionOrderRequest, type index$1_CancelOptionOrderResponse as CancelOptionOrderResponse, type index$1_CheckServerTimeResponse as CheckServerTimeResponse, type index$1_ExchangeInformationResponse as ExchangeInformationResponse, type index$1_ExchangeInformationResponseOptionAssetsInner as ExchangeInformationResponseOptionAssetsInner, type index$1_ExchangeInformationResponseOptionContractsInner as ExchangeInformationResponseOptionContractsInner, type index$1_ExchangeInformationResponseOptionSymbolsInner as ExchangeInformationResponseOptionSymbolsInner, type index$1_ExchangeInformationResponseOptionSymbolsInnerFiltersInner as ExchangeInformationResponseOptionSymbolsInnerFiltersInner, type index$1_ExchangeInformationResponseRateLimitsInner as ExchangeInformationResponseRateLimitsInner, type index$1_ExtendBlockTradeOrderRequest as ExtendBlockTradeOrderRequest, type index$1_ExtendBlockTradeOrderResponse as ExtendBlockTradeOrderResponse, type index$1_ExtendBlockTradeOrderResponseLegsInner as ExtendBlockTradeOrderResponseLegsInner, type index$1_GetAutoCancelAllOpenOrdersRequest as GetAutoCancelAllOpenOrdersRequest, type index$1_GetAutoCancelAllOpenOrdersResponse as GetAutoCancelAllOpenOrdersResponse, type index$1_GetDownloadIdForOptionTransactionHistoryRequest as GetDownloadIdForOptionTransactionHistoryRequest, type index$1_GetDownloadIdForOptionTransactionHistoryResponse as GetDownloadIdForOptionTransactionHistoryResponse, type index$1_GetMarketMakerProtectionConfigRequest as GetMarketMakerProtectionConfigRequest, type index$1_GetMarketMakerProtectionConfigResponse as GetMarketMakerProtectionConfigResponse, type index$1_GetOptionTransactionHistoryDownloadLinkByIdRequest as GetOptionTransactionHistoryDownloadLinkByIdRequest, type index$1_GetOptionTransactionHistoryDownloadLinkByIdResponse as GetOptionTransactionHistoryDownloadLinkByIdResponse, type index$1_HistoricalExerciseRecordsRequest as HistoricalExerciseRecordsRequest, type index$1_HistoricalExerciseRecordsResponse as HistoricalExerciseRecordsResponse, type index$1_HistoricalExerciseRecordsResponseInner as HistoricalExerciseRecordsResponseInner, type index$1_KlineCandlestickDataRequest as KlineCandlestickDataRequest, type index$1_KlineCandlestickDataResponse as KlineCandlestickDataResponse, type index$1_KlineCandlestickDataResponseInner as KlineCandlestickDataResponseInner, index$1_MarketDataApi as MarketDataApi, type index$1_MarketDataApiInterface as MarketDataApiInterface, index$1_MarketMakerBlockTradeApi as MarketMakerBlockTradeApi, type index$1_MarketMakerBlockTradeApiInterface as MarketMakerBlockTradeApiInterface, index$1_MarketMakerEndpointsApi as MarketMakerEndpointsApi, type index$1_MarketMakerEndpointsApiInterface as MarketMakerEndpointsApiInterface, type index$1_NewBlockTradeOrderRequest as NewBlockTradeOrderRequest, type index$1_NewBlockTradeOrderResponse as NewBlockTradeOrderResponse, index$1_NewBlockTradeOrderSideEnum as NewBlockTradeOrderSideEnum, index$1_NewOrderNewOrderRespTypeEnum as NewOrderNewOrderRespTypeEnum, type index$1_NewOrderRequest as NewOrderRequest, type index$1_NewOrderResponse as NewOrderResponse, index$1_NewOrderSideEnum as NewOrderSideEnum, index$1_NewOrderTimeInForceEnum as NewOrderTimeInForceEnum, index$1_NewOrderTypeEnum as NewOrderTypeEnum, type index$1_OldTradesLookupRequest as OldTradesLookupRequest, type index$1_OldTradesLookupResponse as OldTradesLookupResponse, type index$1_OldTradesLookupResponseInner as OldTradesLookupResponseInner, type OpenInterestRequest$1 as OpenInterestRequest, type OpenInterestResponse$1 as OpenInterestResponse, type OpenInterestResponseInner$1 as OpenInterestResponseInner, type index$1_OptionAccountInformationRequest as OptionAccountInformationRequest, type index$1_OptionAccountInformationResponse as OptionAccountInformationResponse, type index$1_OptionAccountInformationResponseAssetInner as OptionAccountInformationResponseAssetInner, type index$1_OptionAccountInformationResponseGreekInner as OptionAccountInformationResponseGreekInner, type index$1_OptionMarginAccountInformationRequest as OptionMarginAccountInformationRequest, type index$1_OptionMarginAccountInformationResponse as OptionMarginAccountInformationResponse, type index$1_OptionMarginAccountInformationResponseAssetInner as OptionMarginAccountInformationResponseAssetInner, type index$1_OptionMarkPriceRequest as OptionMarkPriceRequest, type index$1_OptionMarkPriceResponse as OptionMarkPriceResponse, type index$1_OptionMarkPriceResponseInner as OptionMarkPriceResponseInner, type index$1_OptionPositionInformationRequest as OptionPositionInformationRequest, type index$1_OptionPositionInformationResponse as OptionPositionInformationResponse, type index$1_OptionPositionInformationResponseInner as OptionPositionInformationResponseInner, type index$1_OrderBookRequest as OrderBookRequest, type index$1_OrderBookResponse as OrderBookResponse, type index$1_OrderBookResponseAsksItem as OrderBookResponseAsksItem, type index$1_OrderBookResponseBidsItem as OrderBookResponseBidsItem, type index$1_PlaceMultipleOrdersOrdersParameterInner as PlaceMultipleOrdersOrdersParameterInner, type index$1_PlaceMultipleOrdersOrdersParameterInnerNewOrderRespTypeEnum as PlaceMultipleOrdersOrdersParameterInnerNewOrderRespTypeEnum, type index$1_PlaceMultipleOrdersOrdersParameterInnerSideEnum as PlaceMultipleOrdersOrdersParameterInnerSideEnum, type index$1_PlaceMultipleOrdersOrdersParameterInnerTimeInForceEnum as PlaceMultipleOrdersOrdersParameterInnerTimeInForceEnum, type index$1_PlaceMultipleOrdersOrdersParameterInnerTypeEnum as PlaceMultipleOrdersOrdersParameterInnerTypeEnum, type index$1_PlaceMultipleOrdersRequest as PlaceMultipleOrdersRequest, type index$1_PlaceMultipleOrdersResponse as PlaceMultipleOrdersResponse, type index$1_PlaceMultipleOrdersResponseInner as PlaceMultipleOrdersResponseInner, type index$1_QueryBlockTradeDetailsRequest as QueryBlockTradeDetailsRequest, type index$1_QueryBlockTradeDetailsResponse as QueryBlockTradeDetailsResponse, type index$1_QueryBlockTradeDetailsResponseLegsInner as QueryBlockTradeDetailsResponseLegsInner, type index$1_QueryBlockTradeOrderRequest as QueryBlockTradeOrderRequest, type index$1_QueryBlockTradeOrderResponse as QueryBlockTradeOrderResponse, type index$1_QueryBlockTradeOrderResponseInner as QueryBlockTradeOrderResponseInner, type index$1_QueryCurrentOpenOptionOrdersRequest as QueryCurrentOpenOptionOrdersRequest, type index$1_QueryCurrentOpenOptionOrdersResponse as QueryCurrentOpenOptionOrdersResponse, type index$1_QueryCurrentOpenOptionOrdersResponseInner as QueryCurrentOpenOptionOrdersResponseInner, type index$1_QueryOptionOrderHistoryRequest as QueryOptionOrderHistoryRequest, type index$1_QueryOptionOrderHistoryResponse as QueryOptionOrderHistoryResponse, type index$1_QueryOptionOrderHistoryResponseInner as QueryOptionOrderHistoryResponseInner, type index$1_QuerySingleOrderRequest as QuerySingleOrderRequest, type index$1_QuerySingleOrderResponse as QuerySingleOrderResponse, type index$1_RecentBlockTradesListRequest as RecentBlockTradesListRequest, type index$1_RecentBlockTradesListResponse as RecentBlockTradesListResponse, type index$1_RecentBlockTradesListResponseInner as RecentBlockTradesListResponseInner, type index$1_RecentTradesListRequest as RecentTradesListRequest, type index$1_RecentTradesListResponse as RecentTradesListResponse, type index$1_RecentTradesListResponseInner as RecentTradesListResponseInner, type index$1_ResetMarketMakerProtectionConfigRequest as ResetMarketMakerProtectionConfigRequest, type index$1_ResetMarketMakerProtectionConfigResponse as ResetMarketMakerProtectionConfigResponse, index$1_RestAPI as RestAPI, type index$1_SetAutoCancelAllOpenOrdersRequest as SetAutoCancelAllOpenOrdersRequest, type index$1_SetAutoCancelAllOpenOrdersResponse as SetAutoCancelAllOpenOrdersResponse, type index$1_SetMarketMakerProtectionConfigRequest as SetMarketMakerProtectionConfigRequest, type index$1_SetMarketMakerProtectionConfigResponse as SetMarketMakerProtectionConfigResponse, type index$1_StartUserDataStreamResponse as StartUserDataStreamResponse, type index$1_SymbolPriceTickerRequest as SymbolPriceTickerRequest, type index$1_SymbolPriceTickerResponse as SymbolPriceTickerResponse, type index$1_Ticker24hrPriceChangeStatisticsRequest as Ticker24hrPriceChangeStatisticsRequest, type index$1_Ticker24hrPriceChangeStatisticsResponse as Ticker24hrPriceChangeStatisticsResponse, type index$1_Ticker24hrPriceChangeStatisticsResponseInner as Ticker24hrPriceChangeStatisticsResponseInner, index$1_TradeApi as TradeApi, type index$1_TradeApiInterface as TradeApiInterface, index$1_UserDataStreamsApi as UserDataStreamsApi, type index$1_UserDataStreamsApiInterface as UserDataStreamsApiInterface, type index$1_UserExerciseRecordRequest as UserExerciseRecordRequest, type index$1_UserExerciseRecordResponse as UserExerciseRecordResponse, type index$1_UserExerciseRecordResponseInner as UserExerciseRecordResponseInner };
7477
7477
  }
7478
7478
 
7479
+ /**
7480
+ * Binance Derivatives Trading Options WebSocket Market Streams
7481
+ *
7482
+ * OpenAPI Specification for the Binance Derivatives Trading Options WebSocket Market Streams
7483
+ *
7484
+ * The version of the OpenAPI document: 1.0.0
7485
+ *
7486
+ *
7487
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
7488
+ * https://openapi-generator.tech
7489
+ * Do not edit the class manually.
7490
+ */
7491
+ /**
7492
+ *
7493
+ * @export
7494
+ * @interface AccountUpdateBInner
7495
+ */
7496
+ interface AccountUpdateBInner {
7497
+ /**
7498
+ *
7499
+ * @type {string}
7500
+ * @memberof AccountUpdateBInner
7501
+ */
7502
+ b?: string;
7503
+ /**
7504
+ *
7505
+ * @type {string}
7506
+ * @memberof AccountUpdateBInner
7507
+ */
7508
+ m?: string;
7509
+ /**
7510
+ *
7511
+ * @type {string}
7512
+ * @memberof AccountUpdateBInner
7513
+ */
7514
+ u?: string;
7515
+ /**
7516
+ *
7517
+ * @type {number}
7518
+ * @memberof AccountUpdateBInner
7519
+ */
7520
+ U?: number;
7521
+ /**
7522
+ *
7523
+ * @type {string}
7524
+ * @memberof AccountUpdateBInner
7525
+ */
7526
+ M?: string;
7527
+ /**
7528
+ *
7529
+ * @type {string}
7530
+ * @memberof AccountUpdateBInner
7531
+ */
7532
+ i?: string;
7533
+ /**
7534
+ *
7535
+ * @type {string}
7536
+ * @memberof AccountUpdateBInner
7537
+ */
7538
+ a?: string;
7539
+ }
7540
+
7541
+ /**
7542
+ * Binance Derivatives Trading Options WebSocket Market Streams
7543
+ *
7544
+ * OpenAPI Specification for the Binance Derivatives Trading Options WebSocket Market Streams
7545
+ *
7546
+ * The version of the OpenAPI document: 1.0.0
7547
+ *
7548
+ *
7549
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
7550
+ * https://openapi-generator.tech
7551
+ * Do not edit the class manually.
7552
+ */
7553
+ /**
7554
+ *
7555
+ * @export
7556
+ * @interface AccountUpdateGInner
7557
+ */
7558
+ interface AccountUpdateGInner {
7559
+ /**
7560
+ *
7561
+ * @type {string}
7562
+ * @memberof AccountUpdateGInner
7563
+ */
7564
+ ui?: string;
7565
+ /**
7566
+ *
7567
+ * @type {number}
7568
+ * @memberof AccountUpdateGInner
7569
+ */
7570
+ d?: number;
7571
+ /**
7572
+ *
7573
+ * @type {number}
7574
+ * @memberof AccountUpdateGInner
7575
+ */
7576
+ t?: number;
7577
+ /**
7578
+ *
7579
+ * @type {number}
7580
+ * @memberof AccountUpdateGInner
7581
+ */
7582
+ g?: number;
7583
+ /**
7584
+ *
7585
+ * @type {number}
7586
+ * @memberof AccountUpdateGInner
7587
+ */
7588
+ v?: number;
7589
+ }
7590
+
7591
+ /**
7592
+ * Binance Derivatives Trading Options WebSocket Market Streams
7593
+ *
7594
+ * OpenAPI Specification for the Binance Derivatives Trading Options WebSocket Market Streams
7595
+ *
7596
+ * The version of the OpenAPI document: 1.0.0
7597
+ *
7598
+ *
7599
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
7600
+ * https://openapi-generator.tech
7601
+ * Do not edit the class manually.
7602
+ */
7603
+ /**
7604
+ *
7605
+ * @export
7606
+ * @interface AccountUpdatePInner
7607
+ */
7608
+ interface AccountUpdatePInner {
7609
+ /**
7610
+ *
7611
+ * @type {string}
7612
+ * @memberof AccountUpdatePInner
7613
+ */
7614
+ s?: string;
7615
+ /**
7616
+ *
7617
+ * @type {string}
7618
+ * @memberof AccountUpdatePInner
7619
+ */
7620
+ c?: string;
7621
+ /**
7622
+ *
7623
+ * @type {string}
7624
+ * @memberof AccountUpdatePInner
7625
+ */
7626
+ r?: string;
7627
+ /**
7628
+ *
7629
+ * @type {string}
7630
+ * @memberof AccountUpdatePInner
7631
+ */
7632
+ p?: string;
7633
+ /**
7634
+ *
7635
+ * @type {string}
7636
+ * @memberof AccountUpdatePInner
7637
+ */
7638
+ a?: string;
7639
+ }
7640
+
7641
+ /**
7642
+ * Binance Derivatives Trading Options WebSocket Market Streams
7643
+ *
7644
+ * OpenAPI Specification for the Binance Derivatives Trading Options WebSocket Market Streams
7645
+ *
7646
+ * The version of the OpenAPI document: 1.0.0
7647
+ *
7648
+ *
7649
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
7650
+ * https://openapi-generator.tech
7651
+ * Do not edit the class manually.
7652
+ */
7653
+
7654
+ /**
7655
+ *
7656
+ * @export
7657
+ * @interface AccountUpdate
7658
+ */
7659
+ interface AccountUpdate {
7660
+ /**
7661
+ *
7662
+ * @type {number}
7663
+ * @memberof AccountUpdate
7664
+ */
7665
+ E?: number;
7666
+ /**
7667
+ *
7668
+ * @type {Array<AccountUpdateBInner>}
7669
+ * @memberof AccountUpdate
7670
+ */
7671
+ B?: Array<AccountUpdateBInner>;
7672
+ /**
7673
+ *
7674
+ * @type {Array<AccountUpdateGInner>}
7675
+ * @memberof AccountUpdate
7676
+ */
7677
+ G?: Array<AccountUpdateGInner>;
7678
+ /**
7679
+ *
7680
+ * @type {Array<AccountUpdatePInner>}
7681
+ * @memberof AccountUpdate
7682
+ */
7683
+ P?: Array<AccountUpdatePInner>;
7684
+ /**
7685
+ *
7686
+ * @type {number}
7687
+ * @memberof AccountUpdate
7688
+ */
7689
+ uid?: number;
7690
+ }
7691
+
7479
7692
  /**
7480
7693
  * Binance Derivatives Trading Options WebSocket Market Streams
7481
7694
  *
@@ -7897,6 +8110,218 @@ interface OpenInterestResponseInner {
7897
8110
  interface OpenInterestResponse extends Array<OpenInterestResponseInner> {
7898
8111
  }
7899
8112
 
8113
+ /**
8114
+ * Binance Derivatives Trading Options WebSocket Market Streams
8115
+ *
8116
+ * OpenAPI Specification for the Binance Derivatives Trading Options WebSocket Market Streams
8117
+ *
8118
+ * The version of the OpenAPI document: 1.0.0
8119
+ *
8120
+ *
8121
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
8122
+ * https://openapi-generator.tech
8123
+ * Do not edit the class manually.
8124
+ */
8125
+ /**
8126
+ *
8127
+ * @export
8128
+ * @interface OrderTradeUpdateOInnerFiInner
8129
+ */
8130
+ interface OrderTradeUpdateOInnerFiInner {
8131
+ /**
8132
+ *
8133
+ * @type {string}
8134
+ * @memberof OrderTradeUpdateOInnerFiInner
8135
+ */
8136
+ t?: string;
8137
+ /**
8138
+ *
8139
+ * @type {string}
8140
+ * @memberof OrderTradeUpdateOInnerFiInner
8141
+ */
8142
+ p?: string;
8143
+ /**
8144
+ *
8145
+ * @type {string}
8146
+ * @memberof OrderTradeUpdateOInnerFiInner
8147
+ */
8148
+ q?: string;
8149
+ /**
8150
+ *
8151
+ * @type {number}
8152
+ * @memberof OrderTradeUpdateOInnerFiInner
8153
+ */
8154
+ T?: number;
8155
+ /**
8156
+ *
8157
+ * @type {string}
8158
+ * @memberof OrderTradeUpdateOInnerFiInner
8159
+ */
8160
+ m?: string;
8161
+ /**
8162
+ *
8163
+ * @type {string}
8164
+ * @memberof OrderTradeUpdateOInnerFiInner
8165
+ */
8166
+ f?: string;
8167
+ }
8168
+
8169
+ /**
8170
+ * Binance Derivatives Trading Options WebSocket Market Streams
8171
+ *
8172
+ * OpenAPI Specification for the Binance Derivatives Trading Options WebSocket Market Streams
8173
+ *
8174
+ * The version of the OpenAPI document: 1.0.0
8175
+ *
8176
+ *
8177
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
8178
+ * https://openapi-generator.tech
8179
+ * Do not edit the class manually.
8180
+ */
8181
+
8182
+ /**
8183
+ *
8184
+ * @export
8185
+ * @interface OrderTradeUpdateOInner
8186
+ */
8187
+ interface OrderTradeUpdateOInner {
8188
+ /**
8189
+ *
8190
+ * @type {number}
8191
+ * @memberof OrderTradeUpdateOInner
8192
+ */
8193
+ T?: number;
8194
+ /**
8195
+ *
8196
+ * @type {number}
8197
+ * @memberof OrderTradeUpdateOInner
8198
+ */
8199
+ t?: number;
8200
+ /**
8201
+ *
8202
+ * @type {string}
8203
+ * @memberof OrderTradeUpdateOInner
8204
+ */
8205
+ s?: string;
8206
+ /**
8207
+ *
8208
+ * @type {string}
8209
+ * @memberof OrderTradeUpdateOInner
8210
+ */
8211
+ c?: string;
8212
+ /**
8213
+ *
8214
+ * @type {string}
8215
+ * @memberof OrderTradeUpdateOInner
8216
+ */
8217
+ oid?: string;
8218
+ /**
8219
+ *
8220
+ * @type {string}
8221
+ * @memberof OrderTradeUpdateOInner
8222
+ */
8223
+ p?: string;
8224
+ /**
8225
+ *
8226
+ * @type {string}
8227
+ * @memberof OrderTradeUpdateOInner
8228
+ */
8229
+ q?: string;
8230
+ /**
8231
+ *
8232
+ * @type {number}
8233
+ * @memberof OrderTradeUpdateOInner
8234
+ */
8235
+ stp?: number;
8236
+ /**
8237
+ *
8238
+ * @type {boolean}
8239
+ * @memberof OrderTradeUpdateOInner
8240
+ */
8241
+ r?: boolean;
8242
+ /**
8243
+ *
8244
+ * @type {boolean}
8245
+ * @memberof OrderTradeUpdateOInner
8246
+ */
8247
+ po?: boolean;
8248
+ /**
8249
+ *
8250
+ * @type {string}
8251
+ * @memberof OrderTradeUpdateOInner
8252
+ */
8253
+ S?: string;
8254
+ /**
8255
+ *
8256
+ * @type {string}
8257
+ * @memberof OrderTradeUpdateOInner
8258
+ */
8259
+ e?: string;
8260
+ /**
8261
+ *
8262
+ * @type {string}
8263
+ * @memberof OrderTradeUpdateOInner
8264
+ */
8265
+ ec?: string;
8266
+ /**
8267
+ *
8268
+ * @type {string}
8269
+ * @memberof OrderTradeUpdateOInner
8270
+ */
8271
+ f?: string;
8272
+ /**
8273
+ *
8274
+ * @type {string}
8275
+ * @memberof OrderTradeUpdateOInner
8276
+ */
8277
+ tif?: string;
8278
+ /**
8279
+ *
8280
+ * @type {string}
8281
+ * @memberof OrderTradeUpdateOInner
8282
+ */
8283
+ oty?: string;
8284
+ /**
8285
+ *
8286
+ * @type {Array<OrderTradeUpdateOInnerFiInner>}
8287
+ * @memberof OrderTradeUpdateOInner
8288
+ */
8289
+ fi?: Array<OrderTradeUpdateOInnerFiInner>;
8290
+ }
8291
+
8292
+ /**
8293
+ * Binance Derivatives Trading Options WebSocket Market Streams
8294
+ *
8295
+ * OpenAPI Specification for the Binance Derivatives Trading Options WebSocket Market Streams
8296
+ *
8297
+ * The version of the OpenAPI document: 1.0.0
8298
+ *
8299
+ *
8300
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
8301
+ * https://openapi-generator.tech
8302
+ * Do not edit the class manually.
8303
+ */
8304
+
8305
+ /**
8306
+ *
8307
+ * @export
8308
+ * @interface OrderTradeUpdate
8309
+ */
8310
+ interface OrderTradeUpdate {
8311
+ /**
8312
+ *
8313
+ * @type {number}
8314
+ * @memberof OrderTradeUpdate
8315
+ */
8316
+ E?: number;
8317
+ /**
8318
+ *
8319
+ * @type {Array<OrderTradeUpdateOInner>}
8320
+ * @memberof OrderTradeUpdate
8321
+ */
8322
+ o?: Array<OrderTradeUpdateOInner>;
8323
+ }
8324
+
7900
8325
  /**
7901
8326
  * Binance Derivatives Trading Options WebSocket Market Streams
7902
8327
  *
@@ -8006,6 +8431,50 @@ interface PartialBookDepthStreamsResponse {
8006
8431
  a?: Array<PartialBookDepthStreamsResponseAItem>;
8007
8432
  }
8008
8433
 
8434
+ /**
8435
+ * Binance Derivatives Trading Options WebSocket Market Streams
8436
+ *
8437
+ * OpenAPI Specification for the Binance Derivatives Trading Options WebSocket Market Streams
8438
+ *
8439
+ * The version of the OpenAPI document: 1.0.0
8440
+ *
8441
+ *
8442
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
8443
+ * https://openapi-generator.tech
8444
+ * Do not edit the class manually.
8445
+ */
8446
+ /**
8447
+ *
8448
+ * @export
8449
+ * @interface RiskLevelChange
8450
+ */
8451
+ interface RiskLevelChange {
8452
+ /**
8453
+ *
8454
+ * @type {number}
8455
+ * @memberof RiskLevelChange
8456
+ */
8457
+ E?: number;
8458
+ /**
8459
+ *
8460
+ * @type {string}
8461
+ * @memberof RiskLevelChange
8462
+ */
8463
+ s?: string;
8464
+ /**
8465
+ *
8466
+ * @type {string}
8467
+ * @memberof RiskLevelChange
8468
+ */
8469
+ mb?: string;
8470
+ /**
8471
+ *
8472
+ * @type {string}
8473
+ * @memberof RiskLevelChange
8474
+ */
8475
+ mm?: string;
8476
+ }
8477
+
8009
8478
  /**
8010
8479
  * Binance Derivatives Trading Options WebSocket Market Streams
8011
8480
  *
@@ -8525,6 +8994,31 @@ interface TradeStreamsResponse {
8525
8994
  X?: string;
8526
8995
  }
8527
8996
 
8997
+ /**
8998
+ * Binance Derivatives Trading Options WebSocket Market Streams
8999
+ *
9000
+ * OpenAPI Specification for the Binance Derivatives Trading Options WebSocket Market Streams
9001
+ *
9002
+ * The version of the OpenAPI document: 1.0.0
9003
+ *
9004
+ *
9005
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9006
+ * https://openapi-generator.tech
9007
+ * Do not edit the class manually.
9008
+ */
9009
+
9010
+ /**
9011
+ * @type UserDataStreamEventsResponse
9012
+ * @export
9013
+ */
9014
+ type UserDataStreamEventsResponse = ({
9015
+ e: 'ACCOUNT_UPDATE';
9016
+ } & AccountUpdate) | ({
9017
+ e: 'ORDER_TRADE_UPDATE';
9018
+ } & OrderTradeUpdate) | ({
9019
+ e: 'RISK_LEVEL_CHANGE';
9020
+ } & RiskLevelChange);
9021
+
8528
9022
  /**
8529
9023
  * Binance Derivatives Trading Options WebSocket Market Streams
8530
9024
  *
@@ -9053,7 +9547,7 @@ declare class WebsocketStreamsConnection {
9053
9547
  * @param id - Optional user data stream ID
9054
9548
  * @returns A WebSocket stream handler for the user data stream.
9055
9549
  */
9056
- userData(listenKey: string, id?: string): WebsocketStream<object>;
9550
+ userData(listenKey: string, id?: string): WebsocketStream<UserDataStreamEventsResponse>;
9057
9551
  /**
9058
9552
  * Underlying(e.g ETHUSDT) index stream.
9059
9553
  *
@@ -9209,6 +9703,10 @@ declare class WebsocketStreams {
9209
9703
  * Do not edit the class manually.
9210
9704
  */
9211
9705
 
9706
+ type index_AccountUpdate = AccountUpdate;
9707
+ type index_AccountUpdateBInner = AccountUpdateBInner;
9708
+ type index_AccountUpdateGInner = AccountUpdateGInner;
9709
+ type index_AccountUpdatePInner = AccountUpdatePInner;
9212
9710
  type index_IndexPriceStreamsRequest = IndexPriceStreamsRequest;
9213
9711
  type index_IndexPriceStreamsResponse = IndexPriceStreamsResponse;
9214
9712
  type index_KlineCandlestickStreamsRequest = KlineCandlestickStreamsRequest;
@@ -9222,10 +9720,14 @@ type index_NewSymbolInfoResponse = NewSymbolInfoResponse;
9222
9720
  type index_OpenInterestRequest = OpenInterestRequest;
9223
9721
  type index_OpenInterestResponse = OpenInterestResponse;
9224
9722
  type index_OpenInterestResponseInner = OpenInterestResponseInner;
9723
+ type index_OrderTradeUpdate = OrderTradeUpdate;
9724
+ type index_OrderTradeUpdateOInner = OrderTradeUpdateOInner;
9725
+ type index_OrderTradeUpdateOInnerFiInner = OrderTradeUpdateOInnerFiInner;
9225
9726
  type index_PartialBookDepthStreamsRequest = PartialBookDepthStreamsRequest;
9226
9727
  type index_PartialBookDepthStreamsResponse = PartialBookDepthStreamsResponse;
9227
9728
  type index_PartialBookDepthStreamsResponseAItem = PartialBookDepthStreamsResponseAItem;
9228
9729
  type index_PartialBookDepthStreamsResponseBItem = PartialBookDepthStreamsResponseBItem;
9730
+ type index_RiskLevelChange = RiskLevelChange;
9229
9731
  type index_Ticker24HourByUnderlyingAssetAndExpirationDataRequest = Ticker24HourByUnderlyingAssetAndExpirationDataRequest;
9230
9732
  type index_Ticker24HourByUnderlyingAssetAndExpirationDataResponse = Ticker24HourByUnderlyingAssetAndExpirationDataResponse;
9231
9733
  type index_Ticker24HourByUnderlyingAssetAndExpirationDataResponseInner = Ticker24HourByUnderlyingAssetAndExpirationDataResponseInner;
@@ -9233,6 +9735,7 @@ type index_Ticker24HourRequest = Ticker24HourRequest;
9233
9735
  type index_Ticker24HourResponse = Ticker24HourResponse;
9234
9736
  type index_TradeStreamsRequest = TradeStreamsRequest;
9235
9737
  type index_TradeStreamsResponse = TradeStreamsResponse;
9738
+ type index_UserDataStreamEventsResponse = UserDataStreamEventsResponse;
9236
9739
  type index_WebsocketMarketStreamsApi = WebsocketMarketStreamsApi;
9237
9740
  declare const index_WebsocketMarketStreamsApi: typeof WebsocketMarketStreamsApi;
9238
9741
  type index_WebsocketMarketStreamsApiInterface = WebsocketMarketStreamsApiInterface;
@@ -9241,7 +9744,7 @@ declare const index_WebsocketStreams: typeof WebsocketStreams;
9241
9744
  type index_WebsocketStreamsConnection = WebsocketStreamsConnection;
9242
9745
  declare const index_WebsocketStreamsConnection: typeof WebsocketStreamsConnection;
9243
9746
  declare namespace index {
9244
- export { type index_IndexPriceStreamsRequest as IndexPriceStreamsRequest, type index_IndexPriceStreamsResponse as IndexPriceStreamsResponse, type index_KlineCandlestickStreamsRequest as KlineCandlestickStreamsRequest, type index_KlineCandlestickStreamsResponse as KlineCandlestickStreamsResponse, type index_KlineCandlestickStreamsResponseK as KlineCandlestickStreamsResponseK, type index_MarkPriceRequest as MarkPriceRequest, type index_MarkPriceResponse as MarkPriceResponse, type index_MarkPriceResponseInner as MarkPriceResponseInner, type index_NewSymbolInfoRequest as NewSymbolInfoRequest, type index_NewSymbolInfoResponse as NewSymbolInfoResponse, type index_OpenInterestRequest as OpenInterestRequest, type index_OpenInterestResponse as OpenInterestResponse, type index_OpenInterestResponseInner as OpenInterestResponseInner, type index_PartialBookDepthStreamsRequest as PartialBookDepthStreamsRequest, type index_PartialBookDepthStreamsResponse as PartialBookDepthStreamsResponse, type index_PartialBookDepthStreamsResponseAItem as PartialBookDepthStreamsResponseAItem, type index_PartialBookDepthStreamsResponseBItem as PartialBookDepthStreamsResponseBItem, type index_Ticker24HourByUnderlyingAssetAndExpirationDataRequest as Ticker24HourByUnderlyingAssetAndExpirationDataRequest, type index_Ticker24HourByUnderlyingAssetAndExpirationDataResponse as Ticker24HourByUnderlyingAssetAndExpirationDataResponse, type index_Ticker24HourByUnderlyingAssetAndExpirationDataResponseInner as Ticker24HourByUnderlyingAssetAndExpirationDataResponseInner, type index_Ticker24HourRequest as Ticker24HourRequest, type index_Ticker24HourResponse as Ticker24HourResponse, type index_TradeStreamsRequest as TradeStreamsRequest, type index_TradeStreamsResponse as TradeStreamsResponse, index_WebsocketMarketStreamsApi as WebsocketMarketStreamsApi, type index_WebsocketMarketStreamsApiInterface as WebsocketMarketStreamsApiInterface, index_WebsocketStreams as WebsocketStreams, index_WebsocketStreamsConnection as WebsocketStreamsConnection };
9747
+ export { type index_AccountUpdate as AccountUpdate, type index_AccountUpdateBInner as AccountUpdateBInner, type index_AccountUpdateGInner as AccountUpdateGInner, type index_AccountUpdatePInner as AccountUpdatePInner, type index_IndexPriceStreamsRequest as IndexPriceStreamsRequest, type index_IndexPriceStreamsResponse as IndexPriceStreamsResponse, type index_KlineCandlestickStreamsRequest as KlineCandlestickStreamsRequest, type index_KlineCandlestickStreamsResponse as KlineCandlestickStreamsResponse, type index_KlineCandlestickStreamsResponseK as KlineCandlestickStreamsResponseK, type index_MarkPriceRequest as MarkPriceRequest, type index_MarkPriceResponse as MarkPriceResponse, type index_MarkPriceResponseInner as MarkPriceResponseInner, type index_NewSymbolInfoRequest as NewSymbolInfoRequest, type index_NewSymbolInfoResponse as NewSymbolInfoResponse, type index_OpenInterestRequest as OpenInterestRequest, type index_OpenInterestResponse as OpenInterestResponse, type index_OpenInterestResponseInner as OpenInterestResponseInner, type index_OrderTradeUpdate as OrderTradeUpdate, type index_OrderTradeUpdateOInner as OrderTradeUpdateOInner, type index_OrderTradeUpdateOInnerFiInner as OrderTradeUpdateOInnerFiInner, type index_PartialBookDepthStreamsRequest as PartialBookDepthStreamsRequest, type index_PartialBookDepthStreamsResponse as PartialBookDepthStreamsResponse, type index_PartialBookDepthStreamsResponseAItem as PartialBookDepthStreamsResponseAItem, type index_PartialBookDepthStreamsResponseBItem as PartialBookDepthStreamsResponseBItem, type index_RiskLevelChange as RiskLevelChange, type index_Ticker24HourByUnderlyingAssetAndExpirationDataRequest as Ticker24HourByUnderlyingAssetAndExpirationDataRequest, type index_Ticker24HourByUnderlyingAssetAndExpirationDataResponse as Ticker24HourByUnderlyingAssetAndExpirationDataResponse, type index_Ticker24HourByUnderlyingAssetAndExpirationDataResponseInner as Ticker24HourByUnderlyingAssetAndExpirationDataResponseInner, type index_Ticker24HourRequest as Ticker24HourRequest, type index_Ticker24HourResponse as Ticker24HourResponse, type index_TradeStreamsRequest as TradeStreamsRequest, type index_TradeStreamsResponse as TradeStreamsResponse, type index_UserDataStreamEventsResponse as UserDataStreamEventsResponse, index_WebsocketMarketStreamsApi as WebsocketMarketStreamsApi, type index_WebsocketMarketStreamsApiInterface as WebsocketMarketStreamsApiInterface, index_WebsocketStreams as WebsocketStreams, index_WebsocketStreamsConnection as WebsocketStreamsConnection };
9245
9748
  }
9246
9749
 
9247
9750
  interface ConfigurationDerivativesTradingOptions {