@binance/derivatives-trading-options 11.0.0 → 13.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 +28 -0
- package/dist/index.d.mts +1323 -1662
- package/dist/index.d.ts +1323 -1662
- package/dist/index.js +372 -446
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +362 -448
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -14,7 +14,7 @@ let __binance_common = require("@binance/common");
|
|
|
14
14
|
|
|
15
15
|
//#region package.json
|
|
16
16
|
var name = "@binance/derivatives-trading-options";
|
|
17
|
-
var version = "
|
|
17
|
+
var version = "13.0.0";
|
|
18
18
|
|
|
19
19
|
//#endregion
|
|
20
20
|
//#region src/rest-api/types/place-multiple-orders-orders-parameter-inner.ts
|
|
@@ -26,7 +26,8 @@ const PlaceMultipleOrdersOrdersParameterInnerTypeEnum = { LIMIT: "LIMIT" };
|
|
|
26
26
|
const PlaceMultipleOrdersOrdersParameterInnerTimeInForceEnum = {
|
|
27
27
|
GTC: "GTC",
|
|
28
28
|
IOC: "IOC",
|
|
29
|
-
FOK: "FOK"
|
|
29
|
+
FOK: "FOK",
|
|
30
|
+
GTX: "GTX"
|
|
30
31
|
};
|
|
31
32
|
const PlaceMultipleOrdersOrdersParameterInnerNewOrderRespTypeEnum = {
|
|
32
33
|
ACK: "ACK",
|
|
@@ -72,54 +73,6 @@ const AccountApiAxiosParamCreator = function(configuration) {
|
|
|
72
73
|
timeUnit: _timeUnit
|
|
73
74
|
};
|
|
74
75
|
},
|
|
75
|
-
getDownloadIdForOptionTransactionHistory: async (startTime, endTime, recvWindow) => {
|
|
76
|
-
(0, __binance_common.assertParamExists)("getDownloadIdForOptionTransactionHistory", "startTime", startTime);
|
|
77
|
-
(0, __binance_common.assertParamExists)("getDownloadIdForOptionTransactionHistory", "endTime", endTime);
|
|
78
|
-
const localVarQueryParameter = {};
|
|
79
|
-
const localVarBodyParameter = {};
|
|
80
|
-
if (startTime !== void 0 && startTime !== null) localVarQueryParameter["startTime"] = startTime;
|
|
81
|
-
if (endTime !== void 0 && endTime !== null) localVarQueryParameter["endTime"] = endTime;
|
|
82
|
-
if (recvWindow !== void 0 && recvWindow !== null) localVarQueryParameter["recvWindow"] = recvWindow;
|
|
83
|
-
let _timeUnit;
|
|
84
|
-
if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
|
|
85
|
-
return {
|
|
86
|
-
endpoint: "/eapi/v1/income/asyn",
|
|
87
|
-
method: "GET",
|
|
88
|
-
queryParams: localVarQueryParameter,
|
|
89
|
-
bodyParams: localVarBodyParameter,
|
|
90
|
-
timeUnit: _timeUnit
|
|
91
|
-
};
|
|
92
|
-
},
|
|
93
|
-
getOptionTransactionHistoryDownloadLinkById: async (downloadId, recvWindow) => {
|
|
94
|
-
(0, __binance_common.assertParamExists)("getOptionTransactionHistoryDownloadLinkById", "downloadId", downloadId);
|
|
95
|
-
const localVarQueryParameter = {};
|
|
96
|
-
const localVarBodyParameter = {};
|
|
97
|
-
if (downloadId !== void 0 && downloadId !== null) localVarQueryParameter["downloadId"] = downloadId;
|
|
98
|
-
if (recvWindow !== void 0 && recvWindow !== null) localVarQueryParameter["recvWindow"] = recvWindow;
|
|
99
|
-
let _timeUnit;
|
|
100
|
-
if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
|
|
101
|
-
return {
|
|
102
|
-
endpoint: "/eapi/v1/income/asyn/id",
|
|
103
|
-
method: "GET",
|
|
104
|
-
queryParams: localVarQueryParameter,
|
|
105
|
-
bodyParams: localVarBodyParameter,
|
|
106
|
-
timeUnit: _timeUnit
|
|
107
|
-
};
|
|
108
|
-
},
|
|
109
|
-
optionAccountInformation: async (recvWindow) => {
|
|
110
|
-
const localVarQueryParameter = {};
|
|
111
|
-
const localVarBodyParameter = {};
|
|
112
|
-
if (recvWindow !== void 0 && recvWindow !== null) localVarQueryParameter["recvWindow"] = recvWindow;
|
|
113
|
-
let _timeUnit;
|
|
114
|
-
if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
|
|
115
|
-
return {
|
|
116
|
-
endpoint: "/eapi/v1/account",
|
|
117
|
-
method: "GET",
|
|
118
|
-
queryParams: localVarQueryParameter,
|
|
119
|
-
bodyParams: localVarBodyParameter,
|
|
120
|
-
timeUnit: _timeUnit
|
|
121
|
-
};
|
|
122
|
-
},
|
|
123
76
|
optionMarginAccountInformation: async (recvWindow) => {
|
|
124
77
|
const localVarQueryParameter = {};
|
|
125
78
|
const localVarBodyParameter = {};
|
|
@@ -155,66 +108,13 @@ var AccountApi = class {
|
|
|
155
108
|
* @returns {Promise<RestApiResponse<AccountFundingFlowResponse>>}
|
|
156
109
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
157
110
|
* @memberof AccountApi
|
|
158
|
-
* @see {@link https://developers.binance.com/docs/derivatives/
|
|
111
|
+
* @see {@link https://developers.binance.com/docs/derivatives/options-trading/account/Account-Funding-Flow Binance API Documentation}
|
|
159
112
|
*/
|
|
160
113
|
async accountFundingFlow(requestParameters) {
|
|
161
114
|
const localVarAxiosArgs = await this.localVarAxiosParamCreator.accountFundingFlow(requestParameters?.currency, requestParameters?.recordId, requestParameters?.startTime, requestParameters?.endTime, requestParameters?.limit, requestParameters?.recvWindow);
|
|
162
115
|
return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
|
|
163
116
|
}
|
|
164
117
|
/**
|
|
165
|
-
* Get download id for option transaction history
|
|
166
|
-
*
|
|
167
|
-
* Request Limitation is 5 times per month, shared by > front end download page and rest api
|
|
168
|
-
* The time between `startTime` and `endTime` can not be longer than 1 year
|
|
169
|
-
*
|
|
170
|
-
* Weight: 5
|
|
171
|
-
*
|
|
172
|
-
* @summary Get Download Id For Option Transaction History (USER_DATA)
|
|
173
|
-
* @param {GetDownloadIdForOptionTransactionHistoryRequest} requestParameters Request parameters.
|
|
174
|
-
* @returns {Promise<RestApiResponse<GetDownloadIdForOptionTransactionHistoryResponse>>}
|
|
175
|
-
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
176
|
-
* @memberof AccountApi
|
|
177
|
-
* @see {@link https://developers.binance.com/docs/derivatives/option/account/Get-Download-Id-For-Option-Transaction-History Binance API Documentation}
|
|
178
|
-
*/
|
|
179
|
-
async getDownloadIdForOptionTransactionHistory(requestParameters) {
|
|
180
|
-
const localVarAxiosArgs = await this.localVarAxiosParamCreator.getDownloadIdForOptionTransactionHistory(requestParameters?.startTime, requestParameters?.endTime, requestParameters?.recvWindow);
|
|
181
|
-
return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
|
|
182
|
-
}
|
|
183
|
-
/**
|
|
184
|
-
* Get option transaction history download Link by Id
|
|
185
|
-
*
|
|
186
|
-
* Download link expiration: 24h
|
|
187
|
-
*
|
|
188
|
-
* Weight: 5
|
|
189
|
-
*
|
|
190
|
-
* @summary Get Option Transaction History Download Link by Id (USER_DATA)
|
|
191
|
-
* @param {GetOptionTransactionHistoryDownloadLinkByIdRequest} requestParameters Request parameters.
|
|
192
|
-
* @returns {Promise<RestApiResponse<GetOptionTransactionHistoryDownloadLinkByIdResponse>>}
|
|
193
|
-
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
194
|
-
* @memberof AccountApi
|
|
195
|
-
* @see {@link https://developers.binance.com/docs/derivatives/option/account/Get-Option-Transaction-History-Download-Link-by-Id Binance API Documentation}
|
|
196
|
-
*/
|
|
197
|
-
async getOptionTransactionHistoryDownloadLinkById(requestParameters) {
|
|
198
|
-
const localVarAxiosArgs = await this.localVarAxiosParamCreator.getOptionTransactionHistoryDownloadLinkById(requestParameters?.downloadId, requestParameters?.recvWindow);
|
|
199
|
-
return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
|
|
200
|
-
}
|
|
201
|
-
/**
|
|
202
|
-
* Get current account information.
|
|
203
|
-
*
|
|
204
|
-
* Weight: 3
|
|
205
|
-
*
|
|
206
|
-
* @summary Option Account Information(TRADE)
|
|
207
|
-
* @param {OptionAccountInformationRequest} requestParameters Request parameters.
|
|
208
|
-
* @returns {Promise<RestApiResponse<OptionAccountInformationResponse>>}
|
|
209
|
-
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
210
|
-
* @memberof AccountApi
|
|
211
|
-
* @see {@link https://developers.binance.com/docs/derivatives/option/account/Option-Account-Information Binance API Documentation}
|
|
212
|
-
*/
|
|
213
|
-
async optionAccountInformation(requestParameters = {}) {
|
|
214
|
-
const localVarAxiosArgs = await this.localVarAxiosParamCreator.optionAccountInformation(requestParameters?.recvWindow);
|
|
215
|
-
return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
|
|
216
|
-
}
|
|
217
|
-
/**
|
|
218
118
|
* Get current account information.
|
|
219
119
|
*
|
|
220
120
|
* Weight: 3
|
|
@@ -224,7 +124,7 @@ var AccountApi = class {
|
|
|
224
124
|
* @returns {Promise<RestApiResponse<OptionMarginAccountInformationResponse>>}
|
|
225
125
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
226
126
|
* @memberof AccountApi
|
|
227
|
-
* @see {@link https://developers.binance.com/docs/derivatives/
|
|
127
|
+
* @see {@link https://developers.binance.com/docs/derivatives/options-trading/account/Option-Margin-Account-Information Binance API Documentation}
|
|
228
128
|
*/
|
|
229
129
|
async optionMarginAccountInformation(requestParameters = {}) {
|
|
230
130
|
const localVarAxiosArgs = await this.localVarAxiosParamCreator.optionMarginAccountInformation(requestParameters?.recvWindow);
|
|
@@ -294,8 +194,8 @@ const MarketDataApiAxiosParamCreator = function(configuration) {
|
|
|
294
194
|
timeUnit: _timeUnit
|
|
295
195
|
};
|
|
296
196
|
},
|
|
297
|
-
|
|
298
|
-
(0, __binance_common.assertParamExists)("
|
|
197
|
+
indexPrice: async (underlying) => {
|
|
198
|
+
(0, __binance_common.assertParamExists)("indexPrice", "underlying", underlying);
|
|
299
199
|
const localVarQueryParameter = {};
|
|
300
200
|
const localVarBodyParameter = {};
|
|
301
201
|
if (underlying !== void 0 && underlying !== null) localVarQueryParameter["underlying"] = underlying;
|
|
@@ -329,23 +229,6 @@ const MarketDataApiAxiosParamCreator = function(configuration) {
|
|
|
329
229
|
timeUnit: _timeUnit
|
|
330
230
|
};
|
|
331
231
|
},
|
|
332
|
-
oldTradesLookup: async (symbol, fromId, limit) => {
|
|
333
|
-
(0, __binance_common.assertParamExists)("oldTradesLookup", "symbol", symbol);
|
|
334
|
-
const localVarQueryParameter = {};
|
|
335
|
-
const localVarBodyParameter = {};
|
|
336
|
-
if (symbol !== void 0 && symbol !== null) localVarQueryParameter["symbol"] = symbol;
|
|
337
|
-
if (fromId !== void 0 && fromId !== null) localVarQueryParameter["fromId"] = fromId;
|
|
338
|
-
if (limit !== void 0 && limit !== null) localVarQueryParameter["limit"] = limit;
|
|
339
|
-
let _timeUnit;
|
|
340
|
-
if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
|
|
341
|
-
return {
|
|
342
|
-
endpoint: "/eapi/v1/historicalTrades",
|
|
343
|
-
method: "GET",
|
|
344
|
-
queryParams: localVarQueryParameter,
|
|
345
|
-
bodyParams: localVarBodyParameter,
|
|
346
|
-
timeUnit: _timeUnit
|
|
347
|
-
};
|
|
348
|
-
},
|
|
349
232
|
openInterest: async (underlyingAsset, expiration) => {
|
|
350
233
|
(0, __binance_common.assertParamExists)("openInterest", "underlyingAsset", underlyingAsset);
|
|
351
234
|
(0, __binance_common.assertParamExists)("openInterest", "expiration", expiration);
|
|
@@ -471,7 +354,7 @@ var MarketDataApi = class {
|
|
|
471
354
|
* @returns {Promise<RestApiResponse<CheckServerTimeResponse>>}
|
|
472
355
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
473
356
|
* @memberof MarketDataApi
|
|
474
|
-
* @see {@link https://developers.binance.com/docs/derivatives/
|
|
357
|
+
* @see {@link https://developers.binance.com/docs/derivatives/options-trading/market-data/Check-Server-Time Binance API Documentation}
|
|
475
358
|
*/
|
|
476
359
|
async checkServerTime() {
|
|
477
360
|
const localVarAxiosArgs = await this.localVarAxiosParamCreator.checkServerTime();
|
|
@@ -486,7 +369,7 @@ var MarketDataApi = class {
|
|
|
486
369
|
* @returns {Promise<RestApiResponse<ExchangeInformationResponse>>}
|
|
487
370
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
488
371
|
* @memberof MarketDataApi
|
|
489
|
-
* @see {@link https://developers.binance.com/docs/derivatives/
|
|
372
|
+
* @see {@link https://developers.binance.com/docs/derivatives/options-trading/market-data/Exchange-Information Binance API Documentation}
|
|
490
373
|
*/
|
|
491
374
|
async exchangeInformation() {
|
|
492
375
|
const localVarAxiosArgs = await this.localVarAxiosParamCreator.exchangeInformation();
|
|
@@ -504,7 +387,7 @@ var MarketDataApi = class {
|
|
|
504
387
|
* @returns {Promise<RestApiResponse<HistoricalExerciseRecordsResponse>>}
|
|
505
388
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
506
389
|
* @memberof MarketDataApi
|
|
507
|
-
* @see {@link https://developers.binance.com/docs/derivatives/
|
|
390
|
+
* @see {@link https://developers.binance.com/docs/derivatives/options-trading/market-data/Historical-Exercise-Records Binance API Documentation}
|
|
508
391
|
*/
|
|
509
392
|
async historicalExerciseRecords(requestParameters = {}) {
|
|
510
393
|
const localVarAxiosArgs = await this.localVarAxiosParamCreator.historicalExerciseRecords(requestParameters?.underlying, requestParameters?.startTime, requestParameters?.endTime, requestParameters?.limit);
|
|
@@ -515,15 +398,15 @@ var MarketDataApi = class {
|
|
|
515
398
|
*
|
|
516
399
|
* Weight: 1
|
|
517
400
|
*
|
|
518
|
-
* @summary Index Price
|
|
519
|
-
* @param {
|
|
520
|
-
* @returns {Promise<RestApiResponse<
|
|
401
|
+
* @summary Index Price
|
|
402
|
+
* @param {IndexPriceRequest} requestParameters Request parameters.
|
|
403
|
+
* @returns {Promise<RestApiResponse<IndexPriceResponse>>}
|
|
521
404
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
522
405
|
* @memberof MarketDataApi
|
|
523
|
-
* @see {@link https://developers.binance.com/docs/derivatives/
|
|
406
|
+
* @see {@link https://developers.binance.com/docs/derivatives/options-trading/market-data/Symbol-Price-Ticker Binance API Documentation}
|
|
524
407
|
*/
|
|
525
|
-
async
|
|
526
|
-
const localVarAxiosArgs = await this.localVarAxiosParamCreator.
|
|
408
|
+
async indexPrice(requestParameters) {
|
|
409
|
+
const localVarAxiosArgs = await this.localVarAxiosParamCreator.indexPrice(requestParameters?.underlying);
|
|
527
410
|
return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs?.timeUnit, { isSigned: false });
|
|
528
411
|
}
|
|
529
412
|
/**
|
|
@@ -539,29 +422,13 @@ var MarketDataApi = class {
|
|
|
539
422
|
* @returns {Promise<RestApiResponse<KlineCandlestickDataResponse>>}
|
|
540
423
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
541
424
|
* @memberof MarketDataApi
|
|
542
|
-
* @see {@link https://developers.binance.com/docs/derivatives/
|
|
425
|
+
* @see {@link https://developers.binance.com/docs/derivatives/options-trading/market-data/Kline-Candlestick-Data Binance API Documentation}
|
|
543
426
|
*/
|
|
544
427
|
async klineCandlestickData(requestParameters) {
|
|
545
428
|
const localVarAxiosArgs = await this.localVarAxiosParamCreator.klineCandlestickData(requestParameters?.symbol, requestParameters?.interval, requestParameters?.startTime, requestParameters?.endTime, requestParameters?.limit);
|
|
546
429
|
return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs?.timeUnit, { isSigned: false });
|
|
547
430
|
}
|
|
548
431
|
/**
|
|
549
|
-
* Get older market historical trades.
|
|
550
|
-
*
|
|
551
|
-
* Weight: 20
|
|
552
|
-
*
|
|
553
|
-
* @summary Old Trades Lookup (MARKET_DATA)
|
|
554
|
-
* @param {OldTradesLookupRequest} requestParameters Request parameters.
|
|
555
|
-
* @returns {Promise<RestApiResponse<OldTradesLookupResponse>>}
|
|
556
|
-
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
557
|
-
* @memberof MarketDataApi
|
|
558
|
-
* @see {@link https://developers.binance.com/docs/derivatives/option/market-data/Old-Trades-Lookup Binance API Documentation}
|
|
559
|
-
*/
|
|
560
|
-
async oldTradesLookup(requestParameters) {
|
|
561
|
-
const localVarAxiosArgs = await this.localVarAxiosParamCreator.oldTradesLookup(requestParameters?.symbol, requestParameters?.fromId, requestParameters?.limit);
|
|
562
|
-
return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs?.timeUnit, { isSigned: false });
|
|
563
|
-
}
|
|
564
|
-
/**
|
|
565
432
|
* Get open interest for specific underlying asset on specific expiration date.
|
|
566
433
|
*
|
|
567
434
|
* Weight: 0
|
|
@@ -571,7 +438,7 @@ var MarketDataApi = class {
|
|
|
571
438
|
* @returns {Promise<RestApiResponse<OpenInterestResponse>>}
|
|
572
439
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
573
440
|
* @memberof MarketDataApi
|
|
574
|
-
* @see {@link https://developers.binance.com/docs/derivatives/
|
|
441
|
+
* @see {@link https://developers.binance.com/docs/derivatives/options-trading/market-data/Open-Interest Binance API Documentation}
|
|
575
442
|
*/
|
|
576
443
|
async openInterest(requestParameters) {
|
|
577
444
|
const localVarAxiosArgs = await this.localVarAxiosParamCreator.openInterest(requestParameters?.underlyingAsset, requestParameters?.expiration);
|
|
@@ -587,7 +454,7 @@ var MarketDataApi = class {
|
|
|
587
454
|
* @returns {Promise<RestApiResponse<OptionMarkPriceResponse>>}
|
|
588
455
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
589
456
|
* @memberof MarketDataApi
|
|
590
|
-
* @see {@link https://developers.binance.com/docs/derivatives/
|
|
457
|
+
* @see {@link https://developers.binance.com/docs/derivatives/options-trading/market-data/Option-Mark-Price Binance API Documentation}
|
|
591
458
|
*/
|
|
592
459
|
async optionMarkPrice(requestParameters = {}) {
|
|
593
460
|
const localVarAxiosArgs = await this.localVarAxiosParamCreator.optionMarkPrice(requestParameters?.symbol);
|
|
@@ -598,7 +465,7 @@ var MarketDataApi = class {
|
|
|
598
465
|
*
|
|
599
466
|
* Weight: limit | weight
|
|
600
467
|
* ------------ | ------------
|
|
601
|
-
* 5, 10, 20, 50 |
|
|
468
|
+
* 5, 10, 20, 50 | 1
|
|
602
469
|
* 100 | 5
|
|
603
470
|
* 500 | 10
|
|
604
471
|
* 1000 | 20
|
|
@@ -608,7 +475,7 @@ var MarketDataApi = class {
|
|
|
608
475
|
* @returns {Promise<RestApiResponse<OrderBookResponse>>}
|
|
609
476
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
610
477
|
* @memberof MarketDataApi
|
|
611
|
-
* @see {@link https://developers.binance.com/docs/derivatives/
|
|
478
|
+
* @see {@link https://developers.binance.com/docs/derivatives/options-trading/market-data/Order-Book Binance API Documentation}
|
|
612
479
|
*/
|
|
613
480
|
async orderBook(requestParameters) {
|
|
614
481
|
const localVarAxiosArgs = await this.localVarAxiosParamCreator.orderBook(requestParameters?.symbol, requestParameters?.limit);
|
|
@@ -624,7 +491,7 @@ var MarketDataApi = class {
|
|
|
624
491
|
* @returns {Promise<RestApiResponse<RecentBlockTradesListResponse>>}
|
|
625
492
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
626
493
|
* @memberof MarketDataApi
|
|
627
|
-
* @see {@link https://developers.binance.com/docs/derivatives/
|
|
494
|
+
* @see {@link https://developers.binance.com/docs/derivatives/options-trading/market-data/Recent-Block-Trade-List Binance API Documentation}
|
|
628
495
|
*/
|
|
629
496
|
async recentBlockTradesList(requestParameters = {}) {
|
|
630
497
|
const localVarAxiosArgs = await this.localVarAxiosParamCreator.recentBlockTradesList(requestParameters?.symbol, requestParameters?.limit);
|
|
@@ -640,7 +507,7 @@ var MarketDataApi = class {
|
|
|
640
507
|
* @returns {Promise<RestApiResponse<RecentTradesListResponse>>}
|
|
641
508
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
642
509
|
* @memberof MarketDataApi
|
|
643
|
-
* @see {@link https://developers.binance.com/docs/derivatives/
|
|
510
|
+
* @see {@link https://developers.binance.com/docs/derivatives/options-trading/market-data/Recent-Trades-List Binance API Documentation}
|
|
644
511
|
*/
|
|
645
512
|
async recentTradesList(requestParameters) {
|
|
646
513
|
const localVarAxiosArgs = await this.localVarAxiosParamCreator.recentTradesList(requestParameters?.symbol, requestParameters?.limit);
|
|
@@ -655,7 +522,7 @@ var MarketDataApi = class {
|
|
|
655
522
|
* @returns {Promise<RestApiResponse<void>>}
|
|
656
523
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
657
524
|
* @memberof MarketDataApi
|
|
658
|
-
* @see {@link https://developers.binance.com/docs/derivatives/
|
|
525
|
+
* @see {@link https://developers.binance.com/docs/derivatives/options-trading/market-data/Test-Connectivity Binance API Documentation}
|
|
659
526
|
*/
|
|
660
527
|
async testConnectivity() {
|
|
661
528
|
const localVarAxiosArgs = await this.localVarAxiosParamCreator.testConnectivity();
|
|
@@ -671,7 +538,7 @@ var MarketDataApi = class {
|
|
|
671
538
|
* @returns {Promise<RestApiResponse<Ticker24hrPriceChangeStatisticsResponse>>}
|
|
672
539
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
673
540
|
* @memberof MarketDataApi
|
|
674
|
-
* @see {@link https://developers.binance.com/docs/derivatives/
|
|
541
|
+
* @see {@link https://developers.binance.com/docs/derivatives/options-trading/market-data/24hr-Ticker-Price-Change-Statistics Binance API Documentation}
|
|
675
542
|
*/
|
|
676
543
|
async ticker24hrPriceChangeStatistics(requestParameters = {}) {
|
|
677
544
|
const localVarAxiosArgs = await this.localVarAxiosParamCreator.ticker24hrPriceChangeStatistics(requestParameters?.symbol);
|
|
@@ -836,7 +703,7 @@ var MarketMakerBlockTradeApi = class {
|
|
|
836
703
|
* @returns {Promise<RestApiResponse<AcceptBlockTradeOrderResponse>>}
|
|
837
704
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
838
705
|
* @memberof MarketMakerBlockTradeApi
|
|
839
|
-
* @see {@link https://developers.binance.com/docs/derivatives/
|
|
706
|
+
* @see {@link https://developers.binance.com/docs/derivatives/options-trading/market-maker-block-trade/Accept-Block-Trade-Order Binance API Documentation}
|
|
840
707
|
*/
|
|
841
708
|
async acceptBlockTradeOrder(requestParameters) {
|
|
842
709
|
const localVarAxiosArgs = await this.localVarAxiosParamCreator.acceptBlockTradeOrder(requestParameters?.blockOrderMatchingKey, requestParameters?.recvWindow);
|
|
@@ -852,7 +719,7 @@ var MarketMakerBlockTradeApi = class {
|
|
|
852
719
|
* @returns {Promise<RestApiResponse<AccountBlockTradeListResponse>>}
|
|
853
720
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
854
721
|
* @memberof MarketMakerBlockTradeApi
|
|
855
|
-
* @see {@link https://developers.binance.com/docs/derivatives/
|
|
722
|
+
* @see {@link https://developers.binance.com/docs/derivatives/options-trading/market-maker-block-trade/Account-Block-Trade-List Binance API Documentation}
|
|
856
723
|
*/
|
|
857
724
|
async accountBlockTradeList(requestParameters = {}) {
|
|
858
725
|
const localVarAxiosArgs = await this.localVarAxiosParamCreator.accountBlockTradeList(requestParameters?.endTime, requestParameters?.startTime, requestParameters?.underlying, requestParameters?.recvWindow);
|
|
@@ -868,7 +735,7 @@ var MarketMakerBlockTradeApi = class {
|
|
|
868
735
|
* @returns {Promise<RestApiResponse<void>>}
|
|
869
736
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
870
737
|
* @memberof MarketMakerBlockTradeApi
|
|
871
|
-
* @see {@link https://developers.binance.com/docs/derivatives/
|
|
738
|
+
* @see {@link https://developers.binance.com/docs/derivatives/options-trading/market-maker-block-trade/Cancel-Block-Trade-Order Binance API Documentation}
|
|
872
739
|
*/
|
|
873
740
|
async cancelBlockTradeOrder(requestParameters) {
|
|
874
741
|
const localVarAxiosArgs = await this.localVarAxiosParamCreator.cancelBlockTradeOrder(requestParameters?.blockOrderMatchingKey, requestParameters?.recvWindow);
|
|
@@ -884,7 +751,7 @@ var MarketMakerBlockTradeApi = class {
|
|
|
884
751
|
* @returns {Promise<RestApiResponse<ExtendBlockTradeOrderResponse>>}
|
|
885
752
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
886
753
|
* @memberof MarketMakerBlockTradeApi
|
|
887
|
-
* @see {@link https://developers.binance.com/docs/derivatives/
|
|
754
|
+
* @see {@link https://developers.binance.com/docs/derivatives/options-trading/market-maker-block-trade/Extend-Block-Trade-Order Binance API Documentation}
|
|
888
755
|
*/
|
|
889
756
|
async extendBlockTradeOrder(requestParameters) {
|
|
890
757
|
const localVarAxiosArgs = await this.localVarAxiosParamCreator.extendBlockTradeOrder(requestParameters?.blockOrderMatchingKey, requestParameters?.recvWindow);
|
|
@@ -900,7 +767,7 @@ var MarketMakerBlockTradeApi = class {
|
|
|
900
767
|
* @returns {Promise<RestApiResponse<NewBlockTradeOrderResponse>>}
|
|
901
768
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
902
769
|
* @memberof MarketMakerBlockTradeApi
|
|
903
|
-
* @see {@link https://developers.binance.com/docs/derivatives/
|
|
770
|
+
* @see {@link https://developers.binance.com/docs/derivatives/options-trading/market-maker-block-trade/New-Block-Trade-Order Binance API Documentation}
|
|
904
771
|
*/
|
|
905
772
|
async newBlockTradeOrder(requestParameters) {
|
|
906
773
|
const localVarAxiosArgs = await this.localVarAxiosParamCreator.newBlockTradeOrder(requestParameters?.liquidity, requestParameters?.legs, requestParameters?.recvWindow);
|
|
@@ -916,7 +783,7 @@ var MarketMakerBlockTradeApi = class {
|
|
|
916
783
|
* @returns {Promise<RestApiResponse<QueryBlockTradeDetailsResponse>>}
|
|
917
784
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
918
785
|
* @memberof MarketMakerBlockTradeApi
|
|
919
|
-
* @see {@link https://developers.binance.com/docs/derivatives/
|
|
786
|
+
* @see {@link https://developers.binance.com/docs/derivatives/options-trading/market-maker-block-trade/Query-Block-Trade-Detail Binance API Documentation}
|
|
920
787
|
*/
|
|
921
788
|
async queryBlockTradeDetails(requestParameters) {
|
|
922
789
|
const localVarAxiosArgs = await this.localVarAxiosParamCreator.queryBlockTradeDetails(requestParameters?.blockOrderMatchingKey, requestParameters?.recvWindow);
|
|
@@ -932,7 +799,7 @@ var MarketMakerBlockTradeApi = class {
|
|
|
932
799
|
* @returns {Promise<RestApiResponse<QueryBlockTradeOrderResponse>>}
|
|
933
800
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
934
801
|
* @memberof MarketMakerBlockTradeApi
|
|
935
|
-
* @see {@link https://developers.binance.com/docs/derivatives/
|
|
802
|
+
* @see {@link https://developers.binance.com/docs/derivatives/options-trading/market-maker-block-trade/Query-Block-Trade-Order Binance API Documentation}
|
|
936
803
|
*/
|
|
937
804
|
async queryBlockTradeOrder(requestParameters = {}) {
|
|
938
805
|
const localVarAxiosArgs = await this.localVarAxiosParamCreator.queryBlockTradeOrder(requestParameters?.blockOrderMatchingKey, requestParameters?.endTime, requestParameters?.startTime, requestParameters?.underlying, requestParameters?.recvWindow);
|
|
@@ -1080,7 +947,7 @@ var MarketMakerEndpointsApi = class {
|
|
|
1080
947
|
* @returns {Promise<RestApiResponse<AutoCancelAllOpenOrdersResponse>>}
|
|
1081
948
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
1082
949
|
* @memberof MarketMakerEndpointsApi
|
|
1083
|
-
* @see {@link https://developers.binance.com/docs/derivatives/
|
|
950
|
+
* @see {@link https://developers.binance.com/docs/derivatives/options-trading/market-maker-endpoints/Auto-Cancel-All-Open-Orders-Heartbeat Binance API Documentation}
|
|
1084
951
|
*/
|
|
1085
952
|
async autoCancelAllOpenOrders(requestParameters) {
|
|
1086
953
|
const localVarAxiosArgs = await this.localVarAxiosParamCreator.autoCancelAllOpenOrders(requestParameters?.underlyings, requestParameters?.recvWindow);
|
|
@@ -1098,7 +965,7 @@ var MarketMakerEndpointsApi = class {
|
|
|
1098
965
|
* @returns {Promise<RestApiResponse<GetAutoCancelAllOpenOrdersResponse>>}
|
|
1099
966
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
1100
967
|
* @memberof MarketMakerEndpointsApi
|
|
1101
|
-
* @see {@link https://developers.binance.com/docs/derivatives/
|
|
968
|
+
* @see {@link https://developers.binance.com/docs/derivatives/options-trading/market-maker-endpoints/Get-Auto-Cancel-All-Open-Orders-Config Binance API Documentation}
|
|
1102
969
|
*/
|
|
1103
970
|
async getAutoCancelAllOpenOrders(requestParameters = {}) {
|
|
1104
971
|
const localVarAxiosArgs = await this.localVarAxiosParamCreator.getAutoCancelAllOpenOrders(requestParameters?.underlying, requestParameters?.recvWindow);
|
|
@@ -1114,7 +981,7 @@ var MarketMakerEndpointsApi = class {
|
|
|
1114
981
|
* @returns {Promise<RestApiResponse<GetMarketMakerProtectionConfigResponse>>}
|
|
1115
982
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
1116
983
|
* @memberof MarketMakerEndpointsApi
|
|
1117
|
-
* @see {@link https://developers.binance.com/docs/derivatives/
|
|
984
|
+
* @see {@link https://developers.binance.com/docs/derivatives/options-trading/market-maker-endpoints/Get-Market-Maker-Protection-Config Binance API Documentation}
|
|
1118
985
|
*/
|
|
1119
986
|
async getMarketMakerProtectionConfig(requestParameters = {}) {
|
|
1120
987
|
const localVarAxiosArgs = await this.localVarAxiosParamCreator.getMarketMakerProtectionConfig(requestParameters?.underlying, requestParameters?.recvWindow);
|
|
@@ -1130,7 +997,7 @@ var MarketMakerEndpointsApi = class {
|
|
|
1130
997
|
* @returns {Promise<RestApiResponse<ResetMarketMakerProtectionConfigResponse>>}
|
|
1131
998
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
1132
999
|
* @memberof MarketMakerEndpointsApi
|
|
1133
|
-
* @see {@link https://developers.binance.com/docs/derivatives/
|
|
1000
|
+
* @see {@link https://developers.binance.com/docs/derivatives/options-trading/market-maker-endpoints/Reset-Market-Maker-Protection-Config Binance API Documentation}
|
|
1134
1001
|
*/
|
|
1135
1002
|
async resetMarketMakerProtectionConfig(requestParameters = {}) {
|
|
1136
1003
|
const localVarAxiosArgs = await this.localVarAxiosParamCreator.resetMarketMakerProtectionConfig(requestParameters?.underlying, requestParameters?.recvWindow);
|
|
@@ -1152,7 +1019,7 @@ var MarketMakerEndpointsApi = class {
|
|
|
1152
1019
|
* @returns {Promise<RestApiResponse<SetAutoCancelAllOpenOrdersResponse>>}
|
|
1153
1020
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
1154
1021
|
* @memberof MarketMakerEndpointsApi
|
|
1155
|
-
* @see {@link https://developers.binance.com/docs/derivatives/
|
|
1022
|
+
* @see {@link https://developers.binance.com/docs/derivatives/options-trading/market-maker-endpoints/Set-Auto-Cancel-All-Open-Orders-Config Binance API Documentation}
|
|
1156
1023
|
*/
|
|
1157
1024
|
async setAutoCancelAllOpenOrders(requestParameters) {
|
|
1158
1025
|
const localVarAxiosArgs = await this.localVarAxiosParamCreator.setAutoCancelAllOpenOrders(requestParameters?.underlying, requestParameters?.countdownTime, requestParameters?.recvWindow);
|
|
@@ -1169,7 +1036,7 @@ var MarketMakerEndpointsApi = class {
|
|
|
1169
1036
|
* @returns {Promise<RestApiResponse<SetMarketMakerProtectionConfigResponse>>}
|
|
1170
1037
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
1171
1038
|
* @memberof MarketMakerEndpointsApi
|
|
1172
|
-
* @see {@link https://developers.binance.com/docs/derivatives/
|
|
1039
|
+
* @see {@link https://developers.binance.com/docs/derivatives/options-trading/market-maker-endpoints/Set-Market-Maker-Protection-Config Binance API Documentation}
|
|
1173
1040
|
*/
|
|
1174
1041
|
async setMarketMakerProtectionConfig(requestParameters = {}) {
|
|
1175
1042
|
const localVarAxiosArgs = await this.localVarAxiosParamCreator.setMarketMakerProtectionConfig(requestParameters?.underlying, requestParameters?.windowTimeInMilliseconds, requestParameters?.frozenTimeInMilliseconds, requestParameters?.qtyLimit, requestParameters?.deltaLimit, requestParameters?.recvWindow);
|
|
@@ -1399,6 +1266,20 @@ const TradeApiAxiosParamCreator = function(configuration) {
|
|
|
1399
1266
|
timeUnit: _timeUnit
|
|
1400
1267
|
};
|
|
1401
1268
|
},
|
|
1269
|
+
userCommission: async (recvWindow) => {
|
|
1270
|
+
const localVarQueryParameter = {};
|
|
1271
|
+
const localVarBodyParameter = {};
|
|
1272
|
+
if (recvWindow !== void 0 && recvWindow !== null) localVarQueryParameter["recvWindow"] = recvWindow;
|
|
1273
|
+
let _timeUnit;
|
|
1274
|
+
if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
|
|
1275
|
+
return {
|
|
1276
|
+
endpoint: "/eapi/v1/commission",
|
|
1277
|
+
method: "GET",
|
|
1278
|
+
queryParams: localVarQueryParameter,
|
|
1279
|
+
bodyParams: localVarBodyParameter,
|
|
1280
|
+
timeUnit: _timeUnit
|
|
1281
|
+
};
|
|
1282
|
+
},
|
|
1402
1283
|
userExerciseRecord: async (symbol, startTime, endTime, limit, recvWindow) => {
|
|
1403
1284
|
const localVarQueryParameter = {};
|
|
1404
1285
|
const localVarBodyParameter = {};
|
|
@@ -1438,7 +1319,7 @@ var TradeApi = class {
|
|
|
1438
1319
|
* @returns {Promise<RestApiResponse<AccountTradeListResponse>>}
|
|
1439
1320
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
1440
1321
|
* @memberof TradeApi
|
|
1441
|
-
* @see {@link https://developers.binance.com/docs/derivatives/
|
|
1322
|
+
* @see {@link https://developers.binance.com/docs/derivatives/options-trading/trade/Account-Trade-List Binance API Documentation}
|
|
1442
1323
|
*/
|
|
1443
1324
|
async accountTradeList(requestParameters = {}) {
|
|
1444
1325
|
const localVarAxiosArgs = await this.localVarAxiosParamCreator.accountTradeList(requestParameters?.symbol, requestParameters?.fromId, requestParameters?.startTime, requestParameters?.endTime, requestParameters?.limit, requestParameters?.recvWindow);
|
|
@@ -1454,7 +1335,7 @@ var TradeApi = class {
|
|
|
1454
1335
|
* @returns {Promise<RestApiResponse<CancelAllOptionOrdersByUnderlyingResponse>>}
|
|
1455
1336
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
1456
1337
|
* @memberof TradeApi
|
|
1457
|
-
* @see {@link https://developers.binance.com/docs/derivatives/
|
|
1338
|
+
* @see {@link https://developers.binance.com/docs/derivatives/options-trading/trade/Cancel-All-Option-Orders-By-Underlying Binance API Documentation}
|
|
1458
1339
|
*/
|
|
1459
1340
|
async cancelAllOptionOrdersByUnderlying(requestParameters) {
|
|
1460
1341
|
const localVarAxiosArgs = await this.localVarAxiosParamCreator.cancelAllOptionOrdersByUnderlying(requestParameters?.underlying, requestParameters?.recvWindow);
|
|
@@ -1470,7 +1351,7 @@ var TradeApi = class {
|
|
|
1470
1351
|
* @returns {Promise<RestApiResponse<CancelAllOptionOrdersOnSpecificSymbolResponse>>}
|
|
1471
1352
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
1472
1353
|
* @memberof TradeApi
|
|
1473
|
-
* @see {@link https://developers.binance.com/docs/derivatives/
|
|
1354
|
+
* @see {@link https://developers.binance.com/docs/derivatives/options-trading/trade/Cancel-all-Option-orders-on-specific-symbol Binance API Documentation}
|
|
1474
1355
|
*/
|
|
1475
1356
|
async cancelAllOptionOrdersOnSpecificSymbol(requestParameters) {
|
|
1476
1357
|
const localVarAxiosArgs = await this.localVarAxiosParamCreator.cancelAllOptionOrdersOnSpecificSymbol(requestParameters?.symbol, requestParameters?.recvWindow);
|
|
@@ -1480,7 +1361,6 @@ var TradeApi = class {
|
|
|
1480
1361
|
* Cancel multiple orders.
|
|
1481
1362
|
*
|
|
1482
1363
|
* At least one instance of `orderId` and `clientOrderId` must be sent.
|
|
1483
|
-
* Max 10 orders can be deleted in one request
|
|
1484
1364
|
*
|
|
1485
1365
|
* Weight: 1
|
|
1486
1366
|
*
|
|
@@ -1489,7 +1369,7 @@ var TradeApi = class {
|
|
|
1489
1369
|
* @returns {Promise<RestApiResponse<CancelMultipleOptionOrdersResponse>>}
|
|
1490
1370
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
1491
1371
|
* @memberof TradeApi
|
|
1492
|
-
* @see {@link https://developers.binance.com/docs/derivatives/
|
|
1372
|
+
* @see {@link https://developers.binance.com/docs/derivatives/options-trading/trade/Cancel-Multiple-Option-Orders Binance API Documentation}
|
|
1493
1373
|
*/
|
|
1494
1374
|
async cancelMultipleOptionOrders(requestParameters) {
|
|
1495
1375
|
const localVarAxiosArgs = await this.localVarAxiosParamCreator.cancelMultipleOptionOrders(requestParameters?.symbol, requestParameters?.orderIds, requestParameters?.clientOrderIds, requestParameters?.recvWindow);
|
|
@@ -1507,7 +1387,7 @@ var TradeApi = class {
|
|
|
1507
1387
|
* @returns {Promise<RestApiResponse<CancelOptionOrderResponse>>}
|
|
1508
1388
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
1509
1389
|
* @memberof TradeApi
|
|
1510
|
-
* @see {@link https://developers.binance.com/docs/derivatives/
|
|
1390
|
+
* @see {@link https://developers.binance.com/docs/derivatives/options-trading/trade/Cancel-Option-Order Binance API Documentation}
|
|
1511
1391
|
*/
|
|
1512
1392
|
async cancelOptionOrder(requestParameters) {
|
|
1513
1393
|
const localVarAxiosArgs = await this.localVarAxiosParamCreator.cancelOptionOrder(requestParameters?.symbol, requestParameters?.orderId, requestParameters?.clientOrderId, requestParameters?.recvWindow);
|
|
@@ -1523,7 +1403,7 @@ var TradeApi = class {
|
|
|
1523
1403
|
* @returns {Promise<RestApiResponse<NewOrderResponse>>}
|
|
1524
1404
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
1525
1405
|
* @memberof TradeApi
|
|
1526
|
-
* @see {@link https://developers.binance.com/docs/derivatives/
|
|
1406
|
+
* @see {@link https://developers.binance.com/docs/derivatives/options-trading/trade/New-Order Binance API Documentation}
|
|
1527
1407
|
*/
|
|
1528
1408
|
async newOrder(requestParameters) {
|
|
1529
1409
|
const localVarAxiosArgs = await this.localVarAxiosParamCreator.newOrder(requestParameters?.symbol, requestParameters?.side, requestParameters?.type, requestParameters?.quantity, requestParameters?.price, requestParameters?.timeInForce, requestParameters?.reduceOnly, requestParameters?.postOnly, requestParameters?.newOrderRespType, requestParameters?.clientOrderId, requestParameters?.isMmp, requestParameters?.recvWindow);
|
|
@@ -1539,7 +1419,7 @@ var TradeApi = class {
|
|
|
1539
1419
|
* @returns {Promise<RestApiResponse<OptionPositionInformationResponse>>}
|
|
1540
1420
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
1541
1421
|
* @memberof TradeApi
|
|
1542
|
-
* @see {@link https://developers.binance.com/docs/derivatives/
|
|
1422
|
+
* @see {@link https://developers.binance.com/docs/derivatives/options-trading/trade/Option-Position-Information Binance API Documentation}
|
|
1543
1423
|
*/
|
|
1544
1424
|
async optionPositionInformation(requestParameters = {}) {
|
|
1545
1425
|
const localVarAxiosArgs = await this.localVarAxiosParamCreator.optionPositionInformation(requestParameters?.symbol, requestParameters?.recvWindow);
|
|
@@ -1558,7 +1438,7 @@ var TradeApi = class {
|
|
|
1558
1438
|
* @returns {Promise<RestApiResponse<PlaceMultipleOrdersResponse>>}
|
|
1559
1439
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
1560
1440
|
* @memberof TradeApi
|
|
1561
|
-
* @see {@link https://developers.binance.com/docs/derivatives/
|
|
1441
|
+
* @see {@link https://developers.binance.com/docs/derivatives/options-trading/trade/Place-Multiple-Orders Binance API Documentation}
|
|
1562
1442
|
*/
|
|
1563
1443
|
async placeMultipleOrders(requestParameters) {
|
|
1564
1444
|
const localVarAxiosArgs = await this.localVarAxiosParamCreator.placeMultipleOrders(requestParameters?.orders, requestParameters?.recvWindow);
|
|
@@ -1574,7 +1454,7 @@ var TradeApi = class {
|
|
|
1574
1454
|
* @returns {Promise<RestApiResponse<QueryCurrentOpenOptionOrdersResponse>>}
|
|
1575
1455
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
1576
1456
|
* @memberof TradeApi
|
|
1577
|
-
* @see {@link https://developers.binance.com/docs/derivatives/
|
|
1457
|
+
* @see {@link https://developers.binance.com/docs/derivatives/options-trading/trade/Query-Current-Open-Option-Orders Binance API Documentation}
|
|
1578
1458
|
*/
|
|
1579
1459
|
async queryCurrentOpenOptionOrders(requestParameters = {}) {
|
|
1580
1460
|
const localVarAxiosArgs = await this.localVarAxiosParamCreator.queryCurrentOpenOptionOrders(requestParameters?.symbol, requestParameters?.orderId, requestParameters?.startTime, requestParameters?.endTime, requestParameters?.recvWindow);
|
|
@@ -1590,7 +1470,7 @@ var TradeApi = class {
|
|
|
1590
1470
|
* @returns {Promise<RestApiResponse<QueryOptionOrderHistoryResponse>>}
|
|
1591
1471
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
1592
1472
|
* @memberof TradeApi
|
|
1593
|
-
* @see {@link https://developers.binance.com/docs/derivatives/
|
|
1473
|
+
* @see {@link https://developers.binance.com/docs/derivatives/options-trading/trade/Query-Option-Order-History Binance API Documentation}
|
|
1594
1474
|
*/
|
|
1595
1475
|
async queryOptionOrderHistory(requestParameters) {
|
|
1596
1476
|
const localVarAxiosArgs = await this.localVarAxiosParamCreator.queryOptionOrderHistory(requestParameters?.symbol, requestParameters?.orderId, requestParameters?.startTime, requestParameters?.endTime, requestParameters?.limit, requestParameters?.recvWindow);
|
|
@@ -1614,13 +1494,29 @@ var TradeApi = class {
|
|
|
1614
1494
|
* @returns {Promise<RestApiResponse<QuerySingleOrderResponse>>}
|
|
1615
1495
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
1616
1496
|
* @memberof TradeApi
|
|
1617
|
-
* @see {@link https://developers.binance.com/docs/derivatives/
|
|
1497
|
+
* @see {@link https://developers.binance.com/docs/derivatives/options-trading/trade/Query-Single-Order Binance API Documentation}
|
|
1618
1498
|
*/
|
|
1619
1499
|
async querySingleOrder(requestParameters) {
|
|
1620
1500
|
const localVarAxiosArgs = await this.localVarAxiosParamCreator.querySingleOrder(requestParameters?.symbol, requestParameters?.orderId, requestParameters?.clientOrderId, requestParameters?.recvWindow);
|
|
1621
1501
|
return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
|
|
1622
1502
|
}
|
|
1623
1503
|
/**
|
|
1504
|
+
* Get account commission.
|
|
1505
|
+
*
|
|
1506
|
+
* Weight: 5
|
|
1507
|
+
*
|
|
1508
|
+
* @summary User Commission (USER_DATA)
|
|
1509
|
+
* @param {UserCommissionRequest} requestParameters Request parameters.
|
|
1510
|
+
* @returns {Promise<RestApiResponse<UserCommissionResponse>>}
|
|
1511
|
+
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
1512
|
+
* @memberof TradeApi
|
|
1513
|
+
* @see {@link https://developers.binance.com/docs/derivatives/options-trading/trade/User-Commission Binance API Documentation}
|
|
1514
|
+
*/
|
|
1515
|
+
async userCommission(requestParameters = {}) {
|
|
1516
|
+
const localVarAxiosArgs = await this.localVarAxiosParamCreator.userCommission(requestParameters?.recvWindow);
|
|
1517
|
+
return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
|
|
1518
|
+
}
|
|
1519
|
+
/**
|
|
1624
1520
|
* Get account exercise records.
|
|
1625
1521
|
*
|
|
1626
1522
|
* Weight: 5
|
|
@@ -1630,7 +1526,7 @@ var TradeApi = class {
|
|
|
1630
1526
|
* @returns {Promise<RestApiResponse<UserExerciseRecordResponse>>}
|
|
1631
1527
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
1632
1528
|
* @memberof TradeApi
|
|
1633
|
-
* @see {@link https://developers.binance.com/docs/derivatives/
|
|
1529
|
+
* @see {@link https://developers.binance.com/docs/derivatives/options-trading/trade/User-Exercise-Record Binance API Documentation}
|
|
1634
1530
|
*/
|
|
1635
1531
|
async userExerciseRecord(requestParameters = {}) {
|
|
1636
1532
|
const localVarAxiosArgs = await this.localVarAxiosParamCreator.userExerciseRecord(requestParameters?.symbol, requestParameters?.startTime, requestParameters?.endTime, requestParameters?.limit, requestParameters?.recvWindow);
|
|
@@ -1650,6 +1546,7 @@ let NewOrderTimeInForceEnum = /* @__PURE__ */ function(NewOrderTimeInForceEnum$1
|
|
|
1650
1546
|
NewOrderTimeInForceEnum$1["GTC"] = "GTC";
|
|
1651
1547
|
NewOrderTimeInForceEnum$1["IOC"] = "IOC";
|
|
1652
1548
|
NewOrderTimeInForceEnum$1["FOK"] = "FOK";
|
|
1549
|
+
NewOrderTimeInForceEnum$1["GTX"] = "GTX";
|
|
1653
1550
|
return NewOrderTimeInForceEnum$1;
|
|
1654
1551
|
}({});
|
|
1655
1552
|
let NewOrderNewOrderRespTypeEnum = /* @__PURE__ */ function(NewOrderNewOrderRespTypeEnum$1) {
|
|
@@ -1736,7 +1633,7 @@ var UserDataStreamsApi = class {
|
|
|
1736
1633
|
* @returns {Promise<RestApiResponse<void>>}
|
|
1737
1634
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
1738
1635
|
* @memberof UserDataStreamsApi
|
|
1739
|
-
* @see {@link https://developers.binance.com/docs/derivatives/
|
|
1636
|
+
* @see {@link https://developers.binance.com/docs/derivatives/options-trading/user-data-streams/Close-User-Data-Stream Binance API Documentation}
|
|
1740
1637
|
*/
|
|
1741
1638
|
async closeUserDataStream() {
|
|
1742
1639
|
const localVarAxiosArgs = await this.localVarAxiosParamCreator.closeUserDataStream();
|
|
@@ -1751,7 +1648,7 @@ var UserDataStreamsApi = class {
|
|
|
1751
1648
|
* @returns {Promise<RestApiResponse<void>>}
|
|
1752
1649
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
1753
1650
|
* @memberof UserDataStreamsApi
|
|
1754
|
-
* @see {@link https://developers.binance.com/docs/derivatives/
|
|
1651
|
+
* @see {@link https://developers.binance.com/docs/derivatives/options-trading/user-data-streams/Keepalive-User-Data-Stream Binance API Documentation}
|
|
1755
1652
|
*/
|
|
1756
1653
|
async keepaliveUserDataStream() {
|
|
1757
1654
|
const localVarAxiosArgs = await this.localVarAxiosParamCreator.keepaliveUserDataStream();
|
|
@@ -1766,7 +1663,7 @@ var UserDataStreamsApi = class {
|
|
|
1766
1663
|
* @returns {Promise<RestApiResponse<StartUserDataStreamResponse>>}
|
|
1767
1664
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
1768
1665
|
* @memberof UserDataStreamsApi
|
|
1769
|
-
* @see {@link https://developers.binance.com/docs/derivatives/
|
|
1666
|
+
* @see {@link https://developers.binance.com/docs/derivatives/options-trading/user-data-streams/Start-User-Data-Stream Binance API Documentation}
|
|
1770
1667
|
*/
|
|
1771
1668
|
async startUserDataStream() {
|
|
1772
1669
|
const localVarAxiosArgs = await this.localVarAxiosParamCreator.startUserDataStream();
|
|
@@ -1832,62 +1729,12 @@ var RestAPI = class {
|
|
|
1832
1729
|
*
|
|
1833
1730
|
* @returns {Promise<RestApiResponse<AccountFundingFlowResponse>>}
|
|
1834
1731
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
1835
|
-
* @see {@link https://developers.binance.com/docs/derivatives/
|
|
1732
|
+
* @see {@link https://developers.binance.com/docs/derivatives/options-trading/account/Account-Funding-Flow Binance API Documentation}
|
|
1836
1733
|
*/
|
|
1837
1734
|
accountFundingFlow(requestParameters) {
|
|
1838
1735
|
return this.accountApi.accountFundingFlow(requestParameters);
|
|
1839
1736
|
}
|
|
1840
1737
|
/**
|
|
1841
|
-
* Get download id for option transaction history
|
|
1842
|
-
*
|
|
1843
|
-
* Request Limitation is 5 times per month, shared by > front end download page and rest api
|
|
1844
|
-
* The time between `startTime` and `endTime` can not be longer than 1 year
|
|
1845
|
-
*
|
|
1846
|
-
* Weight: 5
|
|
1847
|
-
*
|
|
1848
|
-
* @summary Get Download Id For Option Transaction History (USER_DATA)
|
|
1849
|
-
* @param {GetDownloadIdForOptionTransactionHistoryRequest} requestParameters Request parameters.
|
|
1850
|
-
*
|
|
1851
|
-
* @returns {Promise<RestApiResponse<GetDownloadIdForOptionTransactionHistoryResponse>>}
|
|
1852
|
-
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
1853
|
-
* @see {@link https://developers.binance.com/docs/derivatives/option/account/Get-Download-Id-For-Option-Transaction-History Binance API Documentation}
|
|
1854
|
-
*/
|
|
1855
|
-
getDownloadIdForOptionTransactionHistory(requestParameters) {
|
|
1856
|
-
return this.accountApi.getDownloadIdForOptionTransactionHistory(requestParameters);
|
|
1857
|
-
}
|
|
1858
|
-
/**
|
|
1859
|
-
* Get option transaction history download Link by Id
|
|
1860
|
-
*
|
|
1861
|
-
* Download link expiration: 24h
|
|
1862
|
-
*
|
|
1863
|
-
* Weight: 5
|
|
1864
|
-
*
|
|
1865
|
-
* @summary Get Option Transaction History Download Link by Id (USER_DATA)
|
|
1866
|
-
* @param {GetOptionTransactionHistoryDownloadLinkByIdRequest} requestParameters Request parameters.
|
|
1867
|
-
*
|
|
1868
|
-
* @returns {Promise<RestApiResponse<GetOptionTransactionHistoryDownloadLinkByIdResponse>>}
|
|
1869
|
-
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
1870
|
-
* @see {@link https://developers.binance.com/docs/derivatives/option/account/Get-Option-Transaction-History-Download-Link-by-Id Binance API Documentation}
|
|
1871
|
-
*/
|
|
1872
|
-
getOptionTransactionHistoryDownloadLinkById(requestParameters) {
|
|
1873
|
-
return this.accountApi.getOptionTransactionHistoryDownloadLinkById(requestParameters);
|
|
1874
|
-
}
|
|
1875
|
-
/**
|
|
1876
|
-
* Get current account information.
|
|
1877
|
-
*
|
|
1878
|
-
* Weight: 3
|
|
1879
|
-
*
|
|
1880
|
-
* @summary Option Account Information(TRADE)
|
|
1881
|
-
* @param {OptionAccountInformationRequest} requestParameters Request parameters.
|
|
1882
|
-
*
|
|
1883
|
-
* @returns {Promise<RestApiResponse<OptionAccountInformationResponse>>}
|
|
1884
|
-
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
1885
|
-
* @see {@link https://developers.binance.com/docs/derivatives/option/account/Option-Account-Information Binance API Documentation}
|
|
1886
|
-
*/
|
|
1887
|
-
optionAccountInformation(requestParameters = {}) {
|
|
1888
|
-
return this.accountApi.optionAccountInformation(requestParameters);
|
|
1889
|
-
}
|
|
1890
|
-
/**
|
|
1891
1738
|
* Get current account information.
|
|
1892
1739
|
*
|
|
1893
1740
|
* Weight: 3
|
|
@@ -1897,7 +1744,7 @@ var RestAPI = class {
|
|
|
1897
1744
|
*
|
|
1898
1745
|
* @returns {Promise<RestApiResponse<OptionMarginAccountInformationResponse>>}
|
|
1899
1746
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
1900
|
-
* @see {@link https://developers.binance.com/docs/derivatives/
|
|
1747
|
+
* @see {@link https://developers.binance.com/docs/derivatives/options-trading/account/Option-Margin-Account-Information Binance API Documentation}
|
|
1901
1748
|
*/
|
|
1902
1749
|
optionMarginAccountInformation(requestParameters = {}) {
|
|
1903
1750
|
return this.accountApi.optionMarginAccountInformation(requestParameters);
|
|
@@ -1911,7 +1758,7 @@ var RestAPI = class {
|
|
|
1911
1758
|
*
|
|
1912
1759
|
* @returns {Promise<RestApiResponse<CheckServerTimeResponse>>}
|
|
1913
1760
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
1914
|
-
* @see {@link https://developers.binance.com/docs/derivatives/
|
|
1761
|
+
* @see {@link https://developers.binance.com/docs/derivatives/options-trading/market-data/Check-Server-Time Binance API Documentation}
|
|
1915
1762
|
*/
|
|
1916
1763
|
checkServerTime() {
|
|
1917
1764
|
return this.marketDataApi.checkServerTime();
|
|
@@ -1925,7 +1772,7 @@ var RestAPI = class {
|
|
|
1925
1772
|
*
|
|
1926
1773
|
* @returns {Promise<RestApiResponse<ExchangeInformationResponse>>}
|
|
1927
1774
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
1928
|
-
* @see {@link https://developers.binance.com/docs/derivatives/
|
|
1775
|
+
* @see {@link https://developers.binance.com/docs/derivatives/options-trading/market-data/Exchange-Information Binance API Documentation}
|
|
1929
1776
|
*/
|
|
1930
1777
|
exchangeInformation() {
|
|
1931
1778
|
return this.marketDataApi.exchangeInformation();
|
|
@@ -1942,7 +1789,7 @@ var RestAPI = class {
|
|
|
1942
1789
|
*
|
|
1943
1790
|
* @returns {Promise<RestApiResponse<HistoricalExerciseRecordsResponse>>}
|
|
1944
1791
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
1945
|
-
* @see {@link https://developers.binance.com/docs/derivatives/
|
|
1792
|
+
* @see {@link https://developers.binance.com/docs/derivatives/options-trading/market-data/Historical-Exercise-Records Binance API Documentation}
|
|
1946
1793
|
*/
|
|
1947
1794
|
historicalExerciseRecords(requestParameters = {}) {
|
|
1948
1795
|
return this.marketDataApi.historicalExerciseRecords(requestParameters);
|
|
@@ -1952,15 +1799,15 @@ var RestAPI = class {
|
|
|
1952
1799
|
*
|
|
1953
1800
|
* Weight: 1
|
|
1954
1801
|
*
|
|
1955
|
-
* @summary Index Price
|
|
1956
|
-
* @param {
|
|
1802
|
+
* @summary Index Price
|
|
1803
|
+
* @param {IndexPriceRequest} requestParameters Request parameters.
|
|
1957
1804
|
*
|
|
1958
|
-
* @returns {Promise<RestApiResponse<
|
|
1805
|
+
* @returns {Promise<RestApiResponse<IndexPriceResponse>>}
|
|
1959
1806
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
1960
|
-
* @see {@link https://developers.binance.com/docs/derivatives/
|
|
1807
|
+
* @see {@link https://developers.binance.com/docs/derivatives/options-trading/market-data/Symbol-Price-Ticker Binance API Documentation}
|
|
1961
1808
|
*/
|
|
1962
|
-
|
|
1963
|
-
return this.marketDataApi.
|
|
1809
|
+
indexPrice(requestParameters) {
|
|
1810
|
+
return this.marketDataApi.indexPrice(requestParameters);
|
|
1964
1811
|
}
|
|
1965
1812
|
/**
|
|
1966
1813
|
* Kline/candlestick bars for an option symbol.
|
|
@@ -1975,27 +1822,12 @@ var RestAPI = class {
|
|
|
1975
1822
|
*
|
|
1976
1823
|
* @returns {Promise<RestApiResponse<KlineCandlestickDataResponse>>}
|
|
1977
1824
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
1978
|
-
* @see {@link https://developers.binance.com/docs/derivatives/
|
|
1825
|
+
* @see {@link https://developers.binance.com/docs/derivatives/options-trading/market-data/Kline-Candlestick-Data Binance API Documentation}
|
|
1979
1826
|
*/
|
|
1980
1827
|
klineCandlestickData(requestParameters) {
|
|
1981
1828
|
return this.marketDataApi.klineCandlestickData(requestParameters);
|
|
1982
1829
|
}
|
|
1983
1830
|
/**
|
|
1984
|
-
* Get older market historical trades.
|
|
1985
|
-
*
|
|
1986
|
-
* Weight: 20
|
|
1987
|
-
*
|
|
1988
|
-
* @summary Old Trades Lookup (MARKET_DATA)
|
|
1989
|
-
* @param {OldTradesLookupRequest} requestParameters Request parameters.
|
|
1990
|
-
*
|
|
1991
|
-
* @returns {Promise<RestApiResponse<OldTradesLookupResponse>>}
|
|
1992
|
-
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
1993
|
-
* @see {@link https://developers.binance.com/docs/derivatives/option/market-data/Old-Trades-Lookup Binance API Documentation}
|
|
1994
|
-
*/
|
|
1995
|
-
oldTradesLookup(requestParameters) {
|
|
1996
|
-
return this.marketDataApi.oldTradesLookup(requestParameters);
|
|
1997
|
-
}
|
|
1998
|
-
/**
|
|
1999
1831
|
* Get open interest for specific underlying asset on specific expiration date.
|
|
2000
1832
|
*
|
|
2001
1833
|
* Weight: 0
|
|
@@ -2005,7 +1837,7 @@ var RestAPI = class {
|
|
|
2005
1837
|
*
|
|
2006
1838
|
* @returns {Promise<RestApiResponse<OpenInterestResponse>>}
|
|
2007
1839
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
2008
|
-
* @see {@link https://developers.binance.com/docs/derivatives/
|
|
1840
|
+
* @see {@link https://developers.binance.com/docs/derivatives/options-trading/market-data/Open-Interest Binance API Documentation}
|
|
2009
1841
|
*/
|
|
2010
1842
|
openInterest(requestParameters) {
|
|
2011
1843
|
return this.marketDataApi.openInterest(requestParameters);
|
|
@@ -2020,7 +1852,7 @@ var RestAPI = class {
|
|
|
2020
1852
|
*
|
|
2021
1853
|
* @returns {Promise<RestApiResponse<OptionMarkPriceResponse>>}
|
|
2022
1854
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
2023
|
-
* @see {@link https://developers.binance.com/docs/derivatives/
|
|
1855
|
+
* @see {@link https://developers.binance.com/docs/derivatives/options-trading/market-data/Option-Mark-Price Binance API Documentation}
|
|
2024
1856
|
*/
|
|
2025
1857
|
optionMarkPrice(requestParameters = {}) {
|
|
2026
1858
|
return this.marketDataApi.optionMarkPrice(requestParameters);
|
|
@@ -2030,7 +1862,7 @@ var RestAPI = class {
|
|
|
2030
1862
|
*
|
|
2031
1863
|
* Weight: limit | weight
|
|
2032
1864
|
* ------------ | ------------
|
|
2033
|
-
* 5, 10, 20, 50 |
|
|
1865
|
+
* 5, 10, 20, 50 | 1
|
|
2034
1866
|
* 100 | 5
|
|
2035
1867
|
* 500 | 10
|
|
2036
1868
|
* 1000 | 20
|
|
@@ -2040,7 +1872,7 @@ var RestAPI = class {
|
|
|
2040
1872
|
*
|
|
2041
1873
|
* @returns {Promise<RestApiResponse<OrderBookResponse>>}
|
|
2042
1874
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
2043
|
-
* @see {@link https://developers.binance.com/docs/derivatives/
|
|
1875
|
+
* @see {@link https://developers.binance.com/docs/derivatives/options-trading/market-data/Order-Book Binance API Documentation}
|
|
2044
1876
|
*/
|
|
2045
1877
|
orderBook(requestParameters) {
|
|
2046
1878
|
return this.marketDataApi.orderBook(requestParameters);
|
|
@@ -2055,7 +1887,7 @@ var RestAPI = class {
|
|
|
2055
1887
|
*
|
|
2056
1888
|
* @returns {Promise<RestApiResponse<RecentBlockTradesListResponse>>}
|
|
2057
1889
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
2058
|
-
* @see {@link https://developers.binance.com/docs/derivatives/
|
|
1890
|
+
* @see {@link https://developers.binance.com/docs/derivatives/options-trading/market-data/Recent-Block-Trade-List Binance API Documentation}
|
|
2059
1891
|
*/
|
|
2060
1892
|
recentBlockTradesList(requestParameters = {}) {
|
|
2061
1893
|
return this.marketDataApi.recentBlockTradesList(requestParameters);
|
|
@@ -2070,7 +1902,7 @@ var RestAPI = class {
|
|
|
2070
1902
|
*
|
|
2071
1903
|
* @returns {Promise<RestApiResponse<RecentTradesListResponse>>}
|
|
2072
1904
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
2073
|
-
* @see {@link https://developers.binance.com/docs/derivatives/
|
|
1905
|
+
* @see {@link https://developers.binance.com/docs/derivatives/options-trading/market-data/Recent-Trades-List Binance API Documentation}
|
|
2074
1906
|
*/
|
|
2075
1907
|
recentTradesList(requestParameters) {
|
|
2076
1908
|
return this.marketDataApi.recentTradesList(requestParameters);
|
|
@@ -2084,7 +1916,7 @@ var RestAPI = class {
|
|
|
2084
1916
|
*
|
|
2085
1917
|
* @returns {Promise<RestApiResponse<void>>}
|
|
2086
1918
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
2087
|
-
* @see {@link https://developers.binance.com/docs/derivatives/
|
|
1919
|
+
* @see {@link https://developers.binance.com/docs/derivatives/options-trading/market-data/Test-Connectivity Binance API Documentation}
|
|
2088
1920
|
*/
|
|
2089
1921
|
testConnectivity() {
|
|
2090
1922
|
return this.marketDataApi.testConnectivity();
|
|
@@ -2099,7 +1931,7 @@ var RestAPI = class {
|
|
|
2099
1931
|
*
|
|
2100
1932
|
* @returns {Promise<RestApiResponse<Ticker24hrPriceChangeStatisticsResponse>>}
|
|
2101
1933
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
2102
|
-
* @see {@link https://developers.binance.com/docs/derivatives/
|
|
1934
|
+
* @see {@link https://developers.binance.com/docs/derivatives/options-trading/market-data/24hr-Ticker-Price-Change-Statistics Binance API Documentation}
|
|
2103
1935
|
*/
|
|
2104
1936
|
ticker24hrPriceChangeStatistics(requestParameters = {}) {
|
|
2105
1937
|
return this.marketDataApi.ticker24hrPriceChangeStatistics(requestParameters);
|
|
@@ -2114,7 +1946,7 @@ var RestAPI = class {
|
|
|
2114
1946
|
*
|
|
2115
1947
|
* @returns {Promise<RestApiResponse<AcceptBlockTradeOrderResponse>>}
|
|
2116
1948
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
2117
|
-
* @see {@link https://developers.binance.com/docs/derivatives/
|
|
1949
|
+
* @see {@link https://developers.binance.com/docs/derivatives/options-trading/market-maker-block-trade/Accept-Block-Trade-Order Binance API Documentation}
|
|
2118
1950
|
*/
|
|
2119
1951
|
acceptBlockTradeOrder(requestParameters) {
|
|
2120
1952
|
return this.marketMakerBlockTradeApi.acceptBlockTradeOrder(requestParameters);
|
|
@@ -2129,7 +1961,7 @@ var RestAPI = class {
|
|
|
2129
1961
|
*
|
|
2130
1962
|
* @returns {Promise<RestApiResponse<AccountBlockTradeListResponse>>}
|
|
2131
1963
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
2132
|
-
* @see {@link https://developers.binance.com/docs/derivatives/
|
|
1964
|
+
* @see {@link https://developers.binance.com/docs/derivatives/options-trading/market-maker-block-trade/Account-Block-Trade-List Binance API Documentation}
|
|
2133
1965
|
*/
|
|
2134
1966
|
accountBlockTradeList(requestParameters = {}) {
|
|
2135
1967
|
return this.marketMakerBlockTradeApi.accountBlockTradeList(requestParameters);
|
|
@@ -2144,7 +1976,7 @@ var RestAPI = class {
|
|
|
2144
1976
|
*
|
|
2145
1977
|
* @returns {Promise<RestApiResponse<void>>}
|
|
2146
1978
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
2147
|
-
* @see {@link https://developers.binance.com/docs/derivatives/
|
|
1979
|
+
* @see {@link https://developers.binance.com/docs/derivatives/options-trading/market-maker-block-trade/Cancel-Block-Trade-Order Binance API Documentation}
|
|
2148
1980
|
*/
|
|
2149
1981
|
cancelBlockTradeOrder(requestParameters) {
|
|
2150
1982
|
return this.marketMakerBlockTradeApi.cancelBlockTradeOrder(requestParameters);
|
|
@@ -2159,7 +1991,7 @@ var RestAPI = class {
|
|
|
2159
1991
|
*
|
|
2160
1992
|
* @returns {Promise<RestApiResponse<ExtendBlockTradeOrderResponse>>}
|
|
2161
1993
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
2162
|
-
* @see {@link https://developers.binance.com/docs/derivatives/
|
|
1994
|
+
* @see {@link https://developers.binance.com/docs/derivatives/options-trading/market-maker-block-trade/Extend-Block-Trade-Order Binance API Documentation}
|
|
2163
1995
|
*/
|
|
2164
1996
|
extendBlockTradeOrder(requestParameters) {
|
|
2165
1997
|
return this.marketMakerBlockTradeApi.extendBlockTradeOrder(requestParameters);
|
|
@@ -2174,7 +2006,7 @@ var RestAPI = class {
|
|
|
2174
2006
|
*
|
|
2175
2007
|
* @returns {Promise<RestApiResponse<NewBlockTradeOrderResponse>>}
|
|
2176
2008
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
2177
|
-
* @see {@link https://developers.binance.com/docs/derivatives/
|
|
2009
|
+
* @see {@link https://developers.binance.com/docs/derivatives/options-trading/market-maker-block-trade/New-Block-Trade-Order Binance API Documentation}
|
|
2178
2010
|
*/
|
|
2179
2011
|
newBlockTradeOrder(requestParameters) {
|
|
2180
2012
|
return this.marketMakerBlockTradeApi.newBlockTradeOrder(requestParameters);
|
|
@@ -2189,7 +2021,7 @@ var RestAPI = class {
|
|
|
2189
2021
|
*
|
|
2190
2022
|
* @returns {Promise<RestApiResponse<QueryBlockTradeDetailsResponse>>}
|
|
2191
2023
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
2192
|
-
* @see {@link https://developers.binance.com/docs/derivatives/
|
|
2024
|
+
* @see {@link https://developers.binance.com/docs/derivatives/options-trading/market-maker-block-trade/Query-Block-Trade-Detail Binance API Documentation}
|
|
2193
2025
|
*/
|
|
2194
2026
|
queryBlockTradeDetails(requestParameters) {
|
|
2195
2027
|
return this.marketMakerBlockTradeApi.queryBlockTradeDetails(requestParameters);
|
|
@@ -2204,7 +2036,7 @@ var RestAPI = class {
|
|
|
2204
2036
|
*
|
|
2205
2037
|
* @returns {Promise<RestApiResponse<QueryBlockTradeOrderResponse>>}
|
|
2206
2038
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
2207
|
-
* @see {@link https://developers.binance.com/docs/derivatives/
|
|
2039
|
+
* @see {@link https://developers.binance.com/docs/derivatives/options-trading/market-maker-block-trade/Query-Block-Trade-Order Binance API Documentation}
|
|
2208
2040
|
*/
|
|
2209
2041
|
queryBlockTradeOrder(requestParameters = {}) {
|
|
2210
2042
|
return this.marketMakerBlockTradeApi.queryBlockTradeOrder(requestParameters);
|
|
@@ -2221,7 +2053,7 @@ var RestAPI = class {
|
|
|
2221
2053
|
*
|
|
2222
2054
|
* @returns {Promise<RestApiResponse<AutoCancelAllOpenOrdersResponse>>}
|
|
2223
2055
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
2224
|
-
* @see {@link https://developers.binance.com/docs/derivatives/
|
|
2056
|
+
* @see {@link https://developers.binance.com/docs/derivatives/options-trading/market-maker-endpoints/Auto-Cancel-All-Open-Orders-Heartbeat Binance API Documentation}
|
|
2225
2057
|
*/
|
|
2226
2058
|
autoCancelAllOpenOrders(requestParameters) {
|
|
2227
2059
|
return this.marketMakerEndpointsApi.autoCancelAllOpenOrders(requestParameters);
|
|
@@ -2238,7 +2070,7 @@ var RestAPI = class {
|
|
|
2238
2070
|
*
|
|
2239
2071
|
* @returns {Promise<RestApiResponse<GetAutoCancelAllOpenOrdersResponse>>}
|
|
2240
2072
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
2241
|
-
* @see {@link https://developers.binance.com/docs/derivatives/
|
|
2073
|
+
* @see {@link https://developers.binance.com/docs/derivatives/options-trading/market-maker-endpoints/Get-Auto-Cancel-All-Open-Orders-Config Binance API Documentation}
|
|
2242
2074
|
*/
|
|
2243
2075
|
getAutoCancelAllOpenOrders(requestParameters = {}) {
|
|
2244
2076
|
return this.marketMakerEndpointsApi.getAutoCancelAllOpenOrders(requestParameters);
|
|
@@ -2253,7 +2085,7 @@ var RestAPI = class {
|
|
|
2253
2085
|
*
|
|
2254
2086
|
* @returns {Promise<RestApiResponse<GetMarketMakerProtectionConfigResponse>>}
|
|
2255
2087
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
2256
|
-
* @see {@link https://developers.binance.com/docs/derivatives/
|
|
2088
|
+
* @see {@link https://developers.binance.com/docs/derivatives/options-trading/market-maker-endpoints/Get-Market-Maker-Protection-Config Binance API Documentation}
|
|
2257
2089
|
*/
|
|
2258
2090
|
getMarketMakerProtectionConfig(requestParameters = {}) {
|
|
2259
2091
|
return this.marketMakerEndpointsApi.getMarketMakerProtectionConfig(requestParameters);
|
|
@@ -2268,7 +2100,7 @@ var RestAPI = class {
|
|
|
2268
2100
|
*
|
|
2269
2101
|
* @returns {Promise<RestApiResponse<ResetMarketMakerProtectionConfigResponse>>}
|
|
2270
2102
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
2271
|
-
* @see {@link https://developers.binance.com/docs/derivatives/
|
|
2103
|
+
* @see {@link https://developers.binance.com/docs/derivatives/options-trading/market-maker-endpoints/Reset-Market-Maker-Protection-Config Binance API Documentation}
|
|
2272
2104
|
*/
|
|
2273
2105
|
resetMarketMakerProtectionConfig(requestParameters = {}) {
|
|
2274
2106
|
return this.marketMakerEndpointsApi.resetMarketMakerProtectionConfig(requestParameters);
|
|
@@ -2289,7 +2121,7 @@ var RestAPI = class {
|
|
|
2289
2121
|
*
|
|
2290
2122
|
* @returns {Promise<RestApiResponse<SetAutoCancelAllOpenOrdersResponse>>}
|
|
2291
2123
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
2292
|
-
* @see {@link https://developers.binance.com/docs/derivatives/
|
|
2124
|
+
* @see {@link https://developers.binance.com/docs/derivatives/options-trading/market-maker-endpoints/Set-Auto-Cancel-All-Open-Orders-Config Binance API Documentation}
|
|
2293
2125
|
*/
|
|
2294
2126
|
setAutoCancelAllOpenOrders(requestParameters) {
|
|
2295
2127
|
return this.marketMakerEndpointsApi.setAutoCancelAllOpenOrders(requestParameters);
|
|
@@ -2305,7 +2137,7 @@ var RestAPI = class {
|
|
|
2305
2137
|
*
|
|
2306
2138
|
* @returns {Promise<RestApiResponse<SetMarketMakerProtectionConfigResponse>>}
|
|
2307
2139
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
2308
|
-
* @see {@link https://developers.binance.com/docs/derivatives/
|
|
2140
|
+
* @see {@link https://developers.binance.com/docs/derivatives/options-trading/market-maker-endpoints/Set-Market-Maker-Protection-Config Binance API Documentation}
|
|
2309
2141
|
*/
|
|
2310
2142
|
setMarketMakerProtectionConfig(requestParameters = {}) {
|
|
2311
2143
|
return this.marketMakerEndpointsApi.setMarketMakerProtectionConfig(requestParameters);
|
|
@@ -2320,7 +2152,7 @@ var RestAPI = class {
|
|
|
2320
2152
|
*
|
|
2321
2153
|
* @returns {Promise<RestApiResponse<AccountTradeListResponse>>}
|
|
2322
2154
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
2323
|
-
* @see {@link https://developers.binance.com/docs/derivatives/
|
|
2155
|
+
* @see {@link https://developers.binance.com/docs/derivatives/options-trading/trade/Account-Trade-List Binance API Documentation}
|
|
2324
2156
|
*/
|
|
2325
2157
|
accountTradeList(requestParameters = {}) {
|
|
2326
2158
|
return this.tradeApi.accountTradeList(requestParameters);
|
|
@@ -2335,7 +2167,7 @@ var RestAPI = class {
|
|
|
2335
2167
|
*
|
|
2336
2168
|
* @returns {Promise<RestApiResponse<CancelAllOptionOrdersByUnderlyingResponse>>}
|
|
2337
2169
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
2338
|
-
* @see {@link https://developers.binance.com/docs/derivatives/
|
|
2170
|
+
* @see {@link https://developers.binance.com/docs/derivatives/options-trading/trade/Cancel-All-Option-Orders-By-Underlying Binance API Documentation}
|
|
2339
2171
|
*/
|
|
2340
2172
|
cancelAllOptionOrdersByUnderlying(requestParameters) {
|
|
2341
2173
|
return this.tradeApi.cancelAllOptionOrdersByUnderlying(requestParameters);
|
|
@@ -2350,7 +2182,7 @@ var RestAPI = class {
|
|
|
2350
2182
|
*
|
|
2351
2183
|
* @returns {Promise<RestApiResponse<CancelAllOptionOrdersOnSpecificSymbolResponse>>}
|
|
2352
2184
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
2353
|
-
* @see {@link https://developers.binance.com/docs/derivatives/
|
|
2185
|
+
* @see {@link https://developers.binance.com/docs/derivatives/options-trading/trade/Cancel-all-Option-orders-on-specific-symbol Binance API Documentation}
|
|
2354
2186
|
*/
|
|
2355
2187
|
cancelAllOptionOrdersOnSpecificSymbol(requestParameters) {
|
|
2356
2188
|
return this.tradeApi.cancelAllOptionOrdersOnSpecificSymbol(requestParameters);
|
|
@@ -2359,7 +2191,6 @@ var RestAPI = class {
|
|
|
2359
2191
|
* Cancel multiple orders.
|
|
2360
2192
|
*
|
|
2361
2193
|
* At least one instance of `orderId` and `clientOrderId` must be sent.
|
|
2362
|
-
* Max 10 orders can be deleted in one request
|
|
2363
2194
|
*
|
|
2364
2195
|
* Weight: 1
|
|
2365
2196
|
*
|
|
@@ -2368,7 +2199,7 @@ var RestAPI = class {
|
|
|
2368
2199
|
*
|
|
2369
2200
|
* @returns {Promise<RestApiResponse<CancelMultipleOptionOrdersResponse>>}
|
|
2370
2201
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
2371
|
-
* @see {@link https://developers.binance.com/docs/derivatives/
|
|
2202
|
+
* @see {@link https://developers.binance.com/docs/derivatives/options-trading/trade/Cancel-Multiple-Option-Orders Binance API Documentation}
|
|
2372
2203
|
*/
|
|
2373
2204
|
cancelMultipleOptionOrders(requestParameters) {
|
|
2374
2205
|
return this.tradeApi.cancelMultipleOptionOrders(requestParameters);
|
|
@@ -2385,7 +2216,7 @@ var RestAPI = class {
|
|
|
2385
2216
|
*
|
|
2386
2217
|
* @returns {Promise<RestApiResponse<CancelOptionOrderResponse>>}
|
|
2387
2218
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
2388
|
-
* @see {@link https://developers.binance.com/docs/derivatives/
|
|
2219
|
+
* @see {@link https://developers.binance.com/docs/derivatives/options-trading/trade/Cancel-Option-Order Binance API Documentation}
|
|
2389
2220
|
*/
|
|
2390
2221
|
cancelOptionOrder(requestParameters) {
|
|
2391
2222
|
return this.tradeApi.cancelOptionOrder(requestParameters);
|
|
@@ -2400,7 +2231,7 @@ var RestAPI = class {
|
|
|
2400
2231
|
*
|
|
2401
2232
|
* @returns {Promise<RestApiResponse<NewOrderResponse>>}
|
|
2402
2233
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
2403
|
-
* @see {@link https://developers.binance.com/docs/derivatives/
|
|
2234
|
+
* @see {@link https://developers.binance.com/docs/derivatives/options-trading/trade/New-Order Binance API Documentation}
|
|
2404
2235
|
*/
|
|
2405
2236
|
newOrder(requestParameters) {
|
|
2406
2237
|
return this.tradeApi.newOrder(requestParameters);
|
|
@@ -2415,7 +2246,7 @@ var RestAPI = class {
|
|
|
2415
2246
|
*
|
|
2416
2247
|
* @returns {Promise<RestApiResponse<OptionPositionInformationResponse>>}
|
|
2417
2248
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
2418
|
-
* @see {@link https://developers.binance.com/docs/derivatives/
|
|
2249
|
+
* @see {@link https://developers.binance.com/docs/derivatives/options-trading/trade/Option-Position-Information Binance API Documentation}
|
|
2419
2250
|
*/
|
|
2420
2251
|
optionPositionInformation(requestParameters = {}) {
|
|
2421
2252
|
return this.tradeApi.optionPositionInformation(requestParameters);
|
|
@@ -2433,7 +2264,7 @@ var RestAPI = class {
|
|
|
2433
2264
|
*
|
|
2434
2265
|
* @returns {Promise<RestApiResponse<PlaceMultipleOrdersResponse>>}
|
|
2435
2266
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
2436
|
-
* @see {@link https://developers.binance.com/docs/derivatives/
|
|
2267
|
+
* @see {@link https://developers.binance.com/docs/derivatives/options-trading/trade/Place-Multiple-Orders Binance API Documentation}
|
|
2437
2268
|
*/
|
|
2438
2269
|
placeMultipleOrders(requestParameters) {
|
|
2439
2270
|
return this.tradeApi.placeMultipleOrders(requestParameters);
|
|
@@ -2448,7 +2279,7 @@ var RestAPI = class {
|
|
|
2448
2279
|
*
|
|
2449
2280
|
* @returns {Promise<RestApiResponse<QueryCurrentOpenOptionOrdersResponse>>}
|
|
2450
2281
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
2451
|
-
* @see {@link https://developers.binance.com/docs/derivatives/
|
|
2282
|
+
* @see {@link https://developers.binance.com/docs/derivatives/options-trading/trade/Query-Current-Open-Option-Orders Binance API Documentation}
|
|
2452
2283
|
*/
|
|
2453
2284
|
queryCurrentOpenOptionOrders(requestParameters = {}) {
|
|
2454
2285
|
return this.tradeApi.queryCurrentOpenOptionOrders(requestParameters);
|
|
@@ -2463,7 +2294,7 @@ var RestAPI = class {
|
|
|
2463
2294
|
*
|
|
2464
2295
|
* @returns {Promise<RestApiResponse<QueryOptionOrderHistoryResponse>>}
|
|
2465
2296
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
2466
|
-
* @see {@link https://developers.binance.com/docs/derivatives/
|
|
2297
|
+
* @see {@link https://developers.binance.com/docs/derivatives/options-trading/trade/Query-Option-Order-History Binance API Documentation}
|
|
2467
2298
|
*/
|
|
2468
2299
|
queryOptionOrderHistory(requestParameters) {
|
|
2469
2300
|
return this.tradeApi.queryOptionOrderHistory(requestParameters);
|
|
@@ -2486,12 +2317,27 @@ var RestAPI = class {
|
|
|
2486
2317
|
*
|
|
2487
2318
|
* @returns {Promise<RestApiResponse<QuerySingleOrderResponse>>}
|
|
2488
2319
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
2489
|
-
* @see {@link https://developers.binance.com/docs/derivatives/
|
|
2320
|
+
* @see {@link https://developers.binance.com/docs/derivatives/options-trading/trade/Query-Single-Order Binance API Documentation}
|
|
2490
2321
|
*/
|
|
2491
2322
|
querySingleOrder(requestParameters) {
|
|
2492
2323
|
return this.tradeApi.querySingleOrder(requestParameters);
|
|
2493
2324
|
}
|
|
2494
2325
|
/**
|
|
2326
|
+
* Get account commission.
|
|
2327
|
+
*
|
|
2328
|
+
* Weight: 5
|
|
2329
|
+
*
|
|
2330
|
+
* @summary User Commission (USER_DATA)
|
|
2331
|
+
* @param {UserCommissionRequest} requestParameters Request parameters.
|
|
2332
|
+
*
|
|
2333
|
+
* @returns {Promise<RestApiResponse<UserCommissionResponse>>}
|
|
2334
|
+
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
2335
|
+
* @see {@link https://developers.binance.com/docs/derivatives/options-trading/trade/User-Commission Binance API Documentation}
|
|
2336
|
+
*/
|
|
2337
|
+
userCommission(requestParameters = {}) {
|
|
2338
|
+
return this.tradeApi.userCommission(requestParameters);
|
|
2339
|
+
}
|
|
2340
|
+
/**
|
|
2495
2341
|
* Get account exercise records.
|
|
2496
2342
|
*
|
|
2497
2343
|
* Weight: 5
|
|
@@ -2501,7 +2347,7 @@ var RestAPI = class {
|
|
|
2501
2347
|
*
|
|
2502
2348
|
* @returns {Promise<RestApiResponse<UserExerciseRecordResponse>>}
|
|
2503
2349
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
2504
|
-
* @see {@link https://developers.binance.com/docs/derivatives/
|
|
2350
|
+
* @see {@link https://developers.binance.com/docs/derivatives/options-trading/trade/User-Exercise-Record Binance API Documentation}
|
|
2505
2351
|
*/
|
|
2506
2352
|
userExerciseRecord(requestParameters = {}) {
|
|
2507
2353
|
return this.tradeApi.userExerciseRecord(requestParameters);
|
|
@@ -2515,7 +2361,7 @@ var RestAPI = class {
|
|
|
2515
2361
|
*
|
|
2516
2362
|
* @returns {Promise<RestApiResponse<void>>}
|
|
2517
2363
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
2518
|
-
* @see {@link https://developers.binance.com/docs/derivatives/
|
|
2364
|
+
* @see {@link https://developers.binance.com/docs/derivatives/options-trading/user-data-streams/Close-User-Data-Stream Binance API Documentation}
|
|
2519
2365
|
*/
|
|
2520
2366
|
closeUserDataStream() {
|
|
2521
2367
|
return this.userDataStreamsApi.closeUserDataStream();
|
|
@@ -2529,7 +2375,7 @@ var RestAPI = class {
|
|
|
2529
2375
|
*
|
|
2530
2376
|
* @returns {Promise<RestApiResponse<void>>}
|
|
2531
2377
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
2532
|
-
* @see {@link https://developers.binance.com/docs/derivatives/
|
|
2378
|
+
* @see {@link https://developers.binance.com/docs/derivatives/options-trading/user-data-streams/Keepalive-User-Data-Stream Binance API Documentation}
|
|
2533
2379
|
*/
|
|
2534
2380
|
keepaliveUserDataStream() {
|
|
2535
2381
|
return this.userDataStreamsApi.keepaliveUserDataStream();
|
|
@@ -2543,7 +2389,7 @@ var RestAPI = class {
|
|
|
2543
2389
|
*
|
|
2544
2390
|
* @returns {Promise<RestApiResponse<StartUserDataStreamResponse>>}
|
|
2545
2391
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
2546
|
-
* @see {@link https://developers.binance.com/docs/derivatives/
|
|
2392
|
+
* @see {@link https://developers.binance.com/docs/derivatives/options-trading/user-data-streams/Start-User-Data-Stream Binance API Documentation}
|
|
2547
2393
|
*/
|
|
2548
2394
|
startUserDataStream() {
|
|
2549
2395
|
return this.userDataStreamsApi.startUserDataStream();
|
|
@@ -2571,7 +2417,7 @@ var rest_api_exports = /* @__PURE__ */ __export({
|
|
|
2571
2417
|
});
|
|
2572
2418
|
|
|
2573
2419
|
//#endregion
|
|
2574
|
-
//#region src/websocket-streams/modules/
|
|
2420
|
+
//#region src/websocket-streams/modules/market-api.ts
|
|
2575
2421
|
/**
|
|
2576
2422
|
* Binance Derivatives Trading Options WebSocket Market Streams
|
|
2577
2423
|
*
|
|
@@ -2584,14 +2430,10 @@ var rest_api_exports = /* @__PURE__ */ __export({
|
|
|
2584
2430
|
* https://openapi-generator.tech
|
|
2585
2431
|
* Do not edit the class manually.
|
|
2586
2432
|
*/
|
|
2587
|
-
const
|
|
2433
|
+
const MarketApiParamCreator = function() {
|
|
2588
2434
|
return {
|
|
2589
|
-
indexPriceStreams: (
|
|
2590
|
-
(0, __binance_common.
|
|
2591
|
-
return (0, __binance_common.replaceWebsocketStreamsPlaceholders)("/<symbol>@index".slice(1), {
|
|
2592
|
-
symbol,
|
|
2593
|
-
id
|
|
2594
|
-
});
|
|
2435
|
+
indexPriceStreams: (id) => {
|
|
2436
|
+
return (0, __binance_common.replaceWebsocketStreamsPlaceholders)("/!index@arr".slice(1), { id });
|
|
2595
2437
|
},
|
|
2596
2438
|
klineCandlestickStreams: (symbol, interval, id) => {
|
|
2597
2439
|
(0, __binance_common.assertParamExists)("klineCandlestickStreams", "symbol", symbol);
|
|
@@ -2602,69 +2444,34 @@ const WebsocketMarketStreamsApiParamCreator = function() {
|
|
|
2602
2444
|
id
|
|
2603
2445
|
});
|
|
2604
2446
|
},
|
|
2605
|
-
markPrice: (
|
|
2606
|
-
(0, __binance_common.assertParamExists)("markPrice", "
|
|
2607
|
-
return (0, __binance_common.replaceWebsocketStreamsPlaceholders)("/<
|
|
2608
|
-
|
|
2447
|
+
markPrice: (underlying, id) => {
|
|
2448
|
+
(0, __binance_common.assertParamExists)("markPrice", "underlying", underlying);
|
|
2449
|
+
return (0, __binance_common.replaceWebsocketStreamsPlaceholders)("/<underlying>@optionMarkPrice".slice(1), {
|
|
2450
|
+
underlying,
|
|
2609
2451
|
id
|
|
2610
2452
|
});
|
|
2611
2453
|
},
|
|
2612
2454
|
newSymbolInfo: (id) => {
|
|
2613
|
-
return (0, __binance_common.replaceWebsocketStreamsPlaceholders)("
|
|
2455
|
+
return (0, __binance_common.replaceWebsocketStreamsPlaceholders)("/!optionSymbol".slice(1), { id });
|
|
2614
2456
|
},
|
|
2615
|
-
openInterest: (
|
|
2616
|
-
(0, __binance_common.assertParamExists)("openInterest", "underlyingAsset", underlyingAsset);
|
|
2457
|
+
openInterest: (expirationDate, id) => {
|
|
2617
2458
|
(0, __binance_common.assertParamExists)("openInterest", "expirationDate", expirationDate);
|
|
2618
|
-
return (0, __binance_common.replaceWebsocketStreamsPlaceholders)("
|
|
2619
|
-
underlyingAsset,
|
|
2459
|
+
return (0, __binance_common.replaceWebsocketStreamsPlaceholders)("/underlying@optionOpenInterest@<expirationDate>".slice(1), {
|
|
2620
2460
|
expirationDate,
|
|
2621
2461
|
id
|
|
2622
2462
|
});
|
|
2623
|
-
},
|
|
2624
|
-
partialBookDepthStreams: (symbol, levels, id, updateSpeed) => {
|
|
2625
|
-
(0, __binance_common.assertParamExists)("partialBookDepthStreams", "symbol", symbol);
|
|
2626
|
-
(0, __binance_common.assertParamExists)("partialBookDepthStreams", "levels", levels);
|
|
2627
|
-
return (0, __binance_common.replaceWebsocketStreamsPlaceholders)("/<symbol>@depth<levels>@<updateSpeed>".slice(1), {
|
|
2628
|
-
symbol,
|
|
2629
|
-
levels,
|
|
2630
|
-
id,
|
|
2631
|
-
updateSpeed
|
|
2632
|
-
});
|
|
2633
|
-
},
|
|
2634
|
-
ticker24Hour: (symbol, id) => {
|
|
2635
|
-
(0, __binance_common.assertParamExists)("ticker24Hour", "symbol", symbol);
|
|
2636
|
-
return (0, __binance_common.replaceWebsocketStreamsPlaceholders)("/<symbol>@ticker".slice(1), {
|
|
2637
|
-
symbol,
|
|
2638
|
-
id
|
|
2639
|
-
});
|
|
2640
|
-
},
|
|
2641
|
-
ticker24HourByUnderlyingAssetAndExpirationData: (underlyingAsset, expirationDate, id) => {
|
|
2642
|
-
(0, __binance_common.assertParamExists)("ticker24HourByUnderlyingAssetAndExpirationData", "underlyingAsset", underlyingAsset);
|
|
2643
|
-
(0, __binance_common.assertParamExists)("ticker24HourByUnderlyingAssetAndExpirationData", "expirationDate", expirationDate);
|
|
2644
|
-
return (0, __binance_common.replaceWebsocketStreamsPlaceholders)("/<underlyingAsset>@ticker@<expirationDate>".slice(1), {
|
|
2645
|
-
underlyingAsset,
|
|
2646
|
-
expirationDate,
|
|
2647
|
-
id
|
|
2648
|
-
});
|
|
2649
|
-
},
|
|
2650
|
-
tradeStreams: (symbol, id) => {
|
|
2651
|
-
(0, __binance_common.assertParamExists)("tradeStreams", "symbol", symbol);
|
|
2652
|
-
return (0, __binance_common.replaceWebsocketStreamsPlaceholders)("/<symbol>@trade".slice(1), {
|
|
2653
|
-
symbol,
|
|
2654
|
-
id
|
|
2655
|
-
});
|
|
2656
2463
|
}
|
|
2657
2464
|
};
|
|
2658
2465
|
};
|
|
2659
2466
|
/**
|
|
2660
|
-
*
|
|
2661
|
-
* @class
|
|
2467
|
+
* MarketApi - interface
|
|
2468
|
+
* @class MarketApi
|
|
2662
2469
|
* @extends {WebsocketStreamsBase}
|
|
2663
2470
|
*/
|
|
2664
|
-
var
|
|
2471
|
+
var MarketApi = class {
|
|
2665
2472
|
constructor(websocketBase) {
|
|
2666
2473
|
this.websocketBase = websocketBase;
|
|
2667
|
-
this.localVarParamCreator =
|
|
2474
|
+
this.localVarParamCreator = MarketApiParamCreator();
|
|
2668
2475
|
}
|
|
2669
2476
|
/**
|
|
2670
2477
|
* Underlying(e.g ETHUSDT) index stream.
|
|
@@ -2675,12 +2482,12 @@ var WebsocketMarketStreamsApi = class {
|
|
|
2675
2482
|
* @param {IndexPriceStreamsRequest} requestParameters Request parameters.
|
|
2676
2483
|
* @returns {WebsocketStream<IndexPriceStreamsResponse>}
|
|
2677
2484
|
* @throws {RequiredError}
|
|
2678
|
-
* @memberof
|
|
2679
|
-
* @see {@link https://developers.binance.com/docs/derivatives/
|
|
2485
|
+
* @memberof MarketApi
|
|
2486
|
+
* @see {@link https://developers.binance.com/docs/derivatives/options-trading/websocket-market-streams/Index-Price-Streams Binance API Documentation}
|
|
2680
2487
|
*/
|
|
2681
|
-
indexPriceStreams(requestParameters) {
|
|
2682
|
-
const stream = this.localVarParamCreator.indexPriceStreams(requestParameters?.
|
|
2683
|
-
return (0, __binance_common.createStreamHandler)(this.websocketBase, stream, requestParameters?.id);
|
|
2488
|
+
indexPriceStreams(requestParameters = {}) {
|
|
2489
|
+
const stream = this.localVarParamCreator.indexPriceStreams(requestParameters?.id);
|
|
2490
|
+
return (0, __binance_common.createStreamHandler)(this.websocketBase, stream, requestParameters?.id, "market");
|
|
2684
2491
|
}
|
|
2685
2492
|
/**
|
|
2686
2493
|
* The Kline/Candlestick Stream push updates to the current klines/candlestick every 1000 milliseconds (if existing).
|
|
@@ -2691,15 +2498,15 @@ var WebsocketMarketStreamsApi = class {
|
|
|
2691
2498
|
* @param {KlineCandlestickStreamsRequest} requestParameters Request parameters.
|
|
2692
2499
|
* @returns {WebsocketStream<KlineCandlestickStreamsResponse>}
|
|
2693
2500
|
* @throws {RequiredError}
|
|
2694
|
-
* @memberof
|
|
2695
|
-
* @see {@link https://developers.binance.com/docs/derivatives/
|
|
2501
|
+
* @memberof MarketApi
|
|
2502
|
+
* @see {@link https://developers.binance.com/docs/derivatives/options-trading/websocket-market-streams/Kline-Candlestick-Streams Binance API Documentation}
|
|
2696
2503
|
*/
|
|
2697
2504
|
klineCandlestickStreams(requestParameters) {
|
|
2698
2505
|
const stream = this.localVarParamCreator.klineCandlestickStreams(requestParameters?.symbol, requestParameters?.interval, requestParameters?.id);
|
|
2699
|
-
return (0, __binance_common.createStreamHandler)(this.websocketBase, stream, requestParameters?.id);
|
|
2506
|
+
return (0, __binance_common.createStreamHandler)(this.websocketBase, stream, requestParameters?.id, "market");
|
|
2700
2507
|
}
|
|
2701
2508
|
/**
|
|
2702
|
-
* The mark price for all option symbols on specific underlying asset. E.g.[
|
|
2509
|
+
* The mark price for all option symbols on specific underlying asset. E.g.[btcusdt@optionMarkPrice](wss://fstream.binance.com/market/stream?streams=btcusdt@optionMarkPrice)
|
|
2703
2510
|
*
|
|
2704
2511
|
* Update Speed: 1000ms
|
|
2705
2512
|
*
|
|
@@ -2707,12 +2514,12 @@ var WebsocketMarketStreamsApi = class {
|
|
|
2707
2514
|
* @param {MarkPriceRequest} requestParameters Request parameters.
|
|
2708
2515
|
* @returns {WebsocketStream<MarkPriceResponse>}
|
|
2709
2516
|
* @throws {RequiredError}
|
|
2710
|
-
* @memberof
|
|
2711
|
-
* @see {@link https://developers.binance.com/docs/derivatives/
|
|
2517
|
+
* @memberof MarketApi
|
|
2518
|
+
* @see {@link https://developers.binance.com/docs/derivatives/options-trading/websocket-market-streams/Mark-Price Binance API Documentation}
|
|
2712
2519
|
*/
|
|
2713
2520
|
markPrice(requestParameters) {
|
|
2714
|
-
const stream = this.localVarParamCreator.markPrice(requestParameters?.
|
|
2715
|
-
return (0, __binance_common.createStreamHandler)(this.websocketBase, stream, requestParameters?.id);
|
|
2521
|
+
const stream = this.localVarParamCreator.markPrice(requestParameters?.underlying, requestParameters?.id);
|
|
2522
|
+
return (0, __binance_common.createStreamHandler)(this.websocketBase, stream, requestParameters?.id, "market");
|
|
2716
2523
|
}
|
|
2717
2524
|
/**
|
|
2718
2525
|
* New symbol listing stream.
|
|
@@ -2723,15 +2530,15 @@ var WebsocketMarketStreamsApi = class {
|
|
|
2723
2530
|
* @param {NewSymbolInfoRequest} requestParameters Request parameters.
|
|
2724
2531
|
* @returns {WebsocketStream<NewSymbolInfoResponse>}
|
|
2725
2532
|
* @throws {RequiredError}
|
|
2726
|
-
* @memberof
|
|
2727
|
-
* @see {@link https://developers.binance.com/docs/derivatives/
|
|
2533
|
+
* @memberof MarketApi
|
|
2534
|
+
* @see {@link https://developers.binance.com/docs/derivatives/options-trading/websocket-market-streams/New-Symbol-Info Binance API Documentation}
|
|
2728
2535
|
*/
|
|
2729
2536
|
newSymbolInfo(requestParameters = {}) {
|
|
2730
2537
|
const stream = this.localVarParamCreator.newSymbolInfo(requestParameters?.id);
|
|
2731
|
-
return (0, __binance_common.createStreamHandler)(this.websocketBase, stream, requestParameters?.id);
|
|
2538
|
+
return (0, __binance_common.createStreamHandler)(this.websocketBase, stream, requestParameters?.id, "market");
|
|
2732
2539
|
}
|
|
2733
2540
|
/**
|
|
2734
|
-
* Option open interest for specific underlying asset on specific expiration date. E.g.[
|
|
2541
|
+
* Option open interest for specific underlying asset on specific expiration date. E.g.[ethusdt@openInterest@221125](wss://fstream.binance.com/market/stream?streams=ethusdt@openInterest@221125)
|
|
2735
2542
|
*
|
|
2736
2543
|
* Update Speed: 60s
|
|
2737
2544
|
*
|
|
@@ -2739,28 +2546,129 @@ var WebsocketMarketStreamsApi = class {
|
|
|
2739
2546
|
* @param {OpenInterestRequest} requestParameters Request parameters.
|
|
2740
2547
|
* @returns {WebsocketStream<OpenInterestResponse>}
|
|
2741
2548
|
* @throws {RequiredError}
|
|
2742
|
-
* @memberof
|
|
2743
|
-
* @see {@link https://developers.binance.com/docs/derivatives/
|
|
2549
|
+
* @memberof MarketApi
|
|
2550
|
+
* @see {@link https://developers.binance.com/docs/derivatives/options-trading/websocket-market-streams/Open-Interest Binance API Documentation}
|
|
2744
2551
|
*/
|
|
2745
2552
|
openInterest(requestParameters) {
|
|
2746
|
-
const stream = this.localVarParamCreator.openInterest(requestParameters?.
|
|
2747
|
-
return (0, __binance_common.createStreamHandler)(this.websocketBase, stream, requestParameters?.id);
|
|
2553
|
+
const stream = this.localVarParamCreator.openInterest(requestParameters?.expirationDate, requestParameters?.id);
|
|
2554
|
+
return (0, __binance_common.createStreamHandler)(this.websocketBase, stream, requestParameters?.id, "market");
|
|
2555
|
+
}
|
|
2556
|
+
};
|
|
2557
|
+
|
|
2558
|
+
//#endregion
|
|
2559
|
+
//#region src/websocket-streams/modules/public-api.ts
|
|
2560
|
+
/**
|
|
2561
|
+
* Binance Derivatives Trading Options WebSocket Market Streams
|
|
2562
|
+
*
|
|
2563
|
+
* OpenAPI Specification for the Binance Derivatives Trading Options WebSocket Market Streams
|
|
2564
|
+
*
|
|
2565
|
+
* The version of the OpenAPI document: 1.0.0
|
|
2566
|
+
*
|
|
2567
|
+
*
|
|
2568
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
2569
|
+
* https://openapi-generator.tech
|
|
2570
|
+
* Do not edit the class manually.
|
|
2571
|
+
*/
|
|
2572
|
+
const PublicApiParamCreator = function() {
|
|
2573
|
+
return {
|
|
2574
|
+
diffBookDepthStreams: (symbol, id, updateSpeed) => {
|
|
2575
|
+
(0, __binance_common.assertParamExists)("diffBookDepthStreams", "symbol", symbol);
|
|
2576
|
+
return (0, __binance_common.replaceWebsocketStreamsPlaceholders)("/<symbol>@depth@<updateSpeed>".slice(1), {
|
|
2577
|
+
symbol,
|
|
2578
|
+
id,
|
|
2579
|
+
updateSpeed
|
|
2580
|
+
});
|
|
2581
|
+
},
|
|
2582
|
+
individualSymbolBookTickerStreams: (symbol, id) => {
|
|
2583
|
+
(0, __binance_common.assertParamExists)("individualSymbolBookTickerStreams", "symbol", symbol);
|
|
2584
|
+
return (0, __binance_common.replaceWebsocketStreamsPlaceholders)("/<symbol>@bookTicker".slice(1), {
|
|
2585
|
+
symbol,
|
|
2586
|
+
id
|
|
2587
|
+
});
|
|
2588
|
+
},
|
|
2589
|
+
partialBookDepthStreams: (symbol, level, id, updateSpeed) => {
|
|
2590
|
+
(0, __binance_common.assertParamExists)("partialBookDepthStreams", "symbol", symbol);
|
|
2591
|
+
(0, __binance_common.assertParamExists)("partialBookDepthStreams", "level", level);
|
|
2592
|
+
return (0, __binance_common.replaceWebsocketStreamsPlaceholders)("/<symbol>@depth<level>@<updateSpeed>".slice(1), {
|
|
2593
|
+
symbol,
|
|
2594
|
+
level,
|
|
2595
|
+
id,
|
|
2596
|
+
updateSpeed
|
|
2597
|
+
});
|
|
2598
|
+
},
|
|
2599
|
+
ticker24Hour: (symbol, id) => {
|
|
2600
|
+
(0, __binance_common.assertParamExists)("ticker24Hour", "symbol", symbol);
|
|
2601
|
+
return (0, __binance_common.replaceWebsocketStreamsPlaceholders)("/<symbol>@optionTicker".slice(1), {
|
|
2602
|
+
symbol,
|
|
2603
|
+
id
|
|
2604
|
+
});
|
|
2605
|
+
},
|
|
2606
|
+
tradeStreams: (symbol, id) => {
|
|
2607
|
+
(0, __binance_common.assertParamExists)("tradeStreams", "symbol", symbol);
|
|
2608
|
+
return (0, __binance_common.replaceWebsocketStreamsPlaceholders)("/<symbol>@optionTrade".slice(1), {
|
|
2609
|
+
symbol,
|
|
2610
|
+
id
|
|
2611
|
+
});
|
|
2612
|
+
}
|
|
2613
|
+
};
|
|
2614
|
+
};
|
|
2615
|
+
/**
|
|
2616
|
+
* PublicApi - interface
|
|
2617
|
+
* @class PublicApi
|
|
2618
|
+
* @extends {WebsocketStreamsBase}
|
|
2619
|
+
*/
|
|
2620
|
+
var PublicApi = class {
|
|
2621
|
+
constructor(websocketBase) {
|
|
2622
|
+
this.websocketBase = websocketBase;
|
|
2623
|
+
this.localVarParamCreator = PublicApiParamCreator();
|
|
2748
2624
|
}
|
|
2749
2625
|
/**
|
|
2750
|
-
*
|
|
2626
|
+
* Bids and asks, pushed every 500 milliseconds, 100 milliseconds (if existing)
|
|
2751
2627
|
*
|
|
2752
|
-
* Update Speed: 100ms or
|
|
2628
|
+
* Update Speed: 100ms or 500ms
|
|
2629
|
+
*
|
|
2630
|
+
* @summary Diff Book Depth Streams
|
|
2631
|
+
* @param {DiffBookDepthStreamsRequest} requestParameters Request parameters.
|
|
2632
|
+
* @returns {WebsocketStream<DiffBookDepthStreamsResponse>}
|
|
2633
|
+
* @throws {RequiredError}
|
|
2634
|
+
* @memberof PublicApi
|
|
2635
|
+
* @see {@link https://developers.binance.com/docs/derivatives/options-trading/websocket-market-streams/Diff-Book-Depth-Streams Binance API Documentation}
|
|
2636
|
+
*/
|
|
2637
|
+
diffBookDepthStreams(requestParameters) {
|
|
2638
|
+
const stream = this.localVarParamCreator.diffBookDepthStreams(requestParameters?.symbol, requestParameters?.id, requestParameters?.updateSpeed);
|
|
2639
|
+
return (0, __binance_common.createStreamHandler)(this.websocketBase, stream, requestParameters?.id, "public");
|
|
2640
|
+
}
|
|
2641
|
+
/**
|
|
2642
|
+
* Pushes any update to the best bid or ask's price or quantity in real-time for a specified symbol.
|
|
2643
|
+
*
|
|
2644
|
+
* Update Speed: Real-Time
|
|
2645
|
+
*
|
|
2646
|
+
* @summary Individual Symbol Book Ticker Streams
|
|
2647
|
+
* @param {IndividualSymbolBookTickerStreamsRequest} requestParameters Request parameters.
|
|
2648
|
+
* @returns {WebsocketStream<IndividualSymbolBookTickerStreamsResponse>}
|
|
2649
|
+
* @throws {RequiredError}
|
|
2650
|
+
* @memberof PublicApi
|
|
2651
|
+
* @see {@link https://developers.binance.com/docs/derivatives/options-trading/websocket-market-streams/Individual-Symbol-Book-Ticker-Streams Binance API Documentation}
|
|
2652
|
+
*/
|
|
2653
|
+
individualSymbolBookTickerStreams(requestParameters) {
|
|
2654
|
+
const stream = this.localVarParamCreator.individualSymbolBookTickerStreams(requestParameters?.symbol, requestParameters?.id);
|
|
2655
|
+
return (0, __binance_common.createStreamHandler)(this.websocketBase, stream, requestParameters?.id, "public");
|
|
2656
|
+
}
|
|
2657
|
+
/**
|
|
2658
|
+
* Top **<levels\>** bids and asks, Valid levels are **<levels\>** are 5, 10, 20.
|
|
2659
|
+
*
|
|
2660
|
+
* Update Speed: 100ms or 500ms
|
|
2753
2661
|
*
|
|
2754
2662
|
* @summary Partial Book Depth Streams
|
|
2755
2663
|
* @param {PartialBookDepthStreamsRequest} requestParameters Request parameters.
|
|
2756
2664
|
* @returns {WebsocketStream<PartialBookDepthStreamsResponse>}
|
|
2757
2665
|
* @throws {RequiredError}
|
|
2758
|
-
* @memberof
|
|
2759
|
-
* @see {@link https://developers.binance.com/docs/derivatives/
|
|
2666
|
+
* @memberof PublicApi
|
|
2667
|
+
* @see {@link https://developers.binance.com/docs/derivatives/options-trading/websocket-market-streams/Partial-Book-Depth-Streams Binance API Documentation}
|
|
2760
2668
|
*/
|
|
2761
2669
|
partialBookDepthStreams(requestParameters) {
|
|
2762
|
-
const stream = this.localVarParamCreator.partialBookDepthStreams(requestParameters?.symbol, requestParameters?.
|
|
2763
|
-
return (0, __binance_common.createStreamHandler)(this.websocketBase, stream, requestParameters?.id);
|
|
2670
|
+
const stream = this.localVarParamCreator.partialBookDepthStreams(requestParameters?.symbol, requestParameters?.level, requestParameters?.id, requestParameters?.updateSpeed);
|
|
2671
|
+
return (0, __binance_common.createStreamHandler)(this.websocketBase, stream, requestParameters?.id, "public");
|
|
2764
2672
|
}
|
|
2765
2673
|
/**
|
|
2766
2674
|
* 24hr ticker info for all symbols. Only symbols whose ticker info changed will be sent.
|
|
@@ -2771,31 +2679,15 @@ var WebsocketMarketStreamsApi = class {
|
|
|
2771
2679
|
* @param {Ticker24HourRequest} requestParameters Request parameters.
|
|
2772
2680
|
* @returns {WebsocketStream<Ticker24HourResponse>}
|
|
2773
2681
|
* @throws {RequiredError}
|
|
2774
|
-
* @memberof
|
|
2775
|
-
* @see {@link https://developers.binance.com/docs/derivatives/
|
|
2682
|
+
* @memberof PublicApi
|
|
2683
|
+
* @see {@link https://developers.binance.com/docs/derivatives/options-trading/websocket-market-streams/24-hour-TICKER Binance API Documentation}
|
|
2776
2684
|
*/
|
|
2777
2685
|
ticker24Hour(requestParameters) {
|
|
2778
2686
|
const stream = this.localVarParamCreator.ticker24Hour(requestParameters?.symbol, requestParameters?.id);
|
|
2779
|
-
return (0, __binance_common.createStreamHandler)(this.websocketBase, stream, requestParameters?.id);
|
|
2687
|
+
return (0, __binance_common.createStreamHandler)(this.websocketBase, stream, requestParameters?.id, "public");
|
|
2780
2688
|
}
|
|
2781
2689
|
/**
|
|
2782
|
-
*
|
|
2783
|
-
*
|
|
2784
|
-
* Update Speed: 1000ms
|
|
2785
|
-
*
|
|
2786
|
-
* @summary 24-hour TICKER by underlying asset and expiration data
|
|
2787
|
-
* @param {Ticker24HourByUnderlyingAssetAndExpirationDataRequest} requestParameters Request parameters.
|
|
2788
|
-
* @returns {WebsocketStream<Ticker24HourByUnderlyingAssetAndExpirationDataResponse>}
|
|
2789
|
-
* @throws {RequiredError}
|
|
2790
|
-
* @memberof WebsocketMarketStreamsApi
|
|
2791
|
-
* @see {@link https://developers.binance.com/docs/derivatives/option/websocket-market-streams/24-hour-TICKER-by-underlying-asset-and-expiration-data Binance API Documentation}
|
|
2792
|
-
*/
|
|
2793
|
-
ticker24HourByUnderlyingAssetAndExpirationData(requestParameters) {
|
|
2794
|
-
const stream = this.localVarParamCreator.ticker24HourByUnderlyingAssetAndExpirationData(requestParameters?.underlyingAsset, requestParameters?.expirationDate, requestParameters?.id);
|
|
2795
|
-
return (0, __binance_common.createStreamHandler)(this.websocketBase, stream, requestParameters?.id);
|
|
2796
|
-
}
|
|
2797
|
-
/**
|
|
2798
|
-
* The Trade Streams push raw trade information for specific symbol or underlying asset. E.g.[ETH@trade](wss://nbstream.binance.com/eoptions/stream?streams=ETH@trade)
|
|
2690
|
+
* The Trade Streams push raw trade information for specific symbol or underlying asset. E.g.[btcusdt@optionTrade](wss://fstream.binance.com/public/stream?streams=btcusdt@optionTrade)
|
|
2799
2691
|
*
|
|
2800
2692
|
* Update Speed: 50ms
|
|
2801
2693
|
*
|
|
@@ -2803,12 +2695,12 @@ var WebsocketMarketStreamsApi = class {
|
|
|
2803
2695
|
* @param {TradeStreamsRequest} requestParameters Request parameters.
|
|
2804
2696
|
* @returns {WebsocketStream<TradeStreamsResponse>}
|
|
2805
2697
|
* @throws {RequiredError}
|
|
2806
|
-
* @memberof
|
|
2807
|
-
* @see {@link https://developers.binance.com/docs/derivatives/
|
|
2698
|
+
* @memberof PublicApi
|
|
2699
|
+
* @see {@link https://developers.binance.com/docs/derivatives/options-trading/websocket-market-streams/Trade-Streams Binance API Documentation}
|
|
2808
2700
|
*/
|
|
2809
2701
|
tradeStreams(requestParameters) {
|
|
2810
2702
|
const stream = this.localVarParamCreator.tradeStreams(requestParameters?.symbol, requestParameters?.id);
|
|
2811
|
-
return (0, __binance_common.createStreamHandler)(this.websocketBase, stream, requestParameters?.id);
|
|
2703
|
+
return (0, __binance_common.createStreamHandler)(this.websocketBase, stream, requestParameters?.id, "public");
|
|
2812
2704
|
}
|
|
2813
2705
|
};
|
|
2814
2706
|
|
|
@@ -2829,7 +2721,8 @@ var WebsocketMarketStreamsApi = class {
|
|
|
2829
2721
|
var WebsocketStreamsConnection = class {
|
|
2830
2722
|
constructor(websocketBase) {
|
|
2831
2723
|
this.websocketBase = websocketBase;
|
|
2832
|
-
this.
|
|
2724
|
+
this.marketApi = new MarketApi(websocketBase);
|
|
2725
|
+
this.publicApi = new PublicApi(websocketBase);
|
|
2833
2726
|
}
|
|
2834
2727
|
/**
|
|
2835
2728
|
* Adds an event listener for the specified WebSocket event.
|
|
@@ -2909,7 +2802,7 @@ var WebsocketStreamsConnection = class {
|
|
|
2909
2802
|
* @returns A WebSocket stream handler for the user data stream.
|
|
2910
2803
|
*/
|
|
2911
2804
|
userData(listenKey, id) {
|
|
2912
|
-
return (0, __binance_common.createStreamHandler)(this.websocketBase, listenKey, id);
|
|
2805
|
+
return (0, __binance_common.createStreamHandler)(this.websocketBase, listenKey, id, "private");
|
|
2913
2806
|
}
|
|
2914
2807
|
/**
|
|
2915
2808
|
* Underlying(e.g ETHUSDT) index stream.
|
|
@@ -2921,10 +2814,10 @@ var WebsocketStreamsConnection = class {
|
|
|
2921
2814
|
*
|
|
2922
2815
|
* @returns {WebsocketStream<IndexPriceStreamsResponse>}
|
|
2923
2816
|
* @throws {RequiredError}
|
|
2924
|
-
* @see {@link https://developers.binance.com/docs/derivatives/
|
|
2817
|
+
* @see {@link https://developers.binance.com/docs/derivatives/options-trading/websocket-market-streams/Index-Price-Streams Binance API Documentation}
|
|
2925
2818
|
*/
|
|
2926
|
-
indexPriceStreams(requestParameters) {
|
|
2927
|
-
return this.
|
|
2819
|
+
indexPriceStreams(requestParameters = {}) {
|
|
2820
|
+
return this.marketApi.indexPriceStreams(requestParameters);
|
|
2928
2821
|
}
|
|
2929
2822
|
/**
|
|
2930
2823
|
* The Kline/Candlestick Stream push updates to the current klines/candlestick every 1000 milliseconds (if existing).
|
|
@@ -2936,13 +2829,13 @@ var WebsocketStreamsConnection = class {
|
|
|
2936
2829
|
*
|
|
2937
2830
|
* @returns {WebsocketStream<KlineCandlestickStreamsResponse>}
|
|
2938
2831
|
* @throws {RequiredError}
|
|
2939
|
-
* @see {@link https://developers.binance.com/docs/derivatives/
|
|
2832
|
+
* @see {@link https://developers.binance.com/docs/derivatives/options-trading/websocket-market-streams/Kline-Candlestick-Streams Binance API Documentation}
|
|
2940
2833
|
*/
|
|
2941
2834
|
klineCandlestickStreams(requestParameters) {
|
|
2942
|
-
return this.
|
|
2835
|
+
return this.marketApi.klineCandlestickStreams(requestParameters);
|
|
2943
2836
|
}
|
|
2944
2837
|
/**
|
|
2945
|
-
* The mark price for all option symbols on specific underlying asset. E.g.[
|
|
2838
|
+
* The mark price for all option symbols on specific underlying asset. E.g.[btcusdt@optionMarkPrice](wss://fstream.binance.com/market/stream?streams=btcusdt@optionMarkPrice)
|
|
2946
2839
|
*
|
|
2947
2840
|
* Update Speed: 1000ms
|
|
2948
2841
|
*
|
|
@@ -2951,10 +2844,10 @@ var WebsocketStreamsConnection = class {
|
|
|
2951
2844
|
*
|
|
2952
2845
|
* @returns {WebsocketStream<MarkPriceResponse>}
|
|
2953
2846
|
* @throws {RequiredError}
|
|
2954
|
-
* @see {@link https://developers.binance.com/docs/derivatives/
|
|
2847
|
+
* @see {@link https://developers.binance.com/docs/derivatives/options-trading/websocket-market-streams/Mark-Price Binance API Documentation}
|
|
2955
2848
|
*/
|
|
2956
2849
|
markPrice(requestParameters) {
|
|
2957
|
-
return this.
|
|
2850
|
+
return this.marketApi.markPrice(requestParameters);
|
|
2958
2851
|
}
|
|
2959
2852
|
/**
|
|
2960
2853
|
* New symbol listing stream.
|
|
@@ -2966,13 +2859,13 @@ var WebsocketStreamsConnection = class {
|
|
|
2966
2859
|
*
|
|
2967
2860
|
* @returns {WebsocketStream<NewSymbolInfoResponse>}
|
|
2968
2861
|
* @throws {RequiredError}
|
|
2969
|
-
* @see {@link https://developers.binance.com/docs/derivatives/
|
|
2862
|
+
* @see {@link https://developers.binance.com/docs/derivatives/options-trading/websocket-market-streams/New-Symbol-Info Binance API Documentation}
|
|
2970
2863
|
*/
|
|
2971
2864
|
newSymbolInfo(requestParameters = {}) {
|
|
2972
|
-
return this.
|
|
2865
|
+
return this.marketApi.newSymbolInfo(requestParameters);
|
|
2973
2866
|
}
|
|
2974
2867
|
/**
|
|
2975
|
-
* Option open interest for specific underlying asset on specific expiration date. E.g.[
|
|
2868
|
+
* Option open interest for specific underlying asset on specific expiration date. E.g.[ethusdt@openInterest@221125](wss://fstream.binance.com/market/stream?streams=ethusdt@openInterest@221125)
|
|
2976
2869
|
*
|
|
2977
2870
|
* Update Speed: 60s
|
|
2978
2871
|
*
|
|
@@ -2981,25 +2874,55 @@ var WebsocketStreamsConnection = class {
|
|
|
2981
2874
|
*
|
|
2982
2875
|
* @returns {WebsocketStream<OpenInterestResponse>}
|
|
2983
2876
|
* @throws {RequiredError}
|
|
2984
|
-
* @see {@link https://developers.binance.com/docs/derivatives/
|
|
2877
|
+
* @see {@link https://developers.binance.com/docs/derivatives/options-trading/websocket-market-streams/Open-Interest Binance API Documentation}
|
|
2985
2878
|
*/
|
|
2986
2879
|
openInterest(requestParameters) {
|
|
2987
|
-
return this.
|
|
2880
|
+
return this.marketApi.openInterest(requestParameters);
|
|
2881
|
+
}
|
|
2882
|
+
/**
|
|
2883
|
+
* Bids and asks, pushed every 500 milliseconds, 100 milliseconds (if existing)
|
|
2884
|
+
*
|
|
2885
|
+
* Update Speed: 100ms or 500ms
|
|
2886
|
+
*
|
|
2887
|
+
* @summary Diff Book Depth Streams
|
|
2888
|
+
* @param {DiffBookDepthStreamsRequest} requestParameters Request parameters.
|
|
2889
|
+
*
|
|
2890
|
+
* @returns {WebsocketStream<DiffBookDepthStreamsResponse>}
|
|
2891
|
+
* @throws {RequiredError}
|
|
2892
|
+
* @see {@link https://developers.binance.com/docs/derivatives/options-trading/websocket-market-streams/Diff-Book-Depth-Streams Binance API Documentation}
|
|
2893
|
+
*/
|
|
2894
|
+
diffBookDepthStreams(requestParameters) {
|
|
2895
|
+
return this.publicApi.diffBookDepthStreams(requestParameters);
|
|
2896
|
+
}
|
|
2897
|
+
/**
|
|
2898
|
+
* Pushes any update to the best bid or ask's price or quantity in real-time for a specified symbol.
|
|
2899
|
+
*
|
|
2900
|
+
* Update Speed: Real-Time
|
|
2901
|
+
*
|
|
2902
|
+
* @summary Individual Symbol Book Ticker Streams
|
|
2903
|
+
* @param {IndividualSymbolBookTickerStreamsRequest} requestParameters Request parameters.
|
|
2904
|
+
*
|
|
2905
|
+
* @returns {WebsocketStream<IndividualSymbolBookTickerStreamsResponse>}
|
|
2906
|
+
* @throws {RequiredError}
|
|
2907
|
+
* @see {@link https://developers.binance.com/docs/derivatives/options-trading/websocket-market-streams/Individual-Symbol-Book-Ticker-Streams Binance API Documentation}
|
|
2908
|
+
*/
|
|
2909
|
+
individualSymbolBookTickerStreams(requestParameters) {
|
|
2910
|
+
return this.publicApi.individualSymbolBookTickerStreams(requestParameters);
|
|
2988
2911
|
}
|
|
2989
2912
|
/**
|
|
2990
|
-
* Top **<levels\>** bids and asks, Valid levels are **<levels\>** are 10, 20
|
|
2913
|
+
* Top **<levels\>** bids and asks, Valid levels are **<levels\>** are 5, 10, 20.
|
|
2991
2914
|
*
|
|
2992
|
-
* Update Speed: 100ms or
|
|
2915
|
+
* Update Speed: 100ms or 500ms
|
|
2993
2916
|
*
|
|
2994
2917
|
* @summary Partial Book Depth Streams
|
|
2995
2918
|
* @param {PartialBookDepthStreamsRequest} requestParameters Request parameters.
|
|
2996
2919
|
*
|
|
2997
2920
|
* @returns {WebsocketStream<PartialBookDepthStreamsResponse>}
|
|
2998
2921
|
* @throws {RequiredError}
|
|
2999
|
-
* @see {@link https://developers.binance.com/docs/derivatives/
|
|
2922
|
+
* @see {@link https://developers.binance.com/docs/derivatives/options-trading/websocket-market-streams/Partial-Book-Depth-Streams Binance API Documentation}
|
|
3000
2923
|
*/
|
|
3001
2924
|
partialBookDepthStreams(requestParameters) {
|
|
3002
|
-
return this.
|
|
2925
|
+
return this.publicApi.partialBookDepthStreams(requestParameters);
|
|
3003
2926
|
}
|
|
3004
2927
|
/**
|
|
3005
2928
|
* 24hr ticker info for all symbols. Only symbols whose ticker info changed will be sent.
|
|
@@ -3011,28 +2934,13 @@ var WebsocketStreamsConnection = class {
|
|
|
3011
2934
|
*
|
|
3012
2935
|
* @returns {WebsocketStream<Ticker24HourResponse>}
|
|
3013
2936
|
* @throws {RequiredError}
|
|
3014
|
-
* @see {@link https://developers.binance.com/docs/derivatives/
|
|
2937
|
+
* @see {@link https://developers.binance.com/docs/derivatives/options-trading/websocket-market-streams/24-hour-TICKER Binance API Documentation}
|
|
3015
2938
|
*/
|
|
3016
2939
|
ticker24Hour(requestParameters) {
|
|
3017
|
-
return this.
|
|
3018
|
-
}
|
|
3019
|
-
/**
|
|
3020
|
-
* 24hr ticker info by underlying asset and expiration date. E.g.[ETH@ticker@220930](wss://nbstream.binance.com/eoptions/stream?streams=ETH@ticker@220930)
|
|
3021
|
-
*
|
|
3022
|
-
* Update Speed: 1000ms
|
|
3023
|
-
*
|
|
3024
|
-
* @summary 24-hour TICKER by underlying asset and expiration data
|
|
3025
|
-
* @param {Ticker24HourByUnderlyingAssetAndExpirationDataRequest} requestParameters Request parameters.
|
|
3026
|
-
*
|
|
3027
|
-
* @returns {WebsocketStream<Ticker24HourByUnderlyingAssetAndExpirationDataResponse>}
|
|
3028
|
-
* @throws {RequiredError}
|
|
3029
|
-
* @see {@link https://developers.binance.com/docs/derivatives/option/websocket-market-streams/24-hour-TICKER-by-underlying-asset-and-expiration-data Binance API Documentation}
|
|
3030
|
-
*/
|
|
3031
|
-
ticker24HourByUnderlyingAssetAndExpirationData(requestParameters) {
|
|
3032
|
-
return this.websocketMarketStreamsApi.ticker24HourByUnderlyingAssetAndExpirationData(requestParameters);
|
|
2940
|
+
return this.publicApi.ticker24Hour(requestParameters);
|
|
3033
2941
|
}
|
|
3034
2942
|
/**
|
|
3035
|
-
* The Trade Streams push raw trade information for specific symbol or underlying asset. E.g.[
|
|
2943
|
+
* The Trade Streams push raw trade information for specific symbol or underlying asset. E.g.[btcusdt@optionTrade](wss://fstream.binance.com/public/stream?streams=btcusdt@optionTrade)
|
|
3036
2944
|
*
|
|
3037
2945
|
* Update Speed: 50ms
|
|
3038
2946
|
*
|
|
@@ -3041,10 +2949,10 @@ var WebsocketStreamsConnection = class {
|
|
|
3041
2949
|
*
|
|
3042
2950
|
* @returns {WebsocketStream<TradeStreamsResponse>}
|
|
3043
2951
|
* @throws {RequiredError}
|
|
3044
|
-
* @see {@link https://developers.binance.com/docs/derivatives/
|
|
2952
|
+
* @see {@link https://developers.binance.com/docs/derivatives/options-trading/websocket-market-streams/Trade-Streams Binance API Documentation}
|
|
3045
2953
|
*/
|
|
3046
2954
|
tradeStreams(requestParameters) {
|
|
3047
|
-
return this.
|
|
2955
|
+
return this.publicApi.tradeStreams(requestParameters);
|
|
3048
2956
|
}
|
|
3049
2957
|
};
|
|
3050
2958
|
|
|
@@ -3080,7 +2988,12 @@ var WebsocketStreams = class {
|
|
|
3080
2988
|
...this.configuration,
|
|
3081
2989
|
...mode && { mode },
|
|
3082
2990
|
...poolSize && { poolSize }
|
|
3083
|
-
}
|
|
2991
|
+
}, [], [
|
|
2992
|
+
"market",
|
|
2993
|
+
"public",
|
|
2994
|
+
"private"
|
|
2995
|
+
]);
|
|
2996
|
+
websocketBase.streamIdIsStrictlyNumber = true;
|
|
3084
2997
|
const websocketStreamsConnection = new WebsocketStreamsConnection(websocketBase);
|
|
3085
2998
|
await websocketBase.connect(stream);
|
|
3086
2999
|
return websocketStreamsConnection;
|
|
@@ -3090,7 +3003,8 @@ var WebsocketStreams = class {
|
|
|
3090
3003
|
//#endregion
|
|
3091
3004
|
//#region src/websocket-streams/index.ts
|
|
3092
3005
|
var websocket_streams_exports = /* @__PURE__ */ __export({
|
|
3093
|
-
|
|
3006
|
+
MarketApi: () => MarketApi,
|
|
3007
|
+
PublicApi: () => PublicApi,
|
|
3094
3008
|
WebsocketStreams: () => WebsocketStreams,
|
|
3095
3009
|
WebsocketStreamsConnection: () => WebsocketStreamsConnection
|
|
3096
3010
|
});
|
|
@@ -3138,12 +3052,24 @@ Object.defineProperty(exports, 'DERIVATIVES_TRADING_OPTIONS_REST_API_PROD_URL',
|
|
|
3138
3052
|
return __binance_common.DERIVATIVES_TRADING_OPTIONS_REST_API_PROD_URL;
|
|
3139
3053
|
}
|
|
3140
3054
|
});
|
|
3055
|
+
Object.defineProperty(exports, 'DERIVATIVES_TRADING_OPTIONS_REST_API_TESTNET_URL', {
|
|
3056
|
+
enumerable: true,
|
|
3057
|
+
get: function () {
|
|
3058
|
+
return __binance_common.DERIVATIVES_TRADING_OPTIONS_REST_API_TESTNET_URL;
|
|
3059
|
+
}
|
|
3060
|
+
});
|
|
3141
3061
|
Object.defineProperty(exports, 'DERIVATIVES_TRADING_OPTIONS_WS_STREAMS_PROD_URL', {
|
|
3142
3062
|
enumerable: true,
|
|
3143
3063
|
get: function () {
|
|
3144
3064
|
return __binance_common.DERIVATIVES_TRADING_OPTIONS_WS_STREAMS_PROD_URL;
|
|
3145
3065
|
}
|
|
3146
3066
|
});
|
|
3067
|
+
Object.defineProperty(exports, 'DERIVATIVES_TRADING_OPTIONS_WS_STREAMS_TESTNET_URL', {
|
|
3068
|
+
enumerable: true,
|
|
3069
|
+
get: function () {
|
|
3070
|
+
return __binance_common.DERIVATIVES_TRADING_OPTIONS_WS_STREAMS_TESTNET_URL;
|
|
3071
|
+
}
|
|
3072
|
+
});
|
|
3147
3073
|
exports.DerivativesTradingOptions = DerivativesTradingOptions;
|
|
3148
3074
|
Object.defineProperty(exports, 'DerivativesTradingOptionsRestAPI', {
|
|
3149
3075
|
enumerable: true,
|