@binance/margin-trading 12.0.13 → 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/dist/index.d.mts +3483 -1914
- package/dist/index.d.ts +3483 -1914
- package/dist/index.js +1770 -610
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1770 -610
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -3
package/dist/index.mjs
CHANGED
|
@@ -3,14 +3,14 @@ import { BadRequestError, ConfigurationRestAPI, ConfigurationWebsocketStreams, C
|
|
|
3
3
|
|
|
4
4
|
//#region package.json
|
|
5
5
|
var name = "@binance/margin-trading";
|
|
6
|
-
var version = "
|
|
6
|
+
var version = "13.0.0";
|
|
7
7
|
|
|
8
8
|
//#endregion
|
|
9
9
|
//#region src/rest-api/modules/account-api.ts
|
|
10
10
|
/**
|
|
11
|
-
*
|
|
11
|
+
* Margin REST API
|
|
12
12
|
*
|
|
13
|
-
*
|
|
13
|
+
* Access account information, borrow and repay assets, and trade with Binance Margin.
|
|
14
14
|
*
|
|
15
15
|
* The version of the OpenAPI document: 1.0.0
|
|
16
16
|
*
|
|
@@ -231,33 +231,37 @@ var AccountApi = class {
|
|
|
231
231
|
/**
|
|
232
232
|
* Adjust cross margin max leverage
|
|
233
233
|
*
|
|
234
|
-
*
|
|
234
|
+
* Weight(UID): 3000, 1 times/min per IP
|
|
235
235
|
*
|
|
236
|
-
*
|
|
236
|
+
* Security Type: USER_DATA
|
|
237
|
+
*
|
|
238
|
+
* Notes:
|
|
239
|
+
* - The margin level need higher than the initial risk ratio of adjusted leverage, the initial risk ratio of 3x is 1.5 , the initial risk ratio of 5x is 1.25; The detail conditions on how to switch between Cross Margin Classic and Cross Margin Pro can refer to [the FAQ](https://www.binance.com/en/support/faq/how-to-activate-the-cross-margin-pro-mode-on-binance-e27786da05e743a694b8c625b3bc475d).
|
|
237
240
|
*
|
|
238
241
|
* @summary Adjust cross margin max leverage (USER_DATA)
|
|
239
242
|
* @param {AdjustCrossMarginMaxLeverageRequest} requestParameters Request parameters.
|
|
240
243
|
* @returns {Promise<RestApiResponse<AdjustCrossMarginMaxLeverageResponse>>}
|
|
241
244
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
242
245
|
* @memberof AccountApi
|
|
243
|
-
* @see {@link https://developers.binance.com/docs/
|
|
246
|
+
* @see {@link https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/account#adjust-cross-margin-max-leverage Binance API Documentation}
|
|
244
247
|
*/
|
|
245
248
|
async adjustCrossMarginMaxLeverage(requestParameters) {
|
|
246
249
|
const localVarAxiosArgs = await this.localVarAxiosParamCreator.adjustCrossMarginMaxLeverage(requestParameters?.maxLeverage);
|
|
247
250
|
return sendRequest(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs.headerParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
|
|
248
251
|
}
|
|
249
252
|
/**
|
|
250
|
-
* Disable isolated margin account for a specific symbol. Each trading pair can only be deactivated once every 24
|
|
251
|
-
*
|
|
253
|
+
* Disable isolated margin account for a specific symbol. Each trading pair can only be deactivated once every 24 hours.
|
|
254
|
+
*
|
|
255
|
+
* Weight(UID): 300
|
|
252
256
|
*
|
|
253
|
-
*
|
|
257
|
+
* Security Type: TRADE
|
|
254
258
|
*
|
|
255
259
|
* @summary Disable Isolated Margin Account (TRADE)
|
|
256
260
|
* @param {DisableIsolatedMarginAccountRequest} requestParameters Request parameters.
|
|
257
261
|
* @returns {Promise<RestApiResponse<DisableIsolatedMarginAccountResponse>>}
|
|
258
262
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
259
263
|
* @memberof AccountApi
|
|
260
|
-
* @see {@link https://developers.binance.com/docs/
|
|
264
|
+
* @see {@link https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/account#disable-isolated-margin-account Binance API Documentation}
|
|
261
265
|
*/
|
|
262
266
|
async disableIsolatedMarginAccount(requestParameters) {
|
|
263
267
|
const localVarAxiosArgs = await this.localVarAxiosParamCreator.disableIsolatedMarginAccount(requestParameters?.symbol, requestParameters?.recvWindow);
|
|
@@ -266,14 +270,16 @@ var AccountApi = class {
|
|
|
266
270
|
/**
|
|
267
271
|
* Enable isolated margin account for a specific symbol(Only supports activation of previously disabled accounts).
|
|
268
272
|
*
|
|
269
|
-
* Weight: 300
|
|
273
|
+
* Weight(UID): 300
|
|
274
|
+
*
|
|
275
|
+
* Security Type: TRADE
|
|
270
276
|
*
|
|
271
277
|
* @summary Enable Isolated Margin Account (TRADE)
|
|
272
278
|
* @param {EnableIsolatedMarginAccountRequest} requestParameters Request parameters.
|
|
273
279
|
* @returns {Promise<RestApiResponse<EnableIsolatedMarginAccountResponse>>}
|
|
274
280
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
275
281
|
* @memberof AccountApi
|
|
276
|
-
* @see {@link https://developers.binance.com/docs/
|
|
282
|
+
* @see {@link https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/account#enable-isolated-margin-account Binance API Documentation}
|
|
277
283
|
*/
|
|
278
284
|
async enableIsolatedMarginAccount(requestParameters) {
|
|
279
285
|
const localVarAxiosArgs = await this.localVarAxiosParamCreator.enableIsolatedMarginAccount(requestParameters?.symbol, requestParameters?.recvWindow);
|
|
@@ -282,14 +288,16 @@ var AccountApi = class {
|
|
|
282
288
|
/**
|
|
283
289
|
* Get BNB Burn Status
|
|
284
290
|
*
|
|
285
|
-
* Weight: 1
|
|
291
|
+
* Weight(IP): 1
|
|
292
|
+
*
|
|
293
|
+
* Security Type: USER_DATA
|
|
286
294
|
*
|
|
287
295
|
* @summary Get BNB Burn Status (USER_DATA)
|
|
288
296
|
* @param {GetBnbBurnStatusRequest} requestParameters Request parameters.
|
|
289
297
|
* @returns {Promise<RestApiResponse<GetBnbBurnStatusResponse>>}
|
|
290
298
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
291
299
|
* @memberof AccountApi
|
|
292
|
-
* @see {@link https://developers.binance.com/docs/
|
|
300
|
+
* @see {@link https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/account#get-bnb-burn-status Binance API Documentation}
|
|
293
301
|
*/
|
|
294
302
|
async getBnbBurnStatus(requestParameters = {}) {
|
|
295
303
|
const localVarAxiosArgs = await this.localVarAxiosParamCreator.getBnbBurnStatus(requestParameters?.recvWindow);
|
|
@@ -298,14 +306,16 @@ var AccountApi = class {
|
|
|
298
306
|
/**
|
|
299
307
|
* Get personal margin level information
|
|
300
308
|
*
|
|
301
|
-
* Weight: 10
|
|
309
|
+
* Weight(IP): 10
|
|
310
|
+
*
|
|
311
|
+
* Security Type: USER_DATA
|
|
302
312
|
*
|
|
303
313
|
* @summary Get Summary of Margin account (USER_DATA)
|
|
304
314
|
* @param {GetSummaryOfMarginAccountRequest} requestParameters Request parameters.
|
|
305
315
|
* @returns {Promise<RestApiResponse<GetSummaryOfMarginAccountResponse>>}
|
|
306
316
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
307
317
|
* @memberof AccountApi
|
|
308
|
-
* @see {@link https://developers.binance.com/docs/
|
|
318
|
+
* @see {@link https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/account#get-summary-of-margin-account Binance API Documentation}
|
|
309
319
|
*/
|
|
310
320
|
async getSummaryOfMarginAccount(requestParameters = {}) {
|
|
311
321
|
const localVarAxiosArgs = await this.localVarAxiosParamCreator.getSummaryOfMarginAccount(requestParameters?.recvWindow);
|
|
@@ -314,14 +324,26 @@ var AccountApi = class {
|
|
|
314
324
|
/**
|
|
315
325
|
* Query Cross Isolated Margin Capital Flow
|
|
316
326
|
*
|
|
317
|
-
* Weight: 100
|
|
327
|
+
* Weight(IP): 100
|
|
328
|
+
*
|
|
329
|
+
* Security Type: USER_DATA
|
|
330
|
+
*
|
|
331
|
+
* Notes:
|
|
332
|
+
* - Only supports querying the data of the last 90 days
|
|
333
|
+
*
|
|
334
|
+
* - The time between startTime and endTime cannot be longer than 7 days.
|
|
335
|
+
*
|
|
336
|
+
* - If fromId is set, the data with id > fromId will be returned.
|
|
337
|
+
* Otherwise the latest data will be returned
|
|
338
|
+
*
|
|
339
|
+
* - To query isolated data, Symbol needs to be entered.
|
|
318
340
|
*
|
|
319
341
|
* @summary Query Cross Isolated Margin Capital Flow (USER_DATA)
|
|
320
342
|
* @param {QueryCrossIsolatedMarginCapitalFlowRequest} requestParameters Request parameters.
|
|
321
343
|
* @returns {Promise<RestApiResponse<QueryCrossIsolatedMarginCapitalFlowResponse>>}
|
|
322
344
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
323
345
|
* @memberof AccountApi
|
|
324
|
-
* @see {@link https://developers.binance.com/docs/
|
|
346
|
+
* @see {@link https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/account#query-cross-isolated-margin-capital-flow Binance API Documentation}
|
|
325
347
|
*/
|
|
326
348
|
async queryCrossIsolatedMarginCapitalFlow(requestParameters = {}) {
|
|
327
349
|
const localVarAxiosArgs = await this.localVarAxiosParamCreator.queryCrossIsolatedMarginCapitalFlow(requestParameters?.asset, requestParameters?.symbol, requestParameters?.type, requestParameters?.startTime, requestParameters?.endTime, requestParameters?.fromId, requestParameters?.limit, requestParameters?.recvWindow);
|
|
@@ -330,14 +352,16 @@ var AccountApi = class {
|
|
|
330
352
|
/**
|
|
331
353
|
* Query Cross Margin Account Details
|
|
332
354
|
*
|
|
333
|
-
* Weight: 10
|
|
355
|
+
* Weight(IP): 10
|
|
356
|
+
*
|
|
357
|
+
* Security Type: USER_DATA
|
|
334
358
|
*
|
|
335
359
|
* @summary Query Cross Margin Account Details (USER_DATA)
|
|
336
360
|
* @param {QueryCrossMarginAccountDetailsRequest} requestParameters Request parameters.
|
|
337
361
|
* @returns {Promise<RestApiResponse<QueryCrossMarginAccountDetailsResponse>>}
|
|
338
362
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
339
363
|
* @memberof AccountApi
|
|
340
|
-
* @see {@link https://developers.binance.com/docs/
|
|
364
|
+
* @see {@link https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/account#query-cross-margin-account-details Binance API Documentation}
|
|
341
365
|
*/
|
|
342
366
|
async queryCrossMarginAccountDetails(requestParameters = {}) {
|
|
343
367
|
const localVarAxiosArgs = await this.localVarAxiosParamCreator.queryCrossMarginAccountDetails(requestParameters?.recvWindow);
|
|
@@ -346,14 +370,16 @@ var AccountApi = class {
|
|
|
346
370
|
/**
|
|
347
371
|
* Get cross margin fee data collection with any vip level or user's current specific data as https://www.binance.com/en/margin-fee
|
|
348
372
|
*
|
|
349
|
-
* Weight: 1 when coin is specified;(IP)
|
|
373
|
+
* Weight: 1 when coin is specified;(IP) 5 when the coin parameter is omitted(IP)
|
|
374
|
+
*
|
|
375
|
+
* Security Type: USER_DATA
|
|
350
376
|
*
|
|
351
377
|
* @summary Query Cross Margin Fee Data (USER_DATA)
|
|
352
378
|
* @param {QueryCrossMarginFeeDataRequest} requestParameters Request parameters.
|
|
353
379
|
* @returns {Promise<RestApiResponse<QueryCrossMarginFeeDataResponse>>}
|
|
354
380
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
355
381
|
* @memberof AccountApi
|
|
356
|
-
* @see {@link https://developers.binance.com/docs/
|
|
382
|
+
* @see {@link https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/account#query-cross-margin-fee-data Binance API Documentation}
|
|
357
383
|
*/
|
|
358
384
|
async queryCrossMarginFeeData(requestParameters = {}) {
|
|
359
385
|
const localVarAxiosArgs = await this.localVarAxiosParamCreator.queryCrossMarginFeeData(requestParameters?.vipLevel, requestParameters?.coin, requestParameters?.recvWindow);
|
|
@@ -362,14 +388,16 @@ var AccountApi = class {
|
|
|
362
388
|
/**
|
|
363
389
|
* Query enabled isolated margin account limit.
|
|
364
390
|
*
|
|
365
|
-
* Weight: 1
|
|
391
|
+
* Weight(IP): 1
|
|
392
|
+
*
|
|
393
|
+
* Security Type: USER_DATA
|
|
366
394
|
*
|
|
367
395
|
* @summary Query Enabled Isolated Margin Account Limit (USER_DATA)
|
|
368
396
|
* @param {QueryEnabledIsolatedMarginAccountLimitRequest} requestParameters Request parameters.
|
|
369
397
|
* @returns {Promise<RestApiResponse<QueryEnabledIsolatedMarginAccountLimitResponse>>}
|
|
370
398
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
371
399
|
* @memberof AccountApi
|
|
372
|
-
* @see {@link https://developers.binance.com/docs/
|
|
400
|
+
* @see {@link https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/account#query-enabled-isolated-margin-account-limit Binance API Documentation}
|
|
373
401
|
*/
|
|
374
402
|
async queryEnabledIsolatedMarginAccountLimit(requestParameters = {}) {
|
|
375
403
|
const localVarAxiosArgs = await this.localVarAxiosParamCreator.queryEnabledIsolatedMarginAccountLimit(requestParameters?.recvWindow);
|
|
@@ -378,17 +406,22 @@ var AccountApi = class {
|
|
|
378
406
|
/**
|
|
379
407
|
* Query Isolated Margin Account Info
|
|
380
408
|
*
|
|
381
|
-
*
|
|
382
|
-
*
|
|
409
|
+
* Weight(IP): 10
|
|
410
|
+
*
|
|
411
|
+
* Security Type: USER_DATA
|
|
383
412
|
*
|
|
384
|
-
*
|
|
413
|
+
* Notes:
|
|
414
|
+
* - If "symbols" is not sent, all isolated assets will be returned.
|
|
415
|
+
*
|
|
416
|
+
* - If "symbols" is sent, only the isolated assets of the sent symbols
|
|
417
|
+
* will be returned.
|
|
385
418
|
*
|
|
386
419
|
* @summary Query Isolated Margin Account Info (USER_DATA)
|
|
387
420
|
* @param {QueryIsolatedMarginAccountInfoRequest} requestParameters Request parameters.
|
|
388
421
|
* @returns {Promise<RestApiResponse<QueryIsolatedMarginAccountInfoResponse>>}
|
|
389
422
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
390
423
|
* @memberof AccountApi
|
|
391
|
-
* @see {@link https://developers.binance.com/docs/
|
|
424
|
+
* @see {@link https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/account#query-isolated-margin-account-info Binance API Documentation}
|
|
392
425
|
*/
|
|
393
426
|
async queryIsolatedMarginAccountInfo(requestParameters = {}) {
|
|
394
427
|
const localVarAxiosArgs = await this.localVarAxiosParamCreator.queryIsolatedMarginAccountInfo(requestParameters?.symbols, requestParameters?.recvWindow);
|
|
@@ -397,27 +430,48 @@ var AccountApi = class {
|
|
|
397
430
|
/**
|
|
398
431
|
* Get isolated margin fee data collection with any vip level or user's current specific data as https://www.binance.com/en/margin-fee
|
|
399
432
|
*
|
|
400
|
-
* Weight: 1 when a single is specified;(IP)
|
|
433
|
+
* Weight: 1 when a single is specified;(IP) 10 when the symbol parameter is omitted(IP)
|
|
434
|
+
*
|
|
435
|
+
* Security Type: USER_DATA
|
|
401
436
|
*
|
|
402
437
|
* @summary Query Isolated Margin Fee Data (USER_DATA)
|
|
403
438
|
* @param {QueryIsolatedMarginFeeDataRequest} requestParameters Request parameters.
|
|
404
439
|
* @returns {Promise<RestApiResponse<QueryIsolatedMarginFeeDataResponse>>}
|
|
405
440
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
406
441
|
* @memberof AccountApi
|
|
407
|
-
* @see {@link https://developers.binance.com/docs/
|
|
442
|
+
* @see {@link https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/account#query-isolated-margin-fee-data Binance API Documentation}
|
|
408
443
|
*/
|
|
409
444
|
async queryIsolatedMarginFeeData(requestParameters = {}) {
|
|
410
445
|
const localVarAxiosArgs = await this.localVarAxiosParamCreator.queryIsolatedMarginFeeData(requestParameters?.vipLevel, requestParameters?.symbol, requestParameters?.recvWindow);
|
|
411
446
|
return sendRequest(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs.headerParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
|
|
412
447
|
}
|
|
413
448
|
};
|
|
449
|
+
let QueryCrossIsolatedMarginCapitalFlowTypeEnum = /* @__PURE__ */ function(QueryCrossIsolatedMarginCapitalFlowTypeEnum$1) {
|
|
450
|
+
QueryCrossIsolatedMarginCapitalFlowTypeEnum$1["TRANSFER"] = "TRANSFER";
|
|
451
|
+
QueryCrossIsolatedMarginCapitalFlowTypeEnum$1["BORROW"] = "BORROW";
|
|
452
|
+
QueryCrossIsolatedMarginCapitalFlowTypeEnum$1["REPAY"] = "REPAY";
|
|
453
|
+
QueryCrossIsolatedMarginCapitalFlowTypeEnum$1["BUY_INCOME"] = "BUY_INCOME";
|
|
454
|
+
QueryCrossIsolatedMarginCapitalFlowTypeEnum$1["BUY_EXPENSE"] = "BUY_EXPENSE";
|
|
455
|
+
QueryCrossIsolatedMarginCapitalFlowTypeEnum$1["SELL_INCOME"] = "SELL_INCOME";
|
|
456
|
+
QueryCrossIsolatedMarginCapitalFlowTypeEnum$1["SELL_EXPENSE"] = "SELL_EXPENSE";
|
|
457
|
+
QueryCrossIsolatedMarginCapitalFlowTypeEnum$1["TRADING_COMMISSION"] = "TRADING_COMMISSION";
|
|
458
|
+
QueryCrossIsolatedMarginCapitalFlowTypeEnum$1["BUY_LIQUIDATION"] = "BUY_LIQUIDATION";
|
|
459
|
+
QueryCrossIsolatedMarginCapitalFlowTypeEnum$1["SELL_LIQUIDATION"] = "SELL_LIQUIDATION";
|
|
460
|
+
QueryCrossIsolatedMarginCapitalFlowTypeEnum$1["REPAY_LIQUIDATION"] = "REPAY_LIQUIDATION";
|
|
461
|
+
QueryCrossIsolatedMarginCapitalFlowTypeEnum$1["OTHER_LIQUIDATION"] = "OTHER_LIQUIDATION";
|
|
462
|
+
QueryCrossIsolatedMarginCapitalFlowTypeEnum$1["LIQUIDATION_FEE"] = "LIQUIDATION_FEE";
|
|
463
|
+
QueryCrossIsolatedMarginCapitalFlowTypeEnum$1["SMALL_BALANCE_CONVERT"] = "SMALL_BALANCE_CONVERT";
|
|
464
|
+
QueryCrossIsolatedMarginCapitalFlowTypeEnum$1["COMMISSION_RETURN"] = "COMMISSION_RETURN";
|
|
465
|
+
QueryCrossIsolatedMarginCapitalFlowTypeEnum$1["SMALL_CONVERT"] = "SMALL_CONVERT";
|
|
466
|
+
return QueryCrossIsolatedMarginCapitalFlowTypeEnum$1;
|
|
467
|
+
}({});
|
|
414
468
|
|
|
415
469
|
//#endregion
|
|
416
470
|
//#region src/rest-api/modules/borrow-repay-api.ts
|
|
417
471
|
/**
|
|
418
|
-
*
|
|
472
|
+
* Margin REST API
|
|
419
473
|
*
|
|
420
|
-
*
|
|
474
|
+
* Access account information, borrow and repay assets, and trade with Binance Margin.
|
|
421
475
|
*
|
|
422
476
|
* The version of the OpenAPI document: 1.0.0
|
|
423
477
|
*
|
|
@@ -472,10 +526,9 @@ const BorrowRepayApiAxiosParamCreator = function(configuration) {
|
|
|
472
526
|
timeUnit: _timeUnit
|
|
473
527
|
};
|
|
474
528
|
},
|
|
475
|
-
marginAccountBorrowRepay: async (asset, isIsolated,
|
|
529
|
+
marginAccountBorrowRepay: async (asset, isIsolated, amount, type, symbol, recvWindow) => {
|
|
476
530
|
assertParamExists("marginAccountBorrowRepay", "asset", asset);
|
|
477
531
|
assertParamExists("marginAccountBorrowRepay", "isIsolated", isIsolated);
|
|
478
|
-
assertParamExists("marginAccountBorrowRepay", "symbol", symbol);
|
|
479
532
|
assertParamExists("marginAccountBorrowRepay", "amount", amount);
|
|
480
533
|
assertParamExists("marginAccountBorrowRepay", "type", type);
|
|
481
534
|
const localVarQueryParameter = {};
|
|
@@ -577,14 +630,16 @@ var BorrowRepayApi = class {
|
|
|
577
630
|
/**
|
|
578
631
|
* Get future hourly interest rate
|
|
579
632
|
*
|
|
580
|
-
* Weight: 100
|
|
633
|
+
* Weight(IP): 100
|
|
634
|
+
*
|
|
635
|
+
* Security Type: USER_DATA
|
|
581
636
|
*
|
|
582
637
|
* @summary Get future hourly interest rate (USER_DATA)
|
|
583
638
|
* @param {GetFutureHourlyInterestRateRequest} requestParameters Request parameters.
|
|
584
639
|
* @returns {Promise<RestApiResponse<GetFutureHourlyInterestRateResponse>>}
|
|
585
640
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
586
641
|
* @memberof BorrowRepayApi
|
|
587
|
-
* @see {@link https://developers.binance.com/docs/
|
|
642
|
+
* @see {@link https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/borrow-repay#get-future-hourly-interest-rate Binance API Documentation}
|
|
588
643
|
*/
|
|
589
644
|
async getFutureHourlyInterestRate(requestParameters) {
|
|
590
645
|
const localVarAxiosArgs = await this.localVarAxiosParamCreator.getFutureHourlyInterestRate(requestParameters?.assets, requestParameters?.isIsolated);
|
|
@@ -593,64 +648,94 @@ var BorrowRepayApi = class {
|
|
|
593
648
|
/**
|
|
594
649
|
* Get Interest History
|
|
595
650
|
*
|
|
596
|
-
*
|
|
597
|
-
*
|
|
598
|
-
*
|
|
599
|
-
*
|
|
600
|
-
*
|
|
601
|
-
*
|
|
602
|
-
*
|
|
603
|
-
*
|
|
604
|
-
*
|
|
605
|
-
* `
|
|
606
|
-
*
|
|
607
|
-
*
|
|
608
|
-
*
|
|
609
|
-
*
|
|
651
|
+
* Weight(IP): 1
|
|
652
|
+
*
|
|
653
|
+
* Security Type: USER_DATA
|
|
654
|
+
*
|
|
655
|
+
* Notes:
|
|
656
|
+
* - Response in descending order
|
|
657
|
+
*
|
|
658
|
+
* - If isolatedSymbol is not sent, crossed margin data will be returned
|
|
659
|
+
*
|
|
660
|
+
* - The max interval between `startTime` and `endTime` is 30 days. It is a
|
|
661
|
+
* MUST to ensure data correctness.
|
|
662
|
+
*
|
|
663
|
+
* - If `startTime`and `endTime` not sent, return records of the last 7
|
|
664
|
+
* days by default.
|
|
665
|
+
*
|
|
666
|
+
* - If `startTime` is sent and `endTime` is not sent, return records of
|
|
667
|
+
* [max(`startTime`, now-30d), now].
|
|
668
|
+
*
|
|
669
|
+
* - If `startTime` is not sent and `endTime` is sent, return records of
|
|
670
|
+
* [`endTime`-7, `endTime`]
|
|
671
|
+
*
|
|
672
|
+
* - `type` in response has 4 enums:
|
|
673
|
+
*
|
|
674
|
+
* - `PERIODIC` interest charged per hour
|
|
675
|
+
*
|
|
676
|
+
* - `ON_BORROW` first interest charged on borrow
|
|
677
|
+
*
|
|
678
|
+
* - `PERIODIC_CONVERTED` interest charged per hour converted into BNB
|
|
679
|
+
*
|
|
680
|
+
* - `ON_BORROW_CONVERTED` first interest charged on borrow converted into
|
|
681
|
+
* BNB
|
|
682
|
+
*
|
|
683
|
+
* - `PORTFOLIO` interest charged daily on the portfolio margin negative
|
|
684
|
+
* balance
|
|
610
685
|
*
|
|
611
686
|
* @summary Get Interest History (USER_DATA)
|
|
612
687
|
* @param {GetInterestHistoryRequest} requestParameters Request parameters.
|
|
613
688
|
* @returns {Promise<RestApiResponse<GetInterestHistoryResponse>>}
|
|
614
689
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
615
690
|
* @memberof BorrowRepayApi
|
|
616
|
-
* @see {@link https://developers.binance.com/docs/
|
|
691
|
+
* @see {@link https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/borrow-repay#get-interest-history Binance API Documentation}
|
|
617
692
|
*/
|
|
618
693
|
async getInterestHistory(requestParameters = {}) {
|
|
619
694
|
const localVarAxiosArgs = await this.localVarAxiosParamCreator.getInterestHistory(requestParameters?.asset, requestParameters?.isolatedSymbol, requestParameters?.startTime, requestParameters?.endTime, requestParameters?.current, requestParameters?.size, requestParameters?.recvWindow);
|
|
620
695
|
return sendRequest(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs.headerParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
|
|
621
696
|
}
|
|
622
697
|
/**
|
|
623
|
-
* Margin account borrow/repay
|
|
698
|
+
* Margin account borrow/repay
|
|
699
|
+
*
|
|
700
|
+
* Weight(UID): 1500
|
|
624
701
|
*
|
|
625
|
-
*
|
|
702
|
+
* Security Type: USER_DATA
|
|
626
703
|
*
|
|
627
|
-
* @summary Margin account borrow/repay(
|
|
704
|
+
* @summary Margin account borrow/repay (USER_DATA)
|
|
628
705
|
* @param {MarginAccountBorrowRepayRequest} requestParameters Request parameters.
|
|
629
706
|
* @returns {Promise<RestApiResponse<MarginAccountBorrowRepayResponse>>}
|
|
630
707
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
631
708
|
* @memberof BorrowRepayApi
|
|
632
|
-
* @see {@link https://developers.binance.com/docs/
|
|
709
|
+
* @see {@link https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/borrow-repay#margin-account-borrow-repay Binance API Documentation}
|
|
633
710
|
*/
|
|
634
711
|
async marginAccountBorrowRepay(requestParameters) {
|
|
635
|
-
const localVarAxiosArgs = await this.localVarAxiosParamCreator.marginAccountBorrowRepay(requestParameters?.asset, requestParameters?.isIsolated, requestParameters?.
|
|
712
|
+
const localVarAxiosArgs = await this.localVarAxiosParamCreator.marginAccountBorrowRepay(requestParameters?.asset, requestParameters?.isIsolated, requestParameters?.amount, requestParameters?.type, requestParameters?.symbol, requestParameters?.recvWindow);
|
|
636
713
|
return sendRequest(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs.headerParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
|
|
637
714
|
}
|
|
638
715
|
/**
|
|
639
716
|
* Query borrow/repay records in Margin account
|
|
640
717
|
*
|
|
641
|
-
*
|
|
642
|
-
* If an asset is sent, data within 30 days before `endTime`; If an asset is not sent, data within 7 days before `endTime`
|
|
643
|
-
* If neither `startTime` nor `endTime` is sent, the recent 7-day data will be returned.
|
|
644
|
-
* `startTime` set as `endTime` - 7days by default, `endTime` set as current time by default
|
|
718
|
+
* Weight(IP): 10
|
|
645
719
|
*
|
|
646
|
-
*
|
|
720
|
+
* Security Type: USER_DATA
|
|
647
721
|
*
|
|
648
|
-
*
|
|
722
|
+
* Notes:
|
|
723
|
+
* - `txId` or `startTime` must be sent. `txId` takes precedence.
|
|
724
|
+
*
|
|
725
|
+
* - Response in descending order
|
|
726
|
+
*
|
|
727
|
+
* - If an asset is sent, data within 30 days before `endTime`; If an asset is not sent, data within 7 days before `endTime`
|
|
728
|
+
*
|
|
729
|
+
* - If neither `startTime` nor `endTime` is sent, the recent 7-day data will be returned.
|
|
730
|
+
*
|
|
731
|
+
* - `startTime` set as `endTime` - 7 days by default, `endTime` set as current time by default
|
|
732
|
+
*
|
|
733
|
+
* @summary Query borrow/repay records in Margin account (USER_DATA)
|
|
649
734
|
* @param {QueryBorrowRepayRecordsInMarginAccountRequest} requestParameters Request parameters.
|
|
650
735
|
* @returns {Promise<RestApiResponse<QueryBorrowRepayRecordsInMarginAccountResponse>>}
|
|
651
736
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
652
737
|
* @memberof BorrowRepayApi
|
|
653
|
-
* @see {@link https://developers.binance.com/docs/
|
|
738
|
+
* @see {@link https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/borrow-repay#query-borrow-repay-records-in-margin-account Binance API Documentation}
|
|
654
739
|
*/
|
|
655
740
|
async queryBorrowRepayRecordsInMarginAccount(requestParameters) {
|
|
656
741
|
const localVarAxiosArgs = await this.localVarAxiosParamCreator.queryBorrowRepayRecordsInMarginAccount(requestParameters?.type, requestParameters?.asset, requestParameters?.isolatedSymbol, requestParameters?.txId, requestParameters?.startTime, requestParameters?.endTime, requestParameters?.current, requestParameters?.size, requestParameters?.recvWindow);
|
|
@@ -659,14 +744,16 @@ var BorrowRepayApi = class {
|
|
|
659
744
|
/**
|
|
660
745
|
* Query Margin Interest Rate History
|
|
661
746
|
*
|
|
662
|
-
* Weight: 1
|
|
747
|
+
* Weight(IP): 1
|
|
748
|
+
*
|
|
749
|
+
* Security Type: USER_DATA
|
|
663
750
|
*
|
|
664
751
|
* @summary Query Margin Interest Rate History (USER_DATA)
|
|
665
752
|
* @param {QueryMarginInterestRateHistoryRequest} requestParameters Request parameters.
|
|
666
753
|
* @returns {Promise<RestApiResponse<QueryMarginInterestRateHistoryResponse>>}
|
|
667
754
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
668
755
|
* @memberof BorrowRepayApi
|
|
669
|
-
* @see {@link https://developers.binance.com/docs/
|
|
756
|
+
* @see {@link https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/borrow-repay#query-margin-interest-rate-history Binance API Documentation}
|
|
670
757
|
*/
|
|
671
758
|
async queryMarginInterestRateHistory(requestParameters) {
|
|
672
759
|
const localVarAxiosArgs = await this.localVarAxiosParamCreator.queryMarginInterestRateHistory(requestParameters?.asset, requestParameters?.vipLevel, requestParameters?.startTime, requestParameters?.endTime, requestParameters?.recvWindow);
|
|
@@ -675,30 +762,53 @@ var BorrowRepayApi = class {
|
|
|
675
762
|
/**
|
|
676
763
|
* Query Max Borrow
|
|
677
764
|
*
|
|
678
|
-
*
|
|
679
|
-
* `borrowLimit` is also available from [https://www.binance.com/en/margin-fee](https://www.binance.com/en/margin-fee)
|
|
765
|
+
* Weight(IP): 50
|
|
680
766
|
*
|
|
681
|
-
*
|
|
767
|
+
* Security Type: USER_DATA
|
|
768
|
+
*
|
|
769
|
+
* Notes:
|
|
770
|
+
* - If isolatedSymbol is not sent, crossed margin data will be sent.
|
|
771
|
+
* - `borrowLimit` is also available from [https://www.binance.com/en/margin-fee](https://www.binance.com/en/margin-fee)
|
|
682
772
|
*
|
|
683
773
|
* @summary Query Max Borrow (USER_DATA)
|
|
684
774
|
* @param {QueryMaxBorrowRequest} requestParameters Request parameters.
|
|
685
775
|
* @returns {Promise<RestApiResponse<QueryMaxBorrowResponse>>}
|
|
686
776
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
687
777
|
* @memberof BorrowRepayApi
|
|
688
|
-
* @see {@link https://developers.binance.com/docs/
|
|
778
|
+
* @see {@link https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/borrow-repay#query-max-borrow Binance API Documentation}
|
|
689
779
|
*/
|
|
690
780
|
async queryMaxBorrow(requestParameters) {
|
|
691
781
|
const localVarAxiosArgs = await this.localVarAxiosParamCreator.queryMaxBorrow(requestParameters?.asset, requestParameters?.isolatedSymbol, requestParameters?.recvWindow);
|
|
692
782
|
return sendRequest(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs.headerParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
|
|
693
783
|
}
|
|
694
784
|
};
|
|
785
|
+
let GetFutureHourlyInterestRateIsIsolatedEnum = /* @__PURE__ */ function(GetFutureHourlyInterestRateIsIsolatedEnum$1) {
|
|
786
|
+
GetFutureHourlyInterestRateIsIsolatedEnum$1["TRUE"] = "TRUE";
|
|
787
|
+
GetFutureHourlyInterestRateIsIsolatedEnum$1["FALSE"] = "FALSE";
|
|
788
|
+
return GetFutureHourlyInterestRateIsIsolatedEnum$1;
|
|
789
|
+
}({});
|
|
790
|
+
let MarginAccountBorrowRepayIsIsolatedEnum = /* @__PURE__ */ function(MarginAccountBorrowRepayIsIsolatedEnum$1) {
|
|
791
|
+
MarginAccountBorrowRepayIsIsolatedEnum$1["TRUE"] = "TRUE";
|
|
792
|
+
MarginAccountBorrowRepayIsIsolatedEnum$1["FALSE"] = "FALSE";
|
|
793
|
+
return MarginAccountBorrowRepayIsIsolatedEnum$1;
|
|
794
|
+
}({});
|
|
795
|
+
let MarginAccountBorrowRepayTypeEnum = /* @__PURE__ */ function(MarginAccountBorrowRepayTypeEnum$1) {
|
|
796
|
+
MarginAccountBorrowRepayTypeEnum$1["BORROW"] = "BORROW";
|
|
797
|
+
MarginAccountBorrowRepayTypeEnum$1["REPAY"] = "REPAY";
|
|
798
|
+
return MarginAccountBorrowRepayTypeEnum$1;
|
|
799
|
+
}({});
|
|
800
|
+
let QueryBorrowRepayRecordsInMarginAccountTypeEnum = /* @__PURE__ */ function(QueryBorrowRepayRecordsInMarginAccountTypeEnum$1) {
|
|
801
|
+
QueryBorrowRepayRecordsInMarginAccountTypeEnum$1["BORROW"] = "BORROW";
|
|
802
|
+
QueryBorrowRepayRecordsInMarginAccountTypeEnum$1["REPAY"] = "REPAY";
|
|
803
|
+
return QueryBorrowRepayRecordsInMarginAccountTypeEnum$1;
|
|
804
|
+
}({});
|
|
695
805
|
|
|
696
806
|
//#endregion
|
|
697
807
|
//#region src/rest-api/modules/market-data-api.ts
|
|
698
808
|
/**
|
|
699
|
-
*
|
|
809
|
+
* Margin REST API
|
|
700
810
|
*
|
|
701
|
-
*
|
|
811
|
+
* Access account information, borrow and repay assets, and trade with Binance Margin.
|
|
702
812
|
*
|
|
703
813
|
* The version of the OpenAPI document: 1.0.0
|
|
704
814
|
*
|
|
@@ -935,13 +1045,15 @@ var MarketDataApi = class {
|
|
|
935
1045
|
/**
|
|
936
1046
|
* Cross margin collateral ratio
|
|
937
1047
|
*
|
|
938
|
-
* Weight: 100
|
|
1048
|
+
* Weight(IP): 100
|
|
1049
|
+
*
|
|
1050
|
+
* Security Type: MARKET_DATA
|
|
939
1051
|
*
|
|
940
1052
|
* @summary Cross margin collateral ratio (MARKET_DATA)
|
|
941
1053
|
* @returns {Promise<RestApiResponse<CrossMarginCollateralRatioResponse>>}
|
|
942
1054
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
943
1055
|
* @memberof MarketDataApi
|
|
944
|
-
* @see {@link https://developers.binance.com/docs/
|
|
1056
|
+
* @see {@link https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/market-data#cross-margin-collateral-ratio Binance API Documentation}
|
|
945
1057
|
*/
|
|
946
1058
|
async crossMarginCollateralRatio() {
|
|
947
1059
|
const localVarAxiosArgs = await this.localVarAxiosParamCreator.crossMarginCollateralRatio();
|
|
@@ -950,14 +1062,16 @@ var MarketDataApi = class {
|
|
|
950
1062
|
/**
|
|
951
1063
|
* Get All Cross Margin Pairs
|
|
952
1064
|
*
|
|
953
|
-
* Weight: 1
|
|
1065
|
+
* Weight(IP): 1
|
|
1066
|
+
*
|
|
1067
|
+
* Security Type: MARKET_DATA
|
|
954
1068
|
*
|
|
955
1069
|
* @summary Get All Cross Margin Pairs (MARKET_DATA)
|
|
956
1070
|
* @param {GetAllCrossMarginPairsRequest} requestParameters Request parameters.
|
|
957
1071
|
* @returns {Promise<RestApiResponse<GetAllCrossMarginPairsResponse>>}
|
|
958
1072
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
959
1073
|
* @memberof MarketDataApi
|
|
960
|
-
* @see {@link https://developers.binance.com/docs/
|
|
1074
|
+
* @see {@link https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/market-data#get-all-cross-margin-pairs Binance API Documentation}
|
|
961
1075
|
*/
|
|
962
1076
|
async getAllCrossMarginPairs(requestParameters = {}) {
|
|
963
1077
|
const localVarAxiosArgs = await this.localVarAxiosParamCreator.getAllCrossMarginPairs(requestParameters?.symbol);
|
|
@@ -966,14 +1080,16 @@ var MarketDataApi = class {
|
|
|
966
1080
|
/**
|
|
967
1081
|
* Get All Isolated Margin Symbol
|
|
968
1082
|
*
|
|
969
|
-
* Weight: 10
|
|
1083
|
+
* Weight(IP): 10
|
|
1084
|
+
*
|
|
1085
|
+
* Security Type: MARKET_DATA
|
|
970
1086
|
*
|
|
971
|
-
* @summary Get All Isolated Margin Symbol(MARKET_DATA)
|
|
1087
|
+
* @summary Get All Isolated Margin Symbol (MARKET_DATA)
|
|
972
1088
|
* @param {GetAllIsolatedMarginSymbolRequest} requestParameters Request parameters.
|
|
973
1089
|
* @returns {Promise<RestApiResponse<GetAllIsolatedMarginSymbolResponse>>}
|
|
974
1090
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
975
1091
|
* @memberof MarketDataApi
|
|
976
|
-
* @see {@link https://developers.binance.com/docs/
|
|
1092
|
+
* @see {@link https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/market-data#get-all-isolated-margin-symbol Binance API Documentation}
|
|
977
1093
|
*/
|
|
978
1094
|
async getAllIsolatedMarginSymbol(requestParameters = {}) {
|
|
979
1095
|
const localVarAxiosArgs = await this.localVarAxiosParamCreator.getAllIsolatedMarginSymbol(requestParameters?.symbol, requestParameters?.recvWindow);
|
|
@@ -982,14 +1098,16 @@ var MarketDataApi = class {
|
|
|
982
1098
|
/**
|
|
983
1099
|
* Get All Margin Assets.
|
|
984
1100
|
*
|
|
985
|
-
* Weight: 1
|
|
1101
|
+
* Weight(IP): 1
|
|
1102
|
+
*
|
|
1103
|
+
* Security Type: MARKET_DATA
|
|
986
1104
|
*
|
|
987
1105
|
* @summary Get All Margin Assets (MARKET_DATA)
|
|
988
1106
|
* @param {GetAllMarginAssetsRequest} requestParameters Request parameters.
|
|
989
1107
|
* @returns {Promise<RestApiResponse<GetAllMarginAssetsResponse>>}
|
|
990
1108
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
991
1109
|
* @memberof MarketDataApi
|
|
992
|
-
* @see {@link https://developers.binance.com/docs/
|
|
1110
|
+
* @see {@link https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/market-data#get-all-margin-assets Binance API Documentation}
|
|
993
1111
|
*/
|
|
994
1112
|
async getAllMarginAssets(requestParameters = {}) {
|
|
995
1113
|
const localVarAxiosArgs = await this.localVarAxiosParamCreator.getAllMarginAssets(requestParameters?.asset);
|
|
@@ -998,14 +1116,16 @@ var MarketDataApi = class {
|
|
|
998
1116
|
/**
|
|
999
1117
|
* Get tokens or symbols delist schedule for cross margin and isolated margin
|
|
1000
1118
|
*
|
|
1001
|
-
* Weight: 100
|
|
1119
|
+
* Weight(IP): 100
|
|
1120
|
+
*
|
|
1121
|
+
* Security Type: MARKET_DATA
|
|
1002
1122
|
*
|
|
1003
1123
|
* @summary Get Delist Schedule (MARKET_DATA)
|
|
1004
1124
|
* @param {GetDelistScheduleRequest} requestParameters Request parameters.
|
|
1005
1125
|
* @returns {Promise<RestApiResponse<GetDelistScheduleResponse>>}
|
|
1006
1126
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
1007
1127
|
* @memberof MarketDataApi
|
|
1008
|
-
* @see {@link https://developers.binance.com/docs/
|
|
1128
|
+
* @see {@link https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/market-data#get-delist-schedule Binance API Documentation}
|
|
1009
1129
|
*/
|
|
1010
1130
|
async getDelistSchedule(requestParameters = {}) {
|
|
1011
1131
|
const localVarAxiosArgs = await this.localVarAxiosParamCreator.getDelistSchedule(requestParameters?.recvWindow);
|
|
@@ -1013,19 +1133,32 @@ var MarketDataApi = class {
|
|
|
1013
1133
|
}
|
|
1014
1134
|
/**
|
|
1015
1135
|
* Query trading pairs with restriction on limit price range.
|
|
1016
|
-
* In margin trading, you can place orders with limit price. Limit price should be within (-15%, 15%) of current index price for a list of margin trading pairs. This rule only impacts limit sell orders with limit price that is lower than current index price and limit buy orders with limit price that is higher than current index price.
|
|
1017
1136
|
*
|
|
1018
|
-
*
|
|
1019
|
-
*
|
|
1020
|
-
*
|
|
1137
|
+
* In margin trading, you can place orders with limit price. Limit price
|
|
1138
|
+
* should be within (-15%, 15%) of current index price for a list of margin
|
|
1139
|
+
* trading pairs. This rule only impacts limit sell orders with limit price
|
|
1140
|
+
* that is lower than current index price and limit buy orders with limit
|
|
1141
|
+
* price that is higher than current index price.
|
|
1021
1142
|
*
|
|
1022
|
-
*
|
|
1143
|
+
* - Buy order: Your order will be rejected with an error message
|
|
1144
|
+
* notification if the limit price is 15% above the index price.
|
|
1023
1145
|
*
|
|
1024
|
-
*
|
|
1146
|
+
* - Sell order: Your order will be rejected with an error message
|
|
1147
|
+
* notification if the limit price is 15% below the index price.
|
|
1148
|
+
*
|
|
1149
|
+
* Please review the limit price order placing strategy, backtest and
|
|
1150
|
+
* calibrate the planned order size with the trading volume and order book
|
|
1151
|
+
* depth to prevent trading loss.
|
|
1152
|
+
*
|
|
1153
|
+
* Weight(IP): 1
|
|
1154
|
+
*
|
|
1155
|
+
* Security Type: MARKET_DATA
|
|
1156
|
+
*
|
|
1157
|
+
* @summary Get Limit Price Pairs (MARKET_DATA)
|
|
1025
1158
|
* @returns {Promise<RestApiResponse<GetLimitPricePairsResponse>>}
|
|
1026
1159
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
1027
1160
|
* @memberof MarketDataApi
|
|
1028
|
-
* @see {@link https://developers.binance.com/docs/
|
|
1161
|
+
* @see {@link https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/market-data#get-limit-price-pairs Binance API Documentation}
|
|
1029
1162
|
*/
|
|
1030
1163
|
async getLimitPricePairs() {
|
|
1031
1164
|
const localVarAxiosArgs = await this.localVarAxiosParamCreator.getLimitPricePairs();
|
|
@@ -1034,14 +1167,16 @@ var MarketDataApi = class {
|
|
|
1034
1167
|
/**
|
|
1035
1168
|
* Get the upcoming tokens or symbols listing schedule for Cross Margin and Isolated Margin.
|
|
1036
1169
|
*
|
|
1037
|
-
* Weight: 100
|
|
1170
|
+
* Weight(IP): 100
|
|
1171
|
+
*
|
|
1172
|
+
* Security Type: MARKET_DATA
|
|
1038
1173
|
*
|
|
1039
1174
|
* @summary Get list Schedule (MARKET_DATA)
|
|
1040
1175
|
* @param {GetListScheduleRequest} requestParameters Request parameters.
|
|
1041
1176
|
* @returns {Promise<RestApiResponse<GetListScheduleResponse>>}
|
|
1042
1177
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
1043
1178
|
* @memberof MarketDataApi
|
|
1044
|
-
* @see {@link https://developers.binance.com/docs/
|
|
1179
|
+
* @see {@link https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/market-data#get-list-schedule Binance API Documentation}
|
|
1045
1180
|
*/
|
|
1046
1181
|
async getListSchedule(requestParameters = {}) {
|
|
1047
1182
|
const localVarAxiosArgs = await this.localVarAxiosParamCreator.getListSchedule(requestParameters?.recvWindow);
|
|
@@ -1050,28 +1185,32 @@ var MarketDataApi = class {
|
|
|
1050
1185
|
/**
|
|
1051
1186
|
* Get Margin Asset Risk-Based Liquidation Ratio
|
|
1052
1187
|
*
|
|
1053
|
-
* Weight: 1
|
|
1188
|
+
* Weight(IP): 1
|
|
1189
|
+
*
|
|
1190
|
+
* Security Type: MARKET_DATA
|
|
1054
1191
|
*
|
|
1055
1192
|
* @summary Get Margin Asset Risk-Based Liquidation Ratio (MARKET_DATA)
|
|
1056
1193
|
* @returns {Promise<RestApiResponse<GetMarginAssetRiskBasedLiquidationRatioResponse>>}
|
|
1057
1194
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
1058
1195
|
* @memberof MarketDataApi
|
|
1059
|
-
* @see {@link https://developers.binance.com/docs/
|
|
1196
|
+
* @see {@link https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/market-data#get-margin-asset-risk-based-liquidation-ratio Binance API Documentation}
|
|
1060
1197
|
*/
|
|
1061
1198
|
async getMarginAssetRiskBasedLiquidationRatio() {
|
|
1062
1199
|
const localVarAxiosArgs = await this.localVarAxiosParamCreator.getMarginAssetRiskBasedLiquidationRatio();
|
|
1063
1200
|
return sendRequest(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs.headerParams, localVarAxiosArgs?.timeUnit, { isSigned: false });
|
|
1064
1201
|
}
|
|
1065
1202
|
/**
|
|
1066
|
-
* Get
|
|
1203
|
+
* Get the list of margin-restricted assets.
|
|
1067
1204
|
*
|
|
1068
|
-
* Weight: 1
|
|
1205
|
+
* Weight(IP): 1
|
|
1206
|
+
*
|
|
1207
|
+
* Security Type: MARKET_DATA
|
|
1069
1208
|
*
|
|
1070
1209
|
* @summary Get Margin Restricted Assets (MARKET_DATA)
|
|
1071
1210
|
* @returns {Promise<RestApiResponse<GetMarginRestrictedAssetsResponse>>}
|
|
1072
1211
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
1073
1212
|
* @memberof MarketDataApi
|
|
1074
|
-
* @see {@link https://developers.binance.com/docs/
|
|
1213
|
+
* @see {@link https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/market-data#get-margin-restricted-assets Binance API Documentation}
|
|
1075
1214
|
*/
|
|
1076
1215
|
async getMarginRestrictedAssets() {
|
|
1077
1216
|
const localVarAxiosArgs = await this.localVarAxiosParamCreator.getMarginRestrictedAssets();
|
|
@@ -1080,14 +1219,16 @@ var MarketDataApi = class {
|
|
|
1080
1219
|
/**
|
|
1081
1220
|
* Get isolated margin tier data collection with any tier as https://www.binance.com/en/margin-data
|
|
1082
1221
|
*
|
|
1083
|
-
* Weight: 1
|
|
1222
|
+
* Weight(IP): 1
|
|
1223
|
+
*
|
|
1224
|
+
* Security Type: USER_DATA
|
|
1084
1225
|
*
|
|
1085
1226
|
* @summary Query Isolated Margin Tier Data (USER_DATA)
|
|
1086
1227
|
* @param {QueryIsolatedMarginTierDataRequest} requestParameters Request parameters.
|
|
1087
1228
|
* @returns {Promise<RestApiResponse<QueryIsolatedMarginTierDataResponse>>}
|
|
1088
1229
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
1089
1230
|
* @memberof MarketDataApi
|
|
1090
|
-
* @see {@link https://developers.binance.com/docs/
|
|
1231
|
+
* @see {@link https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/market-data#query-isolated-margin-tier-data Binance API Documentation}
|
|
1091
1232
|
*/
|
|
1092
1233
|
async queryIsolatedMarginTierData(requestParameters) {
|
|
1093
1234
|
const localVarAxiosArgs = await this.localVarAxiosParamCreator.queryIsolatedMarginTierData(requestParameters?.symbol, requestParameters?.tier, requestParameters?.recvWindow);
|
|
@@ -1096,13 +1237,15 @@ var MarketDataApi = class {
|
|
|
1096
1237
|
/**
|
|
1097
1238
|
* Liability Coin Leverage Bracket in Cross Margin Pro Mode
|
|
1098
1239
|
*
|
|
1099
|
-
* Weight: 1
|
|
1240
|
+
* Weight(IP): 1
|
|
1100
1241
|
*
|
|
1101
|
-
*
|
|
1242
|
+
* Security Type: MARKET_DATA
|
|
1243
|
+
*
|
|
1244
|
+
* @summary Query Liability Coin Leverage Bracket in Cross Margin Pro Mode (MARKET_DATA)
|
|
1102
1245
|
* @returns {Promise<RestApiResponse<QueryLiabilityCoinLeverageBracketInCrossMarginProModeResponse>>}
|
|
1103
1246
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
1104
1247
|
* @memberof MarketDataApi
|
|
1105
|
-
* @see {@link https://developers.binance.com/docs/
|
|
1248
|
+
* @see {@link https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/market-data#query-liability-coin-leverage-bracket-in-cross-margin-pro-mode Binance API Documentation}
|
|
1106
1249
|
*/
|
|
1107
1250
|
async queryLiabilityCoinLeverageBracketInCrossMarginProMode() {
|
|
1108
1251
|
const localVarAxiosArgs = await this.localVarAxiosParamCreator.queryLiabilityCoinLeverageBracketInCrossMarginProMode();
|
|
@@ -1111,14 +1254,16 @@ var MarketDataApi = class {
|
|
|
1111
1254
|
/**
|
|
1112
1255
|
* Margin available Inventory query
|
|
1113
1256
|
*
|
|
1114
|
-
* Weight: 50
|
|
1257
|
+
* Weight(UID): 50
|
|
1258
|
+
*
|
|
1259
|
+
* Security Type: USER_DATA
|
|
1115
1260
|
*
|
|
1116
|
-
* @summary Query Margin Available Inventory(USER_DATA)
|
|
1261
|
+
* @summary Query Margin Available Inventory (USER_DATA)
|
|
1117
1262
|
* @param {QueryMarginAvailableInventoryRequest} requestParameters Request parameters.
|
|
1118
1263
|
* @returns {Promise<RestApiResponse<QueryMarginAvailableInventoryResponse>>}
|
|
1119
1264
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
1120
1265
|
* @memberof MarketDataApi
|
|
1121
|
-
* @see {@link https://developers.binance.com/docs/
|
|
1266
|
+
* @see {@link https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/market-data#query-margin-available-inventory Binance API Documentation}
|
|
1122
1267
|
*/
|
|
1123
1268
|
async queryMarginAvailableInventory(requestParameters) {
|
|
1124
1269
|
const localVarAxiosArgs = await this.localVarAxiosParamCreator.queryMarginAvailableInventory(requestParameters?.type);
|
|
@@ -1127,152 +1272,34 @@ var MarketDataApi = class {
|
|
|
1127
1272
|
/**
|
|
1128
1273
|
* Query Margin PriceIndex
|
|
1129
1274
|
*
|
|
1130
|
-
* Weight: 10
|
|
1275
|
+
* Weight(IP): 10
|
|
1276
|
+
*
|
|
1277
|
+
* Security Type: MARKET_DATA
|
|
1131
1278
|
*
|
|
1132
1279
|
* @summary Query Margin PriceIndex (MARKET_DATA)
|
|
1133
1280
|
* @param {QueryMarginPriceindexRequest} requestParameters Request parameters.
|
|
1134
1281
|
* @returns {Promise<RestApiResponse<QueryMarginPriceindexResponse>>}
|
|
1135
1282
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
1136
1283
|
* @memberof MarketDataApi
|
|
1137
|
-
* @see {@link https://developers.binance.com/docs/
|
|
1284
|
+
* @see {@link https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/market-data#query-margin-priceindex Binance API Documentation}
|
|
1138
1285
|
*/
|
|
1139
1286
|
async queryMarginPriceindex(requestParameters) {
|
|
1140
1287
|
const localVarAxiosArgs = await this.localVarAxiosParamCreator.queryMarginPriceindex(requestParameters?.symbol);
|
|
1141
1288
|
return sendRequest(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs.headerParams, localVarAxiosArgs?.timeUnit, { isSigned: false });
|
|
1142
1289
|
}
|
|
1143
1290
|
};
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
*
|
|
1150
|
-
* OpenAPI Specification for the Binance Margin Trading REST API
|
|
1151
|
-
*
|
|
1152
|
-
* The version of the OpenAPI document: 1.0.0
|
|
1153
|
-
*
|
|
1154
|
-
*
|
|
1155
|
-
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
1156
|
-
* https://openapi-generator.tech
|
|
1157
|
-
* Do not edit the class manually.
|
|
1158
|
-
*/
|
|
1159
|
-
/**
|
|
1160
|
-
* RiskDataStreamApi - axios parameter creator
|
|
1161
|
-
*/
|
|
1162
|
-
const RiskDataStreamApiAxiosParamCreator = function(configuration) {
|
|
1163
|
-
return {
|
|
1164
|
-
closeUserDataStream: async () => {
|
|
1165
|
-
const localVarQueryParameter = {};
|
|
1166
|
-
const localVarBodyParameter = {};
|
|
1167
|
-
const localVarHeaderParameter = {};
|
|
1168
|
-
let _timeUnit;
|
|
1169
|
-
if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
|
|
1170
|
-
return {
|
|
1171
|
-
endpoint: "/sapi/v1/margin/listen-key",
|
|
1172
|
-
method: "DELETE",
|
|
1173
|
-
queryParams: localVarQueryParameter,
|
|
1174
|
-
bodyParams: localVarBodyParameter,
|
|
1175
|
-
headerParams: localVarHeaderParameter,
|
|
1176
|
-
timeUnit: _timeUnit
|
|
1177
|
-
};
|
|
1178
|
-
},
|
|
1179
|
-
keepaliveUserDataStream: async (listenKey) => {
|
|
1180
|
-
assertParamExists("keepaliveUserDataStream", "listenKey", listenKey);
|
|
1181
|
-
const localVarQueryParameter = {};
|
|
1182
|
-
const localVarBodyParameter = {};
|
|
1183
|
-
const localVarHeaderParameter = {};
|
|
1184
|
-
if (listenKey !== void 0 && listenKey !== null) localVarQueryParameter["listenKey"] = listenKey;
|
|
1185
|
-
let _timeUnit;
|
|
1186
|
-
if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
|
|
1187
|
-
return {
|
|
1188
|
-
endpoint: "/sapi/v1/margin/listen-key",
|
|
1189
|
-
method: "PUT",
|
|
1190
|
-
queryParams: localVarQueryParameter,
|
|
1191
|
-
bodyParams: localVarBodyParameter,
|
|
1192
|
-
headerParams: localVarHeaderParameter,
|
|
1193
|
-
timeUnit: _timeUnit
|
|
1194
|
-
};
|
|
1195
|
-
},
|
|
1196
|
-
startUserDataStream: async () => {
|
|
1197
|
-
const localVarQueryParameter = {};
|
|
1198
|
-
const localVarBodyParameter = {};
|
|
1199
|
-
const localVarHeaderParameter = {};
|
|
1200
|
-
let _timeUnit;
|
|
1201
|
-
if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
|
|
1202
|
-
return {
|
|
1203
|
-
endpoint: "/sapi/v1/margin/listen-key",
|
|
1204
|
-
method: "POST",
|
|
1205
|
-
queryParams: localVarQueryParameter,
|
|
1206
|
-
bodyParams: localVarBodyParameter,
|
|
1207
|
-
headerParams: localVarHeaderParameter,
|
|
1208
|
-
timeUnit: _timeUnit
|
|
1209
|
-
};
|
|
1210
|
-
}
|
|
1211
|
-
};
|
|
1212
|
-
};
|
|
1213
|
-
/**
|
|
1214
|
-
* RiskDataStreamApi - object-oriented interface
|
|
1215
|
-
* @class RiskDataStreamApi
|
|
1216
|
-
*/
|
|
1217
|
-
var RiskDataStreamApi = class {
|
|
1218
|
-
constructor(configuration) {
|
|
1219
|
-
this.configuration = configuration;
|
|
1220
|
-
this.localVarAxiosParamCreator = RiskDataStreamApiAxiosParamCreator(configuration);
|
|
1221
|
-
}
|
|
1222
|
-
/**
|
|
1223
|
-
* Close out a user data stream.
|
|
1224
|
-
*
|
|
1225
|
-
* Weight: 3000
|
|
1226
|
-
*
|
|
1227
|
-
* @summary Close User Data Stream (USER_STREAM)
|
|
1228
|
-
* @returns {Promise<RestApiResponse<void>>}
|
|
1229
|
-
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
1230
|
-
* @memberof RiskDataStreamApi
|
|
1231
|
-
* @see {@link https://developers.binance.com/docs/margin_trading/risk-data-stream/Close-User-Data-Stream Binance API Documentation}
|
|
1232
|
-
*/
|
|
1233
|
-
async closeUserDataStream() {
|
|
1234
|
-
const localVarAxiosArgs = await this.localVarAxiosParamCreator.closeUserDataStream();
|
|
1235
|
-
return sendRequest(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs.headerParams, localVarAxiosArgs?.timeUnit, { isSigned: false });
|
|
1236
|
-
}
|
|
1237
|
-
/**
|
|
1238
|
-
* Keepalive a user data stream to prevent a time out.
|
|
1239
|
-
*
|
|
1240
|
-
* Weight: 1
|
|
1241
|
-
*
|
|
1242
|
-
* @summary Keepalive User Data Stream (USER_STREAM)
|
|
1243
|
-
* @param {KeepaliveUserDataStreamRequest} requestParameters Request parameters.
|
|
1244
|
-
* @returns {Promise<RestApiResponse<void>>}
|
|
1245
|
-
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
1246
|
-
* @memberof RiskDataStreamApi
|
|
1247
|
-
* @see {@link https://developers.binance.com/docs/margin_trading/risk-data-stream/Keepalive-User-Data-Stream Binance API Documentation}
|
|
1248
|
-
*/
|
|
1249
|
-
async keepaliveUserDataStream(requestParameters) {
|
|
1250
|
-
const localVarAxiosArgs = await this.localVarAxiosParamCreator.keepaliveUserDataStream(requestParameters?.listenKey);
|
|
1251
|
-
return sendRequest(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs.headerParams, localVarAxiosArgs?.timeUnit, { isSigned: false });
|
|
1252
|
-
}
|
|
1253
|
-
/**
|
|
1254
|
-
* Start a new user data stream.
|
|
1255
|
-
*
|
|
1256
|
-
* Weight: 1
|
|
1257
|
-
*
|
|
1258
|
-
* @summary Start User Data Stream (USER_STREAM)
|
|
1259
|
-
* @returns {Promise<RestApiResponse<StartUserDataStreamResponse>>}
|
|
1260
|
-
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
1261
|
-
* @memberof RiskDataStreamApi
|
|
1262
|
-
* @see {@link https://developers.binance.com/docs/margin_trading/risk-data-stream/Start-User-Data-Stream Binance API Documentation}
|
|
1263
|
-
*/
|
|
1264
|
-
async startUserDataStream() {
|
|
1265
|
-
const localVarAxiosArgs = await this.localVarAxiosParamCreator.startUserDataStream();
|
|
1266
|
-
return sendRequest(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs.headerParams, localVarAxiosArgs?.timeUnit, { isSigned: false });
|
|
1267
|
-
}
|
|
1268
|
-
};
|
|
1291
|
+
let QueryMarginAvailableInventoryTypeEnum = /* @__PURE__ */ function(QueryMarginAvailableInventoryTypeEnum$1) {
|
|
1292
|
+
QueryMarginAvailableInventoryTypeEnum$1["MARGIN"] = "MARGIN";
|
|
1293
|
+
QueryMarginAvailableInventoryTypeEnum$1["ISOLATED"] = "ISOLATED";
|
|
1294
|
+
return QueryMarginAvailableInventoryTypeEnum$1;
|
|
1295
|
+
}({});
|
|
1269
1296
|
|
|
1270
1297
|
//#endregion
|
|
1271
1298
|
//#region src/rest-api/modules/trade-api.ts
|
|
1272
1299
|
/**
|
|
1273
|
-
*
|
|
1300
|
+
* Margin REST API
|
|
1274
1301
|
*
|
|
1275
|
-
*
|
|
1302
|
+
* Access account information, borrow and repay assets, and trade with Binance Margin.
|
|
1276
1303
|
*
|
|
1277
1304
|
* The version of the OpenAPI document: 1.0.0
|
|
1278
1305
|
*
|
|
@@ -1345,6 +1372,22 @@ const TradeApiAxiosParamCreator = function(configuration) {
|
|
|
1345
1372
|
timeUnit: _timeUnit
|
|
1346
1373
|
};
|
|
1347
1374
|
},
|
|
1375
|
+
exitSpecialKeyMode: async (recvWindow) => {
|
|
1376
|
+
const localVarQueryParameter = {};
|
|
1377
|
+
const localVarBodyParameter = {};
|
|
1378
|
+
const localVarHeaderParameter = {};
|
|
1379
|
+
if (recvWindow !== void 0 && recvWindow !== null) localVarQueryParameter["recvWindow"] = recvWindow;
|
|
1380
|
+
let _timeUnit;
|
|
1381
|
+
if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
|
|
1382
|
+
return {
|
|
1383
|
+
endpoint: "/sapi/v1/margin/exit-special-key-mode",
|
|
1384
|
+
method: "POST",
|
|
1385
|
+
queryParams: localVarQueryParameter,
|
|
1386
|
+
bodyParams: localVarBodyParameter,
|
|
1387
|
+
headerParams: localVarHeaderParameter,
|
|
1388
|
+
timeUnit: _timeUnit
|
|
1389
|
+
};
|
|
1390
|
+
},
|
|
1348
1391
|
getForceLiquidationRecord: async (startTime, endTime, isolatedSymbol, current, size, recvWindow) => {
|
|
1349
1392
|
const localVarQueryParameter = {};
|
|
1350
1393
|
const localVarBodyParameter = {};
|
|
@@ -1404,6 +1447,26 @@ const TradeApiAxiosParamCreator = function(configuration) {
|
|
|
1404
1447
|
timeUnit: _timeUnit
|
|
1405
1448
|
};
|
|
1406
1449
|
},
|
|
1450
|
+
liquidationLoanRepay: async (asset, amount, recvWindow) => {
|
|
1451
|
+
assertParamExists("liquidationLoanRepay", "asset", asset);
|
|
1452
|
+
assertParamExists("liquidationLoanRepay", "amount", amount);
|
|
1453
|
+
const localVarQueryParameter = {};
|
|
1454
|
+
const localVarBodyParameter = {};
|
|
1455
|
+
const localVarHeaderParameter = {};
|
|
1456
|
+
if (asset !== void 0 && asset !== null) localVarQueryParameter["asset"] = asset;
|
|
1457
|
+
if (amount !== void 0 && amount !== null) localVarQueryParameter["amount"] = amount;
|
|
1458
|
+
if (recvWindow !== void 0 && recvWindow !== null) localVarQueryParameter["recvWindow"] = recvWindow;
|
|
1459
|
+
let _timeUnit;
|
|
1460
|
+
if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
|
|
1461
|
+
return {
|
|
1462
|
+
endpoint: "/sapi/v1/margin/liquidation-loan/repay",
|
|
1463
|
+
method: "POST",
|
|
1464
|
+
queryParams: localVarQueryParameter,
|
|
1465
|
+
bodyParams: localVarBodyParameter,
|
|
1466
|
+
headerParams: localVarHeaderParameter,
|
|
1467
|
+
timeUnit: _timeUnit
|
|
1468
|
+
};
|
|
1469
|
+
},
|
|
1407
1470
|
marginAccountCancelAllOpenOrdersOnASymbol: async (symbol, isIsolated, recvWindow) => {
|
|
1408
1471
|
assertParamExists("marginAccountCancelAllOpenOrdersOnASymbol", "symbol", symbol);
|
|
1409
1472
|
const localVarQueryParameter = {};
|
|
@@ -1505,7 +1568,7 @@ const TradeApiAxiosParamCreator = function(configuration) {
|
|
|
1505
1568
|
timeUnit: _timeUnit
|
|
1506
1569
|
};
|
|
1507
1570
|
},
|
|
1508
|
-
marginAccountNewOrder: async (symbol, side, type, isIsolated, quantity, quoteOrderQty, price, stopPrice, newClientOrderId, icebergQty, newOrderRespType, sideEffectType, timeInForce, selfTradePreventionMode, autoRepayAtCancel, recvWindow) => {
|
|
1571
|
+
marginAccountNewOrder: async (symbol, side, type, isIsolated, quantity, quoteOrderQty, price, stopPrice, newClientOrderId, icebergQty, newOrderRespType, sideEffectType, timeInForce, selfTradePreventionMode, trailingDelta, autoRepayAtCancel, recvWindow) => {
|
|
1509
1572
|
assertParamExists("marginAccountNewOrder", "symbol", symbol);
|
|
1510
1573
|
assertParamExists("marginAccountNewOrder", "side", side);
|
|
1511
1574
|
assertParamExists("marginAccountNewOrder", "type", type);
|
|
@@ -1526,6 +1589,7 @@ const TradeApiAxiosParamCreator = function(configuration) {
|
|
|
1526
1589
|
if (sideEffectType !== void 0 && sideEffectType !== null) localVarQueryParameter["sideEffectType"] = sideEffectType;
|
|
1527
1590
|
if (timeInForce !== void 0 && timeInForce !== null) localVarQueryParameter["timeInForce"] = timeInForce;
|
|
1528
1591
|
if (selfTradePreventionMode !== void 0 && selfTradePreventionMode !== null) localVarQueryParameter["selfTradePreventionMode"] = selfTradePreventionMode;
|
|
1592
|
+
if (trailingDelta !== void 0 && trailingDelta !== null) localVarQueryParameter["trailingDelta"] = trailingDelta;
|
|
1529
1593
|
if (autoRepayAtCancel !== void 0 && autoRepayAtCancel !== null) localVarQueryParameter["autoRepayAtCancel"] = autoRepayAtCancel;
|
|
1530
1594
|
if (recvWindow !== void 0 && recvWindow !== null) localVarQueryParameter["recvWindow"] = recvWindow;
|
|
1531
1595
|
let _timeUnit;
|
|
@@ -1676,6 +1740,42 @@ const TradeApiAxiosParamCreator = function(configuration) {
|
|
|
1676
1740
|
timeUnit: _timeUnit
|
|
1677
1741
|
};
|
|
1678
1742
|
},
|
|
1743
|
+
queryLiquidationLoan: async (recvWindow) => {
|
|
1744
|
+
const localVarQueryParameter = {};
|
|
1745
|
+
const localVarBodyParameter = {};
|
|
1746
|
+
const localVarHeaderParameter = {};
|
|
1747
|
+
if (recvWindow !== void 0 && recvWindow !== null) localVarQueryParameter["recvWindow"] = recvWindow;
|
|
1748
|
+
let _timeUnit;
|
|
1749
|
+
if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
|
|
1750
|
+
return {
|
|
1751
|
+
endpoint: "/sapi/v1/margin/liquidation-loan",
|
|
1752
|
+
method: "GET",
|
|
1753
|
+
queryParams: localVarQueryParameter,
|
|
1754
|
+
bodyParams: localVarBodyParameter,
|
|
1755
|
+
headerParams: localVarHeaderParameter,
|
|
1756
|
+
timeUnit: _timeUnit
|
|
1757
|
+
};
|
|
1758
|
+
},
|
|
1759
|
+
queryLiquidationLoanRepayHistory: async (startTime, endTime, current, size, recvWindow) => {
|
|
1760
|
+
const localVarQueryParameter = {};
|
|
1761
|
+
const localVarBodyParameter = {};
|
|
1762
|
+
const localVarHeaderParameter = {};
|
|
1763
|
+
if (startTime !== void 0 && startTime !== null) localVarQueryParameter["startTime"] = startTime;
|
|
1764
|
+
if (endTime !== void 0 && endTime !== null) localVarQueryParameter["endTime"] = endTime;
|
|
1765
|
+
if (current !== void 0 && current !== null) localVarQueryParameter["current"] = current;
|
|
1766
|
+
if (size !== void 0 && size !== null) localVarQueryParameter["size"] = size;
|
|
1767
|
+
if (recvWindow !== void 0 && recvWindow !== null) localVarQueryParameter["recvWindow"] = recvWindow;
|
|
1768
|
+
let _timeUnit;
|
|
1769
|
+
if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
|
|
1770
|
+
return {
|
|
1771
|
+
endpoint: "/sapi/v1/margin/liquidation-loan/repay-history",
|
|
1772
|
+
method: "GET",
|
|
1773
|
+
queryParams: localVarQueryParameter,
|
|
1774
|
+
bodyParams: localVarBodyParameter,
|
|
1775
|
+
headerParams: localVarHeaderParameter,
|
|
1776
|
+
timeUnit: _timeUnit
|
|
1777
|
+
};
|
|
1778
|
+
},
|
|
1679
1779
|
queryMarginAccountsAllOco: async (isIsolated, symbol, fromId, startTime, endTime, limit, recvWindow) => {
|
|
1680
1780
|
const localVarQueryParameter = {};
|
|
1681
1781
|
const localVarBodyParameter = {};
|
|
@@ -1822,7 +1922,7 @@ const TradeApiAxiosParamCreator = function(configuration) {
|
|
|
1822
1922
|
timeUnit: _timeUnit
|
|
1823
1923
|
};
|
|
1824
1924
|
},
|
|
1825
|
-
queryPreventedMatches: async (symbol, preventedMatchId, orderId, fromPreventedMatchId,
|
|
1925
|
+
queryPreventedMatches: async (symbol, preventedMatchId, orderId, fromPreventedMatchId, isIsolated, recvWindow) => {
|
|
1826
1926
|
assertParamExists("queryPreventedMatches", "symbol", symbol);
|
|
1827
1927
|
const localVarQueryParameter = {};
|
|
1828
1928
|
const localVarBodyParameter = {};
|
|
@@ -1831,8 +1931,8 @@ const TradeApiAxiosParamCreator = function(configuration) {
|
|
|
1831
1931
|
if (preventedMatchId !== void 0 && preventedMatchId !== null) localVarQueryParameter["preventedMatchId"] = preventedMatchId;
|
|
1832
1932
|
if (orderId !== void 0 && orderId !== null) localVarQueryParameter["orderId"] = orderId;
|
|
1833
1933
|
if (fromPreventedMatchId !== void 0 && fromPreventedMatchId !== null) localVarQueryParameter["fromPreventedMatchId"] = fromPreventedMatchId;
|
|
1834
|
-
if (recvWindow !== void 0 && recvWindow !== null) localVarQueryParameter["recvWindow"] = recvWindow;
|
|
1835
1934
|
if (isIsolated !== void 0 && isIsolated !== null) localVarQueryParameter["isIsolated"] = isIsolated;
|
|
1935
|
+
if (recvWindow !== void 0 && recvWindow !== null) localVarQueryParameter["recvWindow"] = recvWindow;
|
|
1836
1936
|
let _timeUnit;
|
|
1837
1937
|
if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
|
|
1838
1938
|
return {
|
|
@@ -1883,7 +1983,7 @@ const TradeApiAxiosParamCreator = function(configuration) {
|
|
|
1883
1983
|
const localVarQueryParameter = {};
|
|
1884
1984
|
const localVarBodyParameter = {};
|
|
1885
1985
|
const localVarHeaderParameter = {};
|
|
1886
|
-
if (assetNames) localVarQueryParameter["assetNames"] = assetNames;
|
|
1986
|
+
if (assetNames !== void 0 && assetNames !== null) localVarQueryParameter["assetNames"] = assetNames;
|
|
1887
1987
|
if (recvWindow !== void 0 && recvWindow !== null) localVarQueryParameter["recvWindow"] = recvWindow;
|
|
1888
1988
|
let _timeUnit;
|
|
1889
1989
|
if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
|
|
@@ -1908,8 +2008,14 @@ var TradeApi = class {
|
|
|
1908
2008
|
this.localVarAxiosParamCreator = TradeApiAxiosParamCreator(configuration);
|
|
1909
2009
|
}
|
|
1910
2010
|
/**
|
|
2011
|
+
* **Eligibility**
|
|
2012
|
+
*
|
|
1911
2013
|
* - Binance Margin offers low-latency trading through a [special key](https://www.binance.com/en/support/faq/frequently-asked-questions-on-margin-special-api-key-3208663e900d4d2e9fec4140e1832f4e), available exclusively to users with VIP level 7 or higher.
|
|
1912
2014
|
* - If you are VIP level 6 or below, please contact your VIP manager for eligibility criterias.
|
|
2015
|
+
* - All new Margin Special Key users are required to read, understand, and agree to the Margin Special Key Supplemental Product Terms at the master account level before creating a Margin Special Key.
|
|
2016
|
+
* - Once signed at the master account level, the agreement applies to all sub-accounts. The master account and all sub-accounts (Cross Margin Classic and Portfolio Margin Pro) are authorized to create a Margin Special Key and are subject to the LiquidationLoan policy.
|
|
2017
|
+
*
|
|
2018
|
+
* For more information, please refer to [FAQ](https://www.binance.com/en/support/faq/detail/3208663e900d4d2e9fec4140e1832f4e).
|
|
1913
2019
|
*
|
|
1914
2020
|
**Supported Products:**
|
|
1915
2021
|
*
|
|
@@ -1929,86 +2035,166 @@ var TradeApi = class {
|
|
|
1929
2035
|
*
|
|
1930
2036
|
* We recommend to **use Ed25519 API keys** as it should provide the best performance and security out of all supported key types. We accept PKCS#8 (BEGIN PUBLIC KEY). For how to generate an RSA key pair to send API requests on Binance. Please refer to the document below [FAQ](https://www.binance.com/en/support/faq/how-to-generate-an-rsa-key-pair-to-send-api-requests-on-binance-2b79728f331e43079b27440d9d15c5db) .
|
|
1931
2037
|
*
|
|
1932
|
-
|
|
2038
|
+
**How to use the Margin Special Key**
|
|
2039
|
+
* - Use the below `sapi` endpoint to create your margin special API Key.
|
|
2040
|
+
* - For accessing the Cross Margin account, do not send the `symbol` parameter.
|
|
2041
|
+
* - For accessing the Isolated Margin account(s), pass the relevant `symbol` parameter in the API Key creation request.
|
|
2042
|
+
* - Use the generated API Key (and Secret key, if applicable) to perform margin trading and listenKey generation via **Spot** REST API (`https://api.binance.com/api/v3/*`) endpoints.
|
|
2043
|
+
*
|
|
2044
|
+
* Read [REST API](/products/spot/rest-api#signed-trade-and-user_data-endpoint-security) or [WebSocket API](/products/spot/web-socket-api#request-security) documentation to learn how to use different API keys
|
|
2045
|
+
*
|
|
2046
|
+
* You need to enable Permits “Enable Spot & Margin Trading” option for the API Key which requests this endpoint.
|
|
2047
|
+
*
|
|
2048
|
+
* Weight(UID): 1
|
|
2049
|
+
*
|
|
2050
|
+
* Security Type: TRADE
|
|
2051
|
+
*
|
|
2052
|
+
* Response Notes:
|
|
2053
|
+
* - Error Code Description
|
|
2054
|
+
*
|
|
2055
|
+
* - **UNSUPPORTED_OPERATION** : Portfolio Margin is an unsupported
|
|
2056
|
+
* product, please change the account type to a supported margin product.
|
|
1933
2057
|
*
|
|
1934
|
-
*
|
|
2058
|
+
* - **Forbidden**: Cross Margin Pro accounts require additional
|
|
2059
|
+
* agreements, please contact your relationship manager.
|
|
2060
|
+
*
|
|
2061
|
+
* @summary Create Special Key(Low-Latency Trading) (TRADE)
|
|
1935
2062
|
* @param {CreateSpecialKeyRequest} requestParameters Request parameters.
|
|
1936
2063
|
* @returns {Promise<RestApiResponse<CreateSpecialKeyResponse>>}
|
|
1937
2064
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
1938
2065
|
* @memberof TradeApi
|
|
1939
|
-
* @see {@link https://developers.binance.com/docs/
|
|
2066
|
+
* @see {@link https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/trade#create-special-key Binance API Documentation}
|
|
1940
2067
|
*/
|
|
1941
2068
|
async createSpecialKey(requestParameters) {
|
|
1942
2069
|
const localVarAxiosArgs = await this.localVarAxiosParamCreator.createSpecialKey(requestParameters?.apiName, requestParameters?.symbol, requestParameters?.ip, requestParameters?.publicKey, requestParameters?.permissionMode, requestParameters?.recvWindow);
|
|
1943
2070
|
return sendRequest(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs.headerParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
|
|
1944
2071
|
}
|
|
1945
2072
|
/**
|
|
1946
|
-
*
|
|
2073
|
+
* Deleting your Margin Special Key alone does not exit you from the Margin Special Key framework or discharge your obligations under the Margin Special Key Supplemental Product Terms. To fully exit, you must:
|
|
1947
2074
|
*
|
|
1948
|
-
*
|
|
2075
|
+
* 1. Delete your Margin Special Key.
|
|
2076
|
+
* 2. Ensure there are no outstanding liabilities on the account.
|
|
2077
|
+
* 3. Call the Exit Margin Special Key API endpoint.
|
|
2078
|
+
* 4. Confirm the exit status via the API response.
|
|
1949
2079
|
*
|
|
1950
|
-
*
|
|
2080
|
+
* Only after step 4 is completed and the exit status is confirmed by Binance will your account revert to standard liquidation logic and no longer be subject to the Margin Special Key Supplemental Product Terms.
|
|
2081
|
+
*
|
|
2082
|
+
* If apiKey is given, apiName will be ignored. If apiName is given with no
|
|
2083
|
+
* apiKey, all apikeys with given apiName will be deleted.
|
|
1951
2084
|
*
|
|
1952
|
-
*
|
|
2085
|
+
* You need to enable Permits “Enable Spot & Margin” option for the API Key
|
|
2086
|
+
* which requests this endpoint.
|
|
1953
2087
|
*
|
|
1954
|
-
*
|
|
2088
|
+
* Weight(UID): 1
|
|
2089
|
+
*
|
|
2090
|
+
* Security Type: TRADE
|
|
2091
|
+
*
|
|
2092
|
+
* @summary Delete Special Key(Low-Latency Trading) (TRADE)
|
|
1955
2093
|
* @param {DeleteSpecialKeyRequest} requestParameters Request parameters.
|
|
1956
2094
|
* @returns {Promise<RestApiResponse<void>>}
|
|
1957
2095
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
1958
2096
|
* @memberof TradeApi
|
|
1959
|
-
* @see {@link https://developers.binance.com/docs/
|
|
2097
|
+
* @see {@link https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/trade#delete-special-key Binance API Documentation}
|
|
1960
2098
|
*/
|
|
1961
2099
|
async deleteSpecialKey(requestParameters = {}) {
|
|
1962
2100
|
const localVarAxiosArgs = await this.localVarAxiosParamCreator.deleteSpecialKey(requestParameters?.apiName, requestParameters?.symbol, requestParameters?.recvWindow);
|
|
1963
2101
|
return sendRequest(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs.headerParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
|
|
1964
2102
|
}
|
|
1965
2103
|
/**
|
|
1966
|
-
* Edit ip restriction. This only applies to Special Key for Low Latency
|
|
2104
|
+
* Edit ip restriction. This only applies to Special Key for Low Latency
|
|
2105
|
+
* Trading.
|
|
1967
2106
|
*
|
|
1968
|
-
* You need to enable Permits “Enable Spot & Margin
|
|
2107
|
+
* You need to enable Permits “Enable Spot & Margin” option for the API Key
|
|
2108
|
+
* which requests this endpoint.
|
|
2109
|
+
*
|
|
2110
|
+
* Weight(UID): 1
|
|
1969
2111
|
*
|
|
1970
|
-
*
|
|
2112
|
+
* Security Type: TRADE
|
|
1971
2113
|
*
|
|
1972
|
-
* @summary Edit ip for Special Key(Low-Latency Trading)(TRADE)
|
|
2114
|
+
* @summary Edit ip for Special Key(Low-Latency Trading) (TRADE)
|
|
1973
2115
|
* @param {EditIpForSpecialKeyRequest} requestParameters Request parameters.
|
|
1974
2116
|
* @returns {Promise<RestApiResponse<void>>}
|
|
1975
2117
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
1976
2118
|
* @memberof TradeApi
|
|
1977
|
-
* @see {@link https://developers.binance.com/docs/
|
|
2119
|
+
* @see {@link https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/trade#edit-ip-for-special-key Binance API Documentation}
|
|
1978
2120
|
*/
|
|
1979
2121
|
async editIpForSpecialKey(requestParameters) {
|
|
1980
2122
|
const localVarAxiosArgs = await this.localVarAxiosParamCreator.editIpForSpecialKey(requestParameters?.ip, requestParameters?.symbol, requestParameters?.recvWindow);
|
|
1981
2123
|
return sendRequest(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs.headerParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
|
|
1982
2124
|
}
|
|
1983
2125
|
/**
|
|
1984
|
-
*
|
|
2126
|
+
* Exit the Margin Special Key mode for Cross Margin Classic accounts.
|
|
1985
2127
|
*
|
|
1986
|
-
|
|
2128
|
+
**All outstanding liabilities under the Cross Margin Classic account must be fully repaid before calling this endpoint.** Deleting the Margin Special Key alone does not constitute a valid exit.
|
|
1987
2129
|
*
|
|
1988
|
-
*
|
|
2130
|
+
* When a user creates a Margin Special API Key, the account enters "Special Key Mode". Upon a successful request, the following actions will be performed atomically:
|
|
1989
2131
|
*
|
|
1990
|
-
*
|
|
1991
|
-
*
|
|
1992
|
-
*
|
|
1993
|
-
*
|
|
1994
|
-
*
|
|
1995
|
-
*
|
|
1996
|
-
|
|
1997
|
-
|
|
2132
|
+
* 1. All existing Margin Special API Keys under the Cross Margin Classic mode account will be deleted.
|
|
2133
|
+
* 2. All pre-execution margin checks (including Open-order-loss calculation) will revert to standard mode.
|
|
2134
|
+
* 3. A cooldown period (default: 24 hours) will be enforced, during which the account will not be permitted to create new Margin Special API Keys.
|
|
2135
|
+
*
|
|
2136
|
+
* For more information, please refer to [FAQ](https://www.binance.com/en/support/faq/detail/3208663e900d4d2e9fec4140e1832f4e).
|
|
2137
|
+
*
|
|
2138
|
+
**Preconditions:**
|
|
2139
|
+
*
|
|
2140
|
+
* The following conditions must be met; otherwise the request will be rejected:
|
|
2141
|
+
*
|
|
2142
|
+
* - Account type must be **Cross Margin Classic**.
|
|
2143
|
+
* - Account must currently be in **Special Key Mode**. If not, the request silently succeeds.
|
|
2144
|
+
* - Account must **not be in liquidation**.
|
|
2145
|
+
* - Account must **have no liability**.
|
|
2146
|
+
*
|
|
2147
|
+
* You need to enable "Permits Enable Spot & Margin Trading" option for the API Key which requests this endpoint.
|
|
2148
|
+
*
|
|
2149
|
+
* Weight(UID): 10
|
|
2150
|
+
*
|
|
2151
|
+
* Security Type: TRADE
|
|
2152
|
+
*
|
|
2153
|
+
* @summary Exit Special Key Mode (TRADE)
|
|
2154
|
+
* @param {ExitSpecialKeyModeRequest} requestParameters Request parameters.
|
|
2155
|
+
* @returns {Promise<RestApiResponse<object>>}
|
|
2156
|
+
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
2157
|
+
* @memberof TradeApi
|
|
2158
|
+
* @see {@link https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/trade#exit-special-key-mode Binance API Documentation}
|
|
2159
|
+
*/
|
|
2160
|
+
async exitSpecialKeyMode(requestParameters = {}) {
|
|
2161
|
+
const localVarAxiosArgs = await this.localVarAxiosParamCreator.exitSpecialKeyMode(requestParameters?.recvWindow);
|
|
2162
|
+
return sendRequest(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs.headerParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
|
|
2163
|
+
}
|
|
2164
|
+
/**
|
|
2165
|
+
* Get Force Liquidation Record
|
|
2166
|
+
*
|
|
2167
|
+
* Weight(IP): 1
|
|
2168
|
+
*
|
|
2169
|
+
* Security Type: USER_DATA
|
|
2170
|
+
*
|
|
2171
|
+
* Notes:
|
|
2172
|
+
* - Response in descending order
|
|
2173
|
+
*
|
|
2174
|
+
* @summary Get Force Liquidation Record (USER_DATA)
|
|
2175
|
+
* @param {GetForceLiquidationRecordRequest} requestParameters Request parameters.
|
|
2176
|
+
* @returns {Promise<RestApiResponse<GetForceLiquidationRecordResponse>>}
|
|
2177
|
+
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
2178
|
+
* @memberof TradeApi
|
|
2179
|
+
* @see {@link https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/trade#get-force-liquidation-record Binance API Documentation}
|
|
2180
|
+
*/
|
|
2181
|
+
async getForceLiquidationRecord(requestParameters = {}) {
|
|
1998
2182
|
const localVarAxiosArgs = await this.localVarAxiosParamCreator.getForceLiquidationRecord(requestParameters?.startTime, requestParameters?.endTime, requestParameters?.isolatedSymbol, requestParameters?.current, requestParameters?.size, requestParameters?.recvWindow);
|
|
1999
2183
|
return sendRequest(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs.headerParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
|
|
2000
2184
|
}
|
|
2001
2185
|
/**
|
|
2002
2186
|
* Query the coins which can be small liability exchange
|
|
2003
2187
|
*
|
|
2004
|
-
* Weight: 100
|
|
2188
|
+
* Weight(IP): 100
|
|
2189
|
+
*
|
|
2190
|
+
* Security Type: USER_DATA
|
|
2005
2191
|
*
|
|
2006
2192
|
* @summary Get Small Liability Exchange Coin List (USER_DATA)
|
|
2007
2193
|
* @param {GetSmallLiabilityExchangeCoinListRequest} requestParameters Request parameters.
|
|
2008
2194
|
* @returns {Promise<RestApiResponse<GetSmallLiabilityExchangeCoinListResponse>>}
|
|
2009
2195
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
2010
2196
|
* @memberof TradeApi
|
|
2011
|
-
* @see {@link https://developers.binance.com/docs/
|
|
2197
|
+
* @see {@link https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/trade#get-small-liability-exchange-coin-list Binance API Documentation}
|
|
2012
2198
|
*/
|
|
2013
2199
|
async getSmallLiabilityExchangeCoinList(requestParameters = {}) {
|
|
2014
2200
|
const localVarAxiosArgs = await this.localVarAxiosParamCreator.getSmallLiabilityExchangeCoinList(requestParameters?.recvWindow);
|
|
@@ -2017,31 +2203,53 @@ var TradeApi = class {
|
|
|
2017
2203
|
/**
|
|
2018
2204
|
* Get Small liability Exchange History
|
|
2019
2205
|
*
|
|
2020
|
-
* Weight: 100
|
|
2206
|
+
* Weight(UID): 100
|
|
2207
|
+
*
|
|
2208
|
+
* Security Type: USER_DATA
|
|
2021
2209
|
*
|
|
2022
2210
|
* @summary Get Small Liability Exchange History (USER_DATA)
|
|
2023
2211
|
* @param {GetSmallLiabilityExchangeHistoryRequest} requestParameters Request parameters.
|
|
2024
2212
|
* @returns {Promise<RestApiResponse<GetSmallLiabilityExchangeHistoryResponse>>}
|
|
2025
2213
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
2026
2214
|
* @memberof TradeApi
|
|
2027
|
-
* @see {@link https://developers.binance.com/docs/
|
|
2215
|
+
* @see {@link https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/trade#get-small-liability-exchange-history Binance API Documentation}
|
|
2028
2216
|
*/
|
|
2029
2217
|
async getSmallLiabilityExchangeHistory(requestParameters) {
|
|
2030
2218
|
const localVarAxiosArgs = await this.localVarAxiosParamCreator.getSmallLiabilityExchangeHistory(requestParameters?.current, requestParameters?.size, requestParameters?.startTime, requestParameters?.endTime, requestParameters?.recvWindow);
|
|
2031
2219
|
return sendRequest(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs.headerParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
|
|
2032
2220
|
}
|
|
2033
2221
|
/**
|
|
2222
|
+
* Repays the outstanding cross-margin liquidation loan from the user's spot wallet. A liquidation loan represents the account deficit incurred when account equity turns negative during liquidation (bankruptcy). The repayment amount must be greater than 0 and cannot exceed the remaining loan balance. If the Spot Account has insufficient USDC balance, the repayment will fail.
|
|
2223
|
+
*
|
|
2224
|
+
* Weight(UID): 100
|
|
2225
|
+
*
|
|
2226
|
+
* Security Type: MARGIN
|
|
2227
|
+
*
|
|
2228
|
+
* @summary Liquidation Loan Repay (MARGIN)
|
|
2229
|
+
* @param {LiquidationLoanRepayRequest} requestParameters Request parameters.
|
|
2230
|
+
* @returns {Promise<RestApiResponse<LiquidationLoanRepayResponse>>}
|
|
2231
|
+
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
2232
|
+
* @memberof TradeApi
|
|
2233
|
+
* @see {@link https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/trade#liquidation-loan-repay Binance API Documentation}
|
|
2234
|
+
*/
|
|
2235
|
+
async liquidationLoanRepay(requestParameters) {
|
|
2236
|
+
const localVarAxiosArgs = await this.localVarAxiosParamCreator.liquidationLoanRepay(requestParameters?.asset, requestParameters?.amount, requestParameters?.recvWindow);
|
|
2237
|
+
return sendRequest(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs.headerParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
|
|
2238
|
+
}
|
|
2239
|
+
/**
|
|
2034
2240
|
* Cancels all active orders on a symbol for margin account.<br></br>
|
|
2035
2241
|
* This includes OCO orders.
|
|
2036
2242
|
*
|
|
2037
|
-
* Weight: 1
|
|
2243
|
+
* Weight(IP): 1
|
|
2244
|
+
*
|
|
2245
|
+
* Security Type: TRADE
|
|
2038
2246
|
*
|
|
2039
2247
|
* @summary Margin Account Cancel all Open Orders on a Symbol (TRADE)
|
|
2040
2248
|
* @param {MarginAccountCancelAllOpenOrdersOnASymbolRequest} requestParameters Request parameters.
|
|
2041
2249
|
* @returns {Promise<RestApiResponse<MarginAccountCancelAllOpenOrdersOnASymbolResponse>>}
|
|
2042
2250
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
2043
2251
|
* @memberof TradeApi
|
|
2044
|
-
* @see {@link https://developers.binance.com/docs/
|
|
2252
|
+
* @see {@link https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/trade#margin-account-cancel-all-open-orders-on-asymbol Binance API Documentation}
|
|
2045
2253
|
*/
|
|
2046
2254
|
async marginAccountCancelAllOpenOrdersOnASymbol(requestParameters) {
|
|
2047
2255
|
const localVarAxiosArgs = await this.localVarAxiosParamCreator.marginAccountCancelAllOpenOrdersOnASymbol(requestParameters?.symbol, requestParameters?.isIsolated, requestParameters?.recvWindow);
|
|
@@ -2050,16 +2258,19 @@ var TradeApi = class {
|
|
|
2050
2258
|
/**
|
|
2051
2259
|
* Cancel an entire Order List for a margin account.
|
|
2052
2260
|
*
|
|
2053
|
-
*
|
|
2261
|
+
* Weight(UID): 1
|
|
2054
2262
|
*
|
|
2055
|
-
*
|
|
2263
|
+
* Security Type: TRADE
|
|
2264
|
+
*
|
|
2265
|
+
* Notes:
|
|
2266
|
+
* - Canceling an individual leg will cancel the entire OCO
|
|
2056
2267
|
*
|
|
2057
2268
|
* @summary Margin Account Cancel OCO (TRADE)
|
|
2058
2269
|
* @param {MarginAccountCancelOcoRequest} requestParameters Request parameters.
|
|
2059
2270
|
* @returns {Promise<RestApiResponse<MarginAccountCancelOcoResponse>>}
|
|
2060
2271
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
2061
2272
|
* @memberof TradeApi
|
|
2062
|
-
* @see {@link https://developers.binance.com/docs/
|
|
2273
|
+
* @see {@link https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/trade#margin-account-cancel-oco Binance API Documentation}
|
|
2063
2274
|
*/
|
|
2064
2275
|
async marginAccountCancelOco(requestParameters) {
|
|
2065
2276
|
const localVarAxiosArgs = await this.localVarAxiosParamCreator.marginAccountCancelOco(requestParameters?.symbol, requestParameters?.isIsolated, requestParameters?.orderListId, requestParameters?.listClientOrderId, requestParameters?.newClientOrderId, requestParameters?.recvWindow);
|
|
@@ -2068,16 +2279,19 @@ var TradeApi = class {
|
|
|
2068
2279
|
/**
|
|
2069
2280
|
* Cancel an active order for margin account.
|
|
2070
2281
|
*
|
|
2071
|
-
*
|
|
2282
|
+
* Weight(IP): 10
|
|
2283
|
+
*
|
|
2284
|
+
* Security Type: TRADE
|
|
2072
2285
|
*
|
|
2073
|
-
*
|
|
2286
|
+
* Notes:
|
|
2287
|
+
* - Either orderId or origClientOrderId must be sent.
|
|
2074
2288
|
*
|
|
2075
2289
|
* @summary Margin Account Cancel Order (TRADE)
|
|
2076
2290
|
* @param {MarginAccountCancelOrderRequest} requestParameters Request parameters.
|
|
2077
2291
|
* @returns {Promise<RestApiResponse<MarginAccountCancelOrderResponse>>}
|
|
2078
2292
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
2079
2293
|
* @memberof TradeApi
|
|
2080
|
-
* @see {@link https://developers.binance.com/docs/
|
|
2294
|
+
* @see {@link https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/trade#margin-account-cancel-order Binance API Documentation}
|
|
2081
2295
|
*/
|
|
2082
2296
|
async marginAccountCancelOrder(requestParameters) {
|
|
2083
2297
|
const localVarAxiosArgs = await this.localVarAxiosParamCreator.marginAccountCancelOrder(requestParameters?.symbol, requestParameters?.isIsolated, requestParameters?.orderId, requestParameters?.origClientOrderId, requestParameters?.newClientOrderId, requestParameters?.recvWindow);
|
|
@@ -2086,16 +2300,19 @@ var TradeApi = class {
|
|
|
2086
2300
|
/**
|
|
2087
2301
|
* Send in a new OCO for a margin account
|
|
2088
2302
|
*
|
|
2089
|
-
*
|
|
2303
|
+
* Weight: 6(UID) or 1500(UID) when sideEffectType is MARGIN_BUY or AUTO_BORROW_REPAY
|
|
2090
2304
|
*
|
|
2091
|
-
*
|
|
2305
|
+
* Security Type: TRADE
|
|
2306
|
+
*
|
|
2307
|
+
* Notes:
|
|
2308
|
+
* - autoRepayAtCancel is suggested to set as “FALSE” to keep liability unrepaid under high frequent new order/cancel order execution
|
|
2092
2309
|
*
|
|
2093
2310
|
* @summary Margin Account New OCO (TRADE)
|
|
2094
2311
|
* @param {MarginAccountNewOcoRequest} requestParameters Request parameters.
|
|
2095
2312
|
* @returns {Promise<RestApiResponse<MarginAccountNewOcoResponse>>}
|
|
2096
2313
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
2097
2314
|
* @memberof TradeApi
|
|
2098
|
-
* @see {@link https://developers.binance.com/docs/
|
|
2315
|
+
* @see {@link https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/trade#margin-account-new-oco Binance API Documentation}
|
|
2099
2316
|
*/
|
|
2100
2317
|
async marginAccountNewOco(requestParameters) {
|
|
2101
2318
|
const localVarAxiosArgs = await this.localVarAxiosParamCreator.marginAccountNewOco(requestParameters?.symbol, requestParameters?.side, requestParameters?.quantity, requestParameters?.price, requestParameters?.stopPrice, requestParameters?.isIsolated, requestParameters?.listClientOrderId, requestParameters?.limitClientOrderId, requestParameters?.limitIcebergQty, requestParameters?.stopClientOrderId, requestParameters?.stopLimitPrice, requestParameters?.stopIcebergQty, requestParameters?.stopLimitTimeInForce, requestParameters?.newOrderRespType, requestParameters?.sideEffectType, requestParameters?.selfTradePreventionMode, requestParameters?.autoRepayAtCancel, requestParameters?.recvWindow);
|
|
@@ -2104,42 +2321,66 @@ var TradeApi = class {
|
|
|
2104
2321
|
/**
|
|
2105
2322
|
* Post a new order for margin account.
|
|
2106
2323
|
*
|
|
2107
|
-
*
|
|
2324
|
+
* Weight: 6(UID) or 1500(UID) when sideEffectType is MARGIN_BUY or AUTO_BORROW_REPAY
|
|
2325
|
+
*
|
|
2326
|
+
* Security Type: TRADE
|
|
2108
2327
|
*
|
|
2109
|
-
*
|
|
2328
|
+
* Notes:
|
|
2329
|
+
* - autoRepayAtCancel is suggested to set as “FALSE” to keep liability unrepaid under high frequent new order/cancel order execution
|
|
2110
2330
|
*
|
|
2111
2331
|
* @summary Margin Account New Order (TRADE)
|
|
2112
2332
|
* @param {MarginAccountNewOrderRequest} requestParameters Request parameters.
|
|
2113
2333
|
* @returns {Promise<RestApiResponse<MarginAccountNewOrderResponse>>}
|
|
2114
2334
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
2115
2335
|
* @memberof TradeApi
|
|
2116
|
-
* @see {@link https://developers.binance.com/docs/
|
|
2336
|
+
* @see {@link https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/trade#margin-account-new-order Binance API Documentation}
|
|
2117
2337
|
*/
|
|
2118
2338
|
async marginAccountNewOrder(requestParameters) {
|
|
2119
|
-
const localVarAxiosArgs = await this.localVarAxiosParamCreator.marginAccountNewOrder(requestParameters?.symbol, requestParameters?.side, requestParameters?.type, requestParameters?.isIsolated, requestParameters?.quantity, requestParameters?.quoteOrderQty, requestParameters?.price, requestParameters?.stopPrice, requestParameters?.newClientOrderId, requestParameters?.icebergQty, requestParameters?.newOrderRespType, requestParameters?.sideEffectType, requestParameters?.timeInForce, requestParameters?.selfTradePreventionMode, requestParameters?.autoRepayAtCancel, requestParameters?.recvWindow);
|
|
2339
|
+
const localVarAxiosArgs = await this.localVarAxiosParamCreator.marginAccountNewOrder(requestParameters?.symbol, requestParameters?.side, requestParameters?.type, requestParameters?.isIsolated, requestParameters?.quantity, requestParameters?.quoteOrderQty, requestParameters?.price, requestParameters?.stopPrice, requestParameters?.newClientOrderId, requestParameters?.icebergQty, requestParameters?.newOrderRespType, requestParameters?.sideEffectType, requestParameters?.timeInForce, requestParameters?.selfTradePreventionMode, requestParameters?.trailingDelta, requestParameters?.autoRepayAtCancel, requestParameters?.recvWindow);
|
|
2120
2340
|
return sendRequest(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs.headerParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
|
|
2121
2341
|
}
|
|
2122
2342
|
/**
|
|
2123
2343
|
* Post a new OTO order for margin account:
|
|
2124
2344
|
*
|
|
2125
|
-
* - An OTO (One-Triggers-the-Other) is an order list comprised of 2
|
|
2126
|
-
*
|
|
2127
|
-
*
|
|
2128
|
-
* -
|
|
2129
|
-
*
|
|
2130
|
-
*
|
|
2345
|
+
* - An OTO (One-Triggers-the-Other) is an order list comprised of 2
|
|
2346
|
+
* orders.
|
|
2347
|
+
*
|
|
2348
|
+
* - The first order is called the **working order** and must be `LIMIT` or
|
|
2349
|
+
* `LIMIT_MAKER`. Initially, only the working order goes on the order book.
|
|
2350
|
+
*
|
|
2351
|
+
* - The second order is called the **pending order**. It can be any order
|
|
2352
|
+
* type except for `MARKET` orders using parameter `quoteOrderQty`. The
|
|
2353
|
+
* pending order is only placed on the order book when the working order
|
|
2354
|
+
* gets **fully filled**.
|
|
2355
|
+
*
|
|
2356
|
+
* - If either the working order or the pending order is cancelled
|
|
2357
|
+
* individually, the other order in the order list will also be canceled or
|
|
2358
|
+
* expired.
|
|
2131
2359
|
*
|
|
2132
|
-
*
|
|
2133
|
-
*
|
|
2360
|
+
* - When the order list is placed, if the working order gets **immediately
|
|
2361
|
+
* fully filled**, the placement response will show the working order as
|
|
2362
|
+
* `FILLED` but the pending order will still appear as `PENDING_NEW`. You
|
|
2363
|
+
* need to query the status of the pending order again to see its updated
|
|
2364
|
+
* status.
|
|
2134
2365
|
*
|
|
2135
|
-
*
|
|
2366
|
+
* - OTOs add **2 orders** to the unfilled order count,
|
|
2367
|
+
* `EXCHANGE_MAX_NUM_ORDERS` filter and `MAX_NUM_ORDERS` filter.
|
|
2368
|
+
*
|
|
2369
|
+
* Weight: 6(UID) or 1500(UID) when sideEffectType is MARGIN_BUY or AUTO_BORROW_REPAY
|
|
2370
|
+
*
|
|
2371
|
+
* Security Type: TRADE
|
|
2372
|
+
*
|
|
2373
|
+
* Notes:
|
|
2374
|
+
* - autoRepayAtCancel is suggested to set as “FALSE” to keep liability unrepaid under high frequent new order/cancel order execution
|
|
2375
|
+
* - Depending on the `pendingType` or `workingType`, some optional
|
|
2376
|
+
* - parameters will become mandatory: | Type | Additional mandatory parameters | Additional information | | -------------------------------------------------------- | ------------------------------------------------------------ | ---------------------- | | `workingType` = `LIMIT` | `workingTimeInForce` | | | `pendingType` = `LIMIT` | `pendingPrice`, `pendingTimeInForce` | | | `pendingType` = `STOP_LOSS` or `TAKE_PROFIT` | `pendingStopPrice` and/or `pendingTrailingDelta` | | | `pendingType` = `STOP_LOSS_LIMIT` or `TAKE_PROFIT_LIMIT` | `pendingPrice`, `pendingStopPrice` and/or `pendingTrailingDelta`, `pendingTimeInForce` | | | `pendingTrailingDelta` is provided | `pendingPrice` | |
|
|
2136
2377
|
*
|
|
2137
2378
|
* @summary Margin Account New OTO (TRADE)
|
|
2138
2379
|
* @param {MarginAccountNewOtoRequest} requestParameters Request parameters.
|
|
2139
2380
|
* @returns {Promise<RestApiResponse<MarginAccountNewOtoResponse>>}
|
|
2140
2381
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
2141
2382
|
* @memberof TradeApi
|
|
2142
|
-
* @see {@link https://developers.binance.com/docs/
|
|
2383
|
+
* @see {@link https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/trade#margin-account-new-oto Binance API Documentation}
|
|
2143
2384
|
*/
|
|
2144
2385
|
async marginAccountNewOto(requestParameters) {
|
|
2145
2386
|
const localVarAxiosArgs = await this.localVarAxiosParamCreator.marginAccountNewOto(requestParameters?.symbol, requestParameters?.workingType, requestParameters?.workingSide, requestParameters?.workingPrice, requestParameters?.workingQuantity, requestParameters?.workingIcebergQty, requestParameters?.pendingType, requestParameters?.pendingSide, requestParameters?.pendingQuantity, requestParameters?.isIsolated, requestParameters?.listClientOrderId, requestParameters?.newOrderRespType, requestParameters?.sideEffectType, requestParameters?.selfTradePreventionMode, requestParameters?.autoRepayAtCancel, requestParameters?.workingClientOrderId, requestParameters?.workingTimeInForce, requestParameters?.pendingClientOrderId, requestParameters?.pendingPrice, requestParameters?.pendingStopPrice, requestParameters?.pendingTrailingDelta, requestParameters?.pendingIcebergQty, requestParameters?.pendingTimeInForce);
|
|
@@ -2148,24 +2389,34 @@ var TradeApi = class {
|
|
|
2148
2389
|
/**
|
|
2149
2390
|
* Post a new OTOCO order for margin account:
|
|
2150
2391
|
*
|
|
2151
|
-
*
|
|
2152
|
-
* -
|
|
2392
|
+
*
|
|
2393
|
+
* - An OTOCO (One-Triggers-One-Cancels-the-Other) is an order list
|
|
2394
|
+
* comprised of 3 orders.
|
|
2395
|
+
*
|
|
2396
|
+
* - The first order is called the **working order** and must be `LIMIT` or
|
|
2397
|
+
* `LIMIT_MAKER`. Initially, only the working order goes on the order book.
|
|
2153
2398
|
* - The behavior of the working order is the same as the OTO.
|
|
2154
|
-
* - OTOCO has 2 pending orders (pending above and pending below), forming
|
|
2155
|
-
*
|
|
2156
|
-
*
|
|
2399
|
+
* - OTOCO has 2 pending orders (pending above and pending below), forming
|
|
2400
|
+
* an OCO pair. The pending orders are only placed on the order book when
|
|
2401
|
+
* the working order gets **fully filled**.
|
|
2402
|
+
* - The rules of the pending above and pending below follow the same rules as the [Order List OCO](https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/trade#margin-account-new-oco).
|
|
2403
|
+
* - OTOCOs add **3 orders** against the unfilled order count,
|
|
2404
|
+
* `EXCHANGE_MAX_NUM_ORDERS` filter, and `MAX_NUM_ORDERS` filter.
|
|
2405
|
+
*
|
|
2406
|
+
* Weight: 6(UID) or 1500(UID) when sideEffectType is MARGIN_BUY or AUTO_BORROW_REPAY
|
|
2157
2407
|
*
|
|
2158
|
-
*
|
|
2159
|
-
* Depending on the `pendingAboveType`/`pendingBelowType` or `workingType`, some optional parameters will become mandatory:
|
|
2408
|
+
* Security Type: TRADE
|
|
2160
2409
|
*
|
|
2161
|
-
*
|
|
2410
|
+
* Notes:
|
|
2411
|
+
* - autoRepayAtCancel is suggested to set as “FALSE” to keep liability unrepaid under high frequent new order/cancel order execution
|
|
2412
|
+
* - Depending on the `pendingAboveType`/`pendingBelowType` or `workingType`, some optional parameters will become mandatory: | Type | Additional mandatory parameters | Additional information | | ------------------------------------ | ------------------------------------------------------------ | ---------------------- | | `workingType` = `LIMIT` | `workingTimeInForce` | | | `pendingAboveType`= `LIMIT_MAKER` | `pendingAbovePrice` | | | `pendingAboveType`= `STOP_LOSS` | `pendingAboveStopPrice` and/or `pendingAboveTrailingDelta` | | | `pendingAboveType`=`STOP_LOSS_LIMIT` | `pendingAbovePrice`, `pendingAboveStopPrice` and/or `pendingAboveTrailingDelta`, `pendingAboveTimeInForce` | | | `pendingBelowType`= `LIMIT_MAKER` | `pendingBelowPrice` | | | `pendingBelowType`= `STOP_LOSS` | `pendingBelowStopPrice` and/or `pendingBelowTrailingDelta` | | | `pendingBelowType`=`STOP_LOSS_LIMIT` | `pendingBelowPrice`, `pendingBelowStopPrice` and/or `pendingBelowTrailingDelta`, `pendingBelowTimeInForce` | | | `pendingAboveTrailingDelta` is provided | `pendingAbovePrice` | | | `pendingBelowTrailingDelta` is provided | `pendingBelowPrice` | |
|
|
2162
2413
|
*
|
|
2163
2414
|
* @summary Margin Account New OTOCO (TRADE)
|
|
2164
2415
|
* @param {MarginAccountNewOtocoRequest} requestParameters Request parameters.
|
|
2165
2416
|
* @returns {Promise<RestApiResponse<MarginAccountNewOtocoResponse>>}
|
|
2166
2417
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
2167
2418
|
* @memberof TradeApi
|
|
2168
|
-
* @see {@link https://developers.binance.com/docs/
|
|
2419
|
+
* @see {@link https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/trade#margin-account-new-otoco Binance API Documentation}
|
|
2169
2420
|
*/
|
|
2170
2421
|
async marginAccountNewOtoco(requestParameters) {
|
|
2171
2422
|
const localVarAxiosArgs = await this.localVarAxiosParamCreator.marginAccountNewOtoco(requestParameters?.symbol, requestParameters?.workingType, requestParameters?.workingSide, requestParameters?.workingPrice, requestParameters?.workingQuantity, requestParameters?.pendingSide, requestParameters?.pendingQuantity, requestParameters?.pendingAboveType, requestParameters?.isIsolated, requestParameters?.sideEffectType, requestParameters?.autoRepayAtCancel, requestParameters?.listClientOrderId, requestParameters?.newOrderRespType, requestParameters?.selfTradePreventionMode, requestParameters?.workingClientOrderId, requestParameters?.workingIcebergQty, requestParameters?.workingTimeInForce, requestParameters?.pendingAboveClientOrderId, requestParameters?.pendingAbovePrice, requestParameters?.pendingAboveStopPrice, requestParameters?.pendingAboveTrailingDelta, requestParameters?.pendingAboveIcebergQty, requestParameters?.pendingAboveTimeInForce, requestParameters?.pendingBelowType, requestParameters?.pendingBelowClientOrderId, requestParameters?.pendingBelowPrice, requestParameters?.pendingBelowStopPrice, requestParameters?.pendingBelowTrailingDelta, requestParameters?.pendingBelowIcebergQty, requestParameters?.pendingBelowTimeInForce);
|
|
@@ -2174,17 +2425,20 @@ var TradeApi = class {
|
|
|
2174
2425
|
/**
|
|
2175
2426
|
* Margin Manual Liquidation
|
|
2176
2427
|
*
|
|
2177
|
-
*
|
|
2178
|
-
* And only support Isolated Margin for restricted region.
|
|
2428
|
+
* Weight(UID): 3000
|
|
2179
2429
|
*
|
|
2180
|
-
*
|
|
2430
|
+
* Security Type: TRADE
|
|
2181
2431
|
*
|
|
2182
|
-
*
|
|
2432
|
+
* Notes:
|
|
2433
|
+
* - This endpoint supports Cross Margin Classic Mode and Pro Mode.
|
|
2434
|
+
* - Isolated Margin is only supported in restricted regions.
|
|
2435
|
+
*
|
|
2436
|
+
* @summary Margin Manual Liquidation (TRADE)
|
|
2183
2437
|
* @param {MarginManualLiquidationRequest} requestParameters Request parameters.
|
|
2184
2438
|
* @returns {Promise<RestApiResponse<MarginManualLiquidationResponse>>}
|
|
2185
2439
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
2186
2440
|
* @memberof TradeApi
|
|
2187
|
-
* @see {@link https://developers.binance.com/docs/
|
|
2441
|
+
* @see {@link https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/trade#margin-manual-liquidation Binance API Documentation}
|
|
2188
2442
|
*/
|
|
2189
2443
|
async marginManualLiquidation(requestParameters) {
|
|
2190
2444
|
const localVarAxiosArgs = await this.localVarAxiosParamCreator.marginManualLiquidation(requestParameters?.type, requestParameters?.symbol, requestParameters?.recvWindow);
|
|
@@ -2193,30 +2447,74 @@ var TradeApi = class {
|
|
|
2193
2447
|
/**
|
|
2194
2448
|
* Displays the user's current margin order count usage for all intervals.
|
|
2195
2449
|
*
|
|
2196
|
-
* Weight: 20
|
|
2450
|
+
* Weight(IP): 20
|
|
2451
|
+
*
|
|
2452
|
+
* Security Type: TRADE
|
|
2197
2453
|
*
|
|
2198
2454
|
* @summary Query Current Margin Order Count Usage (TRADE)
|
|
2199
2455
|
* @param {QueryCurrentMarginOrderCountUsageRequest} requestParameters Request parameters.
|
|
2200
2456
|
* @returns {Promise<RestApiResponse<QueryCurrentMarginOrderCountUsageResponse>>}
|
|
2201
2457
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
2202
2458
|
* @memberof TradeApi
|
|
2203
|
-
* @see {@link https://developers.binance.com/docs/
|
|
2459
|
+
* @see {@link https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/trade#query-current-margin-order-count-usage Binance API Documentation}
|
|
2204
2460
|
*/
|
|
2205
2461
|
async queryCurrentMarginOrderCountUsage(requestParameters = {}) {
|
|
2206
2462
|
const localVarAxiosArgs = await this.localVarAxiosParamCreator.queryCurrentMarginOrderCountUsage(requestParameters?.isIsolated, requestParameters?.symbol, requestParameters?.recvWindow);
|
|
2207
2463
|
return sendRequest(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs.headerParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
|
|
2208
2464
|
}
|
|
2209
2465
|
/**
|
|
2466
|
+
* Query the current user's cross-margin liquidation loan information, including the original loan amount, repaid amount, and remaining amount. When a cross-margin account is liquidated and the account equity turns negative (bankruptcy), the system generates a liquidation loan record representing the deficit. This represents the shortfall amount denominated in USDC.
|
|
2467
|
+
*
|
|
2468
|
+
* Weight(UID): 100
|
|
2469
|
+
*
|
|
2470
|
+
* Security Type: USER_DATA
|
|
2471
|
+
*
|
|
2472
|
+
* @summary Query Liquidation Loan (USER_DATA)
|
|
2473
|
+
* @param {QueryLiquidationLoanRequest} requestParameters Request parameters.
|
|
2474
|
+
* @returns {Promise<RestApiResponse<QueryLiquidationLoanResponse>>}
|
|
2475
|
+
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
2476
|
+
* @memberof TradeApi
|
|
2477
|
+
* @see {@link https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/trade#query-liquidation-loan Binance API Documentation}
|
|
2478
|
+
*/
|
|
2479
|
+
async queryLiquidationLoan(requestParameters = {}) {
|
|
2480
|
+
const localVarAxiosArgs = await this.localVarAxiosParamCreator.queryLiquidationLoan(requestParameters?.recvWindow);
|
|
2481
|
+
return sendRequest(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs.headerParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
|
|
2482
|
+
}
|
|
2483
|
+
/**
|
|
2484
|
+
* Query the repayment history of cross-margin liquidation loans (deficit caused by bankruptcy during liquidation). Supports time-range filtering and pagination.
|
|
2485
|
+
*
|
|
2486
|
+
* Weight(UID): 100
|
|
2487
|
+
*
|
|
2488
|
+
* Security Type: USER_DATA
|
|
2489
|
+
*
|
|
2490
|
+
* Notes:
|
|
2491
|
+
* - The maximum query range is 90 days. If `startTime` is earlier than 90 days ago, it will be clamped to 90 days ago.
|
|
2492
|
+
* - Only records with status `SUCCESS` or `PENDING` are returned. Failed repayment records are excluded.
|
|
2493
|
+
*
|
|
2494
|
+
* @summary Query Liquidation Loan Repay History (USER_DATA)
|
|
2495
|
+
* @param {QueryLiquidationLoanRepayHistoryRequest} requestParameters Request parameters.
|
|
2496
|
+
* @returns {Promise<RestApiResponse<QueryLiquidationLoanRepayHistoryResponse>>}
|
|
2497
|
+
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
2498
|
+
* @memberof TradeApi
|
|
2499
|
+
* @see {@link https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/trade#query-liquidation-loan-repay-history Binance API Documentation}
|
|
2500
|
+
*/
|
|
2501
|
+
async queryLiquidationLoanRepayHistory(requestParameters = {}) {
|
|
2502
|
+
const localVarAxiosArgs = await this.localVarAxiosParamCreator.queryLiquidationLoanRepayHistory(requestParameters?.startTime, requestParameters?.endTime, requestParameters?.current, requestParameters?.size, requestParameters?.recvWindow);
|
|
2503
|
+
return sendRequest(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs.headerParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
|
|
2504
|
+
}
|
|
2505
|
+
/**
|
|
2210
2506
|
* Retrieves all OCO for a specific margin account based on provided optional parameters
|
|
2211
2507
|
*
|
|
2212
|
-
* Weight: 200
|
|
2508
|
+
* Weight(IP): 200
|
|
2509
|
+
*
|
|
2510
|
+
* Security Type: USER_DATA
|
|
2213
2511
|
*
|
|
2214
2512
|
* @summary Query Margin Account\'s all OCO (USER_DATA)
|
|
2215
2513
|
* @param {QueryMarginAccountsAllOcoRequest} requestParameters Request parameters.
|
|
2216
2514
|
* @returns {Promise<RestApiResponse<QueryMarginAccountsAllOcoResponse>>}
|
|
2217
2515
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
2218
2516
|
* @memberof TradeApi
|
|
2219
|
-
* @see {@link https://developers.binance.com/docs/
|
|
2517
|
+
* @see {@link https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/trade#query-margin-accounts-all-oco Binance API Documentation}
|
|
2220
2518
|
*/
|
|
2221
2519
|
async queryMarginAccountsAllOco(requestParameters = {}) {
|
|
2222
2520
|
const localVarAxiosArgs = await this.localVarAxiosParamCreator.queryMarginAccountsAllOco(requestParameters?.isIsolated, requestParameters?.symbol, requestParameters?.fromId, requestParameters?.startTime, requestParameters?.endTime, requestParameters?.limit, requestParameters?.recvWindow);
|
|
@@ -2225,18 +2523,25 @@ var TradeApi = class {
|
|
|
2225
2523
|
/**
|
|
2226
2524
|
* Query Margin Account's All Orders
|
|
2227
2525
|
*
|
|
2228
|
-
*
|
|
2229
|
-
*
|
|
2230
|
-
*
|
|
2526
|
+
* Weight(IP): 200
|
|
2527
|
+
*
|
|
2528
|
+
* Security Type: USER_DATA
|
|
2529
|
+
*
|
|
2530
|
+
* Notes:
|
|
2531
|
+
* - If orderId is set, it will get orders >= that orderId. Otherwise the
|
|
2532
|
+
* orders within 24 hours are returned.
|
|
2231
2533
|
*
|
|
2232
|
-
*
|
|
2534
|
+
* - For some historical orders cummulativeQuoteQty will be < 0, meaning
|
|
2535
|
+
* the data is not available at this time.
|
|
2536
|
+
*
|
|
2537
|
+
* - Less than 24 hours between startTime and endTime.
|
|
2233
2538
|
*
|
|
2234
2539
|
* @summary Query Margin Account\'s All Orders (USER_DATA)
|
|
2235
2540
|
* @param {QueryMarginAccountsAllOrdersRequest} requestParameters Request parameters.
|
|
2236
2541
|
* @returns {Promise<RestApiResponse<QueryMarginAccountsAllOrdersResponse>>}
|
|
2237
2542
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
2238
2543
|
* @memberof TradeApi
|
|
2239
|
-
* @see {@link https://developers.binance.com/docs/
|
|
2544
|
+
* @see {@link https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/trade#query-margin-accounts-all-orders Binance API Documentation}
|
|
2240
2545
|
*/
|
|
2241
2546
|
async queryMarginAccountsAllOrders(requestParameters) {
|
|
2242
2547
|
const localVarAxiosArgs = await this.localVarAxiosParamCreator.queryMarginAccountsAllOrders(requestParameters?.symbol, requestParameters?.isIsolated, requestParameters?.orderId, requestParameters?.startTime, requestParameters?.endTime, requestParameters?.limit, requestParameters?.recvWindow);
|
|
@@ -2245,14 +2550,16 @@ var TradeApi = class {
|
|
|
2245
2550
|
/**
|
|
2246
2551
|
* Retrieves a specific OCO based on provided optional parameters
|
|
2247
2552
|
*
|
|
2248
|
-
* Weight: 10
|
|
2553
|
+
* Weight(IP): 10
|
|
2554
|
+
*
|
|
2555
|
+
* Security Type: USER_DATA
|
|
2249
2556
|
*
|
|
2250
2557
|
* @summary Query Margin Account\'s OCO (USER_DATA)
|
|
2251
2558
|
* @param {QueryMarginAccountsOcoRequest} requestParameters Request parameters.
|
|
2252
2559
|
* @returns {Promise<RestApiResponse<QueryMarginAccountsOcoResponse>>}
|
|
2253
2560
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
2254
2561
|
* @memberof TradeApi
|
|
2255
|
-
* @see {@link https://developers.binance.com/docs/
|
|
2562
|
+
* @see {@link https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/trade#query-margin-accounts-oco Binance API Documentation}
|
|
2256
2563
|
*/
|
|
2257
2564
|
async queryMarginAccountsOco(requestParameters = {}) {
|
|
2258
2565
|
const localVarAxiosArgs = await this.localVarAxiosParamCreator.queryMarginAccountsOco(requestParameters?.isIsolated, requestParameters?.symbol, requestParameters?.orderListId, requestParameters?.origClientOrderId, requestParameters?.recvWindow);
|
|
@@ -2261,14 +2568,16 @@ var TradeApi = class {
|
|
|
2261
2568
|
/**
|
|
2262
2569
|
* Query Margin Account's Open OCO
|
|
2263
2570
|
*
|
|
2264
|
-
* Weight: 10
|
|
2571
|
+
* Weight(IP): 10
|
|
2572
|
+
*
|
|
2573
|
+
* Security Type: USER_DATA
|
|
2265
2574
|
*
|
|
2266
2575
|
* @summary Query Margin Account\'s Open OCO (USER_DATA)
|
|
2267
2576
|
* @param {QueryMarginAccountsOpenOcoRequest} requestParameters Request parameters.
|
|
2268
2577
|
* @returns {Promise<RestApiResponse<QueryMarginAccountsOpenOcoResponse>>}
|
|
2269
2578
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
2270
2579
|
* @memberof TradeApi
|
|
2271
|
-
* @see {@link https://developers.binance.com/docs/
|
|
2580
|
+
* @see {@link https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/trade#query-margin-accounts-open-oco Binance API Documentation}
|
|
2272
2581
|
*/
|
|
2273
2582
|
async queryMarginAccountsOpenOco(requestParameters = {}) {
|
|
2274
2583
|
const localVarAxiosArgs = await this.localVarAxiosParamCreator.queryMarginAccountsOpenOco(requestParameters?.isIsolated, requestParameters?.symbol, requestParameters?.recvWindow);
|
|
@@ -2277,18 +2586,26 @@ var TradeApi = class {
|
|
|
2277
2586
|
/**
|
|
2278
2587
|
* Query Margin Account's Open Orders
|
|
2279
2588
|
*
|
|
2280
|
-
*
|
|
2281
|
-
*
|
|
2282
|
-
*
|
|
2589
|
+
* Weight(IP): 10
|
|
2590
|
+
*
|
|
2591
|
+
* Security Type: USER_DATA
|
|
2283
2592
|
*
|
|
2284
|
-
*
|
|
2593
|
+
* Notes:
|
|
2594
|
+
* - If the symbol is not sent, orders for all symbols will be returned in
|
|
2595
|
+
* an array.
|
|
2596
|
+
*
|
|
2597
|
+
* - When all symbols are returned, the number of requests counted against
|
|
2598
|
+
* the rate limiter is equal to the number of symbols currently trading on
|
|
2599
|
+
* the exchange.
|
|
2600
|
+
*
|
|
2601
|
+
* - If isIsolated ="TRUE", symbol must be sent.
|
|
2285
2602
|
*
|
|
2286
2603
|
* @summary Query Margin Account\'s Open Orders (USER_DATA)
|
|
2287
2604
|
* @param {QueryMarginAccountsOpenOrdersRequest} requestParameters Request parameters.
|
|
2288
2605
|
* @returns {Promise<RestApiResponse<QueryMarginAccountsOpenOrdersResponse>>}
|
|
2289
2606
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
2290
2607
|
* @memberof TradeApi
|
|
2291
|
-
* @see {@link https://developers.binance.com/docs/
|
|
2608
|
+
* @see {@link https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/trade#query-margin-accounts-open-orders Binance API Documentation}
|
|
2292
2609
|
*/
|
|
2293
2610
|
async queryMarginAccountsOpenOrders(requestParameters = {}) {
|
|
2294
2611
|
const localVarAxiosArgs = await this.localVarAxiosParamCreator.queryMarginAccountsOpenOrders(requestParameters?.symbol, requestParameters?.isIsolated, requestParameters?.recvWindow);
|
|
@@ -2297,17 +2614,22 @@ var TradeApi = class {
|
|
|
2297
2614
|
/**
|
|
2298
2615
|
* Query Margin Account's Order
|
|
2299
2616
|
*
|
|
2300
|
-
*
|
|
2301
|
-
*
|
|
2617
|
+
* Weight(IP): 10
|
|
2618
|
+
*
|
|
2619
|
+
* Security Type: USER_DATA
|
|
2620
|
+
*
|
|
2621
|
+
* Notes:
|
|
2622
|
+
* - Either orderId or origClientOrderId must be sent.
|
|
2302
2623
|
*
|
|
2303
|
-
*
|
|
2624
|
+
* - For some historical orders cummulativeQuoteQty will be < 0, meaning
|
|
2625
|
+
* the data is not available at this time.
|
|
2304
2626
|
*
|
|
2305
2627
|
* @summary Query Margin Account\'s Order (USER_DATA)
|
|
2306
2628
|
* @param {QueryMarginAccountsOrderRequest} requestParameters Request parameters.
|
|
2307
2629
|
* @returns {Promise<RestApiResponse<QueryMarginAccountsOrderResponse>>}
|
|
2308
2630
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
2309
2631
|
* @memberof TradeApi
|
|
2310
|
-
* @see {@link https://developers.binance.com/docs/
|
|
2632
|
+
* @see {@link https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/trade#query-margin-accounts-order Binance API Documentation}
|
|
2311
2633
|
*/
|
|
2312
2634
|
async queryMarginAccountsOrder(requestParameters) {
|
|
2313
2635
|
const localVarAxiosArgs = await this.localVarAxiosParamCreator.queryMarginAccountsOrder(requestParameters?.symbol, requestParameters?.isIsolated, requestParameters?.orderId, requestParameters?.origClientOrderId, requestParameters?.recvWindow);
|
|
@@ -2316,35 +2638,62 @@ var TradeApi = class {
|
|
|
2316
2638
|
/**
|
|
2317
2639
|
* Query Margin Account's Trade List
|
|
2318
2640
|
*
|
|
2319
|
-
*
|
|
2320
|
-
* Less than 24 hours between startTime and endTime.
|
|
2641
|
+
* Weight(IP): 10
|
|
2321
2642
|
*
|
|
2322
|
-
*
|
|
2643
|
+
* Security Type: USER_DATA
|
|
2644
|
+
*
|
|
2645
|
+
* Notes:
|
|
2646
|
+
* - If fromId is set, it will get trades >= that fromId. Otherwise the
|
|
2647
|
+
* trades within 24 hours are returned.
|
|
2648
|
+
*
|
|
2649
|
+
* - Less than 24 hours between startTime and endTime.
|
|
2323
2650
|
*
|
|
2324
2651
|
* @summary Query Margin Account\'s Trade List (USER_DATA)
|
|
2325
2652
|
* @param {QueryMarginAccountsTradeListRequest} requestParameters Request parameters.
|
|
2326
2653
|
* @returns {Promise<RestApiResponse<QueryMarginAccountsTradeListResponse>>}
|
|
2327
2654
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
2328
2655
|
* @memberof TradeApi
|
|
2329
|
-
* @see {@link https://developers.binance.com/docs/
|
|
2656
|
+
* @see {@link https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/trade#query-margin-accounts-trade-list Binance API Documentation}
|
|
2330
2657
|
*/
|
|
2331
2658
|
async queryMarginAccountsTradeList(requestParameters) {
|
|
2332
2659
|
const localVarAxiosArgs = await this.localVarAxiosParamCreator.queryMarginAccountsTradeList(requestParameters?.symbol, requestParameters?.isIsolated, requestParameters?.orderId, requestParameters?.startTime, requestParameters?.endTime, requestParameters?.fromId, requestParameters?.limit, requestParameters?.recvWindow);
|
|
2333
2660
|
return sendRequest(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs.headerParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
|
|
2334
2661
|
}
|
|
2335
2662
|
/**
|
|
2663
|
+
* Displays the list of orders that were expired due to STP. (Self-Trade Prevention).
|
|
2664
|
+
*
|
|
2665
|
+
* Weight(IP): 10
|
|
2666
|
+
*
|
|
2667
|
+
* Security Type: USER_DATA
|
|
2668
|
+
*
|
|
2669
|
+
* Notes:
|
|
2670
|
+
* - Supported parameter combinations:
|
|
2671
|
+
*
|
|
2672
|
+
* - `symbol` + `preventedMatchId`
|
|
2673
|
+
*
|
|
2674
|
+
* - `symbol` + `orderId`
|
|
2336
2675
|
*
|
|
2337
|
-
*
|
|
2676
|
+
* - `symbol` + `orderId` + `fromPreventedMatchId`
|
|
2338
2677
|
*
|
|
2339
|
-
*
|
|
2678
|
+
* - If `orderId` is provided, all prevented matches for that order will be
|
|
2679
|
+
* returned.
|
|
2680
|
+
*
|
|
2681
|
+
* - If `preventedMatchId` is provided, the specific prevented match will
|
|
2682
|
+
* be returned.
|
|
2683
|
+
*
|
|
2684
|
+
* - A single request returns a maximum of 500 records. If there are more
|
|
2685
|
+
* than 500 records, use `symbol` + `orderId` + `fromPreventedMatchId`
|
|
2686
|
+
* combination for pagination.
|
|
2687
|
+
*
|
|
2688
|
+
* @summary Query Prevented Matches (USER_DATA)
|
|
2340
2689
|
* @param {QueryPreventedMatchesRequest} requestParameters Request parameters.
|
|
2341
2690
|
* @returns {Promise<RestApiResponse<QueryPreventedMatchesResponse>>}
|
|
2342
2691
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
2343
2692
|
* @memberof TradeApi
|
|
2344
|
-
* @see {@link https://developers.binance.com/docs/
|
|
2693
|
+
* @see {@link https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/trade#query-prevented-matches Binance API Documentation}
|
|
2345
2694
|
*/
|
|
2346
2695
|
async queryPreventedMatches(requestParameters) {
|
|
2347
|
-
const localVarAxiosArgs = await this.localVarAxiosParamCreator.queryPreventedMatches(requestParameters?.symbol, requestParameters?.preventedMatchId, requestParameters?.orderId, requestParameters?.fromPreventedMatchId, requestParameters?.
|
|
2696
|
+
const localVarAxiosArgs = await this.localVarAxiosParamCreator.queryPreventedMatches(requestParameters?.symbol, requestParameters?.preventedMatchId, requestParameters?.orderId, requestParameters?.fromPreventedMatchId, requestParameters?.isIsolated, requestParameters?.recvWindow);
|
|
2348
2697
|
return sendRequest(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs.headerParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
|
|
2349
2698
|
}
|
|
2350
2699
|
/**
|
|
@@ -2352,14 +2701,16 @@ var TradeApi = class {
|
|
|
2352
2701
|
*
|
|
2353
2702
|
* This only applies to Special Key for Low Latency Trading.
|
|
2354
2703
|
*
|
|
2355
|
-
* Weight: 1
|
|
2704
|
+
* Weight(UID): 1
|
|
2705
|
+
*
|
|
2706
|
+
* Security Type: TRADE
|
|
2356
2707
|
*
|
|
2357
|
-
* @summary Query Special key(Low Latency Trading)(TRADE)
|
|
2708
|
+
* @summary Query Special key(Low Latency Trading) (TRADE)
|
|
2358
2709
|
* @param {QuerySpecialKeyRequest} requestParameters Request parameters.
|
|
2359
2710
|
* @returns {Promise<RestApiResponse<QuerySpecialKeyResponse>>}
|
|
2360
2711
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
2361
2712
|
* @memberof TradeApi
|
|
2362
|
-
* @see {@link https://developers.binance.com/docs/
|
|
2713
|
+
* @see {@link https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/trade#query-special-key Binance API Documentation}
|
|
2363
2714
|
*/
|
|
2364
2715
|
async querySpecialKey(requestParameters = {}) {
|
|
2365
2716
|
const localVarAxiosArgs = await this.localVarAxiosParamCreator.querySpecialKey(requestParameters?.symbol, requestParameters?.recvWindow);
|
|
@@ -2368,14 +2719,16 @@ var TradeApi = class {
|
|
|
2368
2719
|
/**
|
|
2369
2720
|
* This only applies to Special Key for Low Latency Trading.
|
|
2370
2721
|
*
|
|
2371
|
-
* Weight: 1
|
|
2722
|
+
* Weight(UID): 1
|
|
2372
2723
|
*
|
|
2373
|
-
*
|
|
2724
|
+
* Security Type: TRADE
|
|
2725
|
+
*
|
|
2726
|
+
* @summary Query Special key List(Low Latency Trading) (TRADE)
|
|
2374
2727
|
* @param {QuerySpecialKeyListRequest} requestParameters Request parameters.
|
|
2375
2728
|
* @returns {Promise<RestApiResponse<QuerySpecialKeyListResponse>>}
|
|
2376
2729
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
2377
2730
|
* @memberof TradeApi
|
|
2378
|
-
* @see {@link https://developers.binance.com/docs/
|
|
2731
|
+
* @see {@link https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/trade#query-special-key-list Binance API Documentation}
|
|
2379
2732
|
*/
|
|
2380
2733
|
async querySpecialKeyList(requestParameters = {}) {
|
|
2381
2734
|
const localVarAxiosArgs = await this.localVarAxiosParamCreator.querySpecialKeyList(requestParameters?.symbol, requestParameters?.recvWindow);
|
|
@@ -2384,71 +2737,314 @@ var TradeApi = class {
|
|
|
2384
2737
|
/**
|
|
2385
2738
|
* Small Liability Exchange
|
|
2386
2739
|
*
|
|
2387
|
-
*
|
|
2388
|
-
*
|
|
2389
|
-
*
|
|
2740
|
+
* Weight(UID): 3000
|
|
2741
|
+
*
|
|
2742
|
+
* Security Type: MARGIN
|
|
2390
2743
|
*
|
|
2391
|
-
*
|
|
2744
|
+
* Notes:
|
|
2745
|
+
* - Only convert once within 6 hours
|
|
2746
|
+
* - Only liability valuation less than 10 USDT are supported
|
|
2747
|
+
* - The maximum number of coin is 10
|
|
2392
2748
|
*
|
|
2393
2749
|
* @summary Small Liability Exchange (MARGIN)
|
|
2394
2750
|
* @param {SmallLiabilityExchangeRequest} requestParameters Request parameters.
|
|
2395
2751
|
* @returns {Promise<RestApiResponse<void>>}
|
|
2396
2752
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
2397
2753
|
* @memberof TradeApi
|
|
2398
|
-
* @see {@link https://developers.binance.com/docs/
|
|
2754
|
+
* @see {@link https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/trade#small-liability-exchange Binance API Documentation}
|
|
2399
2755
|
*/
|
|
2400
2756
|
async smallLiabilityExchange(requestParameters) {
|
|
2401
2757
|
const localVarAxiosArgs = await this.localVarAxiosParamCreator.smallLiabilityExchange(requestParameters?.assetNames, requestParameters?.recvWindow);
|
|
2402
2758
|
return sendRequest(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs.headerParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
|
|
2403
2759
|
}
|
|
2404
2760
|
};
|
|
2761
|
+
let CreateSpecialKeyPermissionModeEnum = /* @__PURE__ */ function(CreateSpecialKeyPermissionModeEnum$1) {
|
|
2762
|
+
CreateSpecialKeyPermissionModeEnum$1["TRADE"] = "TRADE";
|
|
2763
|
+
CreateSpecialKeyPermissionModeEnum$1["READ"] = "READ";
|
|
2764
|
+
return CreateSpecialKeyPermissionModeEnum$1;
|
|
2765
|
+
}({});
|
|
2766
|
+
let MarginAccountCancelAllOpenOrdersOnASymbolIsIsolatedEnum = /* @__PURE__ */ function(MarginAccountCancelAllOpenOrdersOnASymbolIsIsolatedEnum$1) {
|
|
2767
|
+
MarginAccountCancelAllOpenOrdersOnASymbolIsIsolatedEnum$1["TRUE"] = "TRUE";
|
|
2768
|
+
MarginAccountCancelAllOpenOrdersOnASymbolIsIsolatedEnum$1["FALSE"] = "FALSE";
|
|
2769
|
+
return MarginAccountCancelAllOpenOrdersOnASymbolIsIsolatedEnum$1;
|
|
2770
|
+
}({});
|
|
2771
|
+
let MarginAccountCancelOcoIsIsolatedEnum = /* @__PURE__ */ function(MarginAccountCancelOcoIsIsolatedEnum$1) {
|
|
2772
|
+
MarginAccountCancelOcoIsIsolatedEnum$1["TRUE"] = "TRUE";
|
|
2773
|
+
MarginAccountCancelOcoIsIsolatedEnum$1["FALSE"] = "FALSE";
|
|
2774
|
+
return MarginAccountCancelOcoIsIsolatedEnum$1;
|
|
2775
|
+
}({});
|
|
2776
|
+
let MarginAccountCancelOrderIsIsolatedEnum = /* @__PURE__ */ function(MarginAccountCancelOrderIsIsolatedEnum$1) {
|
|
2777
|
+
MarginAccountCancelOrderIsIsolatedEnum$1["TRUE"] = "TRUE";
|
|
2778
|
+
MarginAccountCancelOrderIsIsolatedEnum$1["FALSE"] = "FALSE";
|
|
2779
|
+
return MarginAccountCancelOrderIsIsolatedEnum$1;
|
|
2780
|
+
}({});
|
|
2405
2781
|
let MarginAccountNewOcoSideEnum = /* @__PURE__ */ function(MarginAccountNewOcoSideEnum$1) {
|
|
2406
2782
|
MarginAccountNewOcoSideEnum$1["BUY"] = "BUY";
|
|
2407
2783
|
MarginAccountNewOcoSideEnum$1["SELL"] = "SELL";
|
|
2408
2784
|
return MarginAccountNewOcoSideEnum$1;
|
|
2409
2785
|
}({});
|
|
2786
|
+
let MarginAccountNewOcoIsIsolatedEnum = /* @__PURE__ */ function(MarginAccountNewOcoIsIsolatedEnum$1) {
|
|
2787
|
+
MarginAccountNewOcoIsIsolatedEnum$1["TRUE"] = "TRUE";
|
|
2788
|
+
MarginAccountNewOcoIsIsolatedEnum$1["FALSE"] = "FALSE";
|
|
2789
|
+
return MarginAccountNewOcoIsIsolatedEnum$1;
|
|
2790
|
+
}({});
|
|
2791
|
+
let MarginAccountNewOcoStopLimitTimeInForceEnum = /* @__PURE__ */ function(MarginAccountNewOcoStopLimitTimeInForceEnum$1) {
|
|
2792
|
+
MarginAccountNewOcoStopLimitTimeInForceEnum$1["GTC"] = "GTC";
|
|
2793
|
+
MarginAccountNewOcoStopLimitTimeInForceEnum$1["FOK"] = "FOK";
|
|
2794
|
+
MarginAccountNewOcoStopLimitTimeInForceEnum$1["IOC"] = "IOC";
|
|
2795
|
+
return MarginAccountNewOcoStopLimitTimeInForceEnum$1;
|
|
2796
|
+
}({});
|
|
2410
2797
|
let MarginAccountNewOcoNewOrderRespTypeEnum = /* @__PURE__ */ function(MarginAccountNewOcoNewOrderRespTypeEnum$1) {
|
|
2411
2798
|
MarginAccountNewOcoNewOrderRespTypeEnum$1["ACK"] = "ACK";
|
|
2412
2799
|
MarginAccountNewOcoNewOrderRespTypeEnum$1["RESULT"] = "RESULT";
|
|
2413
2800
|
MarginAccountNewOcoNewOrderRespTypeEnum$1["FULL"] = "FULL";
|
|
2414
2801
|
return MarginAccountNewOcoNewOrderRespTypeEnum$1;
|
|
2415
2802
|
}({});
|
|
2803
|
+
let MarginAccountNewOcoSideEffectTypeEnum = /* @__PURE__ */ function(MarginAccountNewOcoSideEffectTypeEnum$1) {
|
|
2804
|
+
MarginAccountNewOcoSideEffectTypeEnum$1["NO_SIDE_EFFECT"] = "NO_SIDE_EFFECT";
|
|
2805
|
+
MarginAccountNewOcoSideEffectTypeEnum$1["MARGIN_BUY"] = "MARGIN_BUY";
|
|
2806
|
+
MarginAccountNewOcoSideEffectTypeEnum$1["AUTO_REPAY"] = "AUTO_REPAY";
|
|
2807
|
+
MarginAccountNewOcoSideEffectTypeEnum$1["AUTO_BORROW_REPAY"] = "AUTO_BORROW_REPAY";
|
|
2808
|
+
return MarginAccountNewOcoSideEffectTypeEnum$1;
|
|
2809
|
+
}({});
|
|
2810
|
+
let MarginAccountNewOcoSelfTradePreventionModeEnum = /* @__PURE__ */ function(MarginAccountNewOcoSelfTradePreventionModeEnum$1) {
|
|
2811
|
+
MarginAccountNewOcoSelfTradePreventionModeEnum$1["EXPIRE_TAKER"] = "EXPIRE_TAKER";
|
|
2812
|
+
MarginAccountNewOcoSelfTradePreventionModeEnum$1["EXPIRE_MAKER"] = "EXPIRE_MAKER";
|
|
2813
|
+
MarginAccountNewOcoSelfTradePreventionModeEnum$1["EXPIRE_BOTH"] = "EXPIRE_BOTH";
|
|
2814
|
+
MarginAccountNewOcoSelfTradePreventionModeEnum$1["NONE"] = "NONE";
|
|
2815
|
+
return MarginAccountNewOcoSelfTradePreventionModeEnum$1;
|
|
2816
|
+
}({});
|
|
2416
2817
|
let MarginAccountNewOrderSideEnum = /* @__PURE__ */ function(MarginAccountNewOrderSideEnum$1) {
|
|
2417
2818
|
MarginAccountNewOrderSideEnum$1["BUY"] = "BUY";
|
|
2418
2819
|
MarginAccountNewOrderSideEnum$1["SELL"] = "SELL";
|
|
2419
2820
|
return MarginAccountNewOrderSideEnum$1;
|
|
2420
2821
|
}({});
|
|
2822
|
+
let MarginAccountNewOrderTypeEnum = /* @__PURE__ */ function(MarginAccountNewOrderTypeEnum$1) {
|
|
2823
|
+
MarginAccountNewOrderTypeEnum$1["LIMIT"] = "LIMIT";
|
|
2824
|
+
MarginAccountNewOrderTypeEnum$1["MARKET"] = "MARKET";
|
|
2825
|
+
MarginAccountNewOrderTypeEnum$1["STOP_LOSS"] = "STOP_LOSS";
|
|
2826
|
+
MarginAccountNewOrderTypeEnum$1["STOP_LOSS_LIMIT"] = "STOP_LOSS_LIMIT";
|
|
2827
|
+
MarginAccountNewOrderTypeEnum$1["TAKE_PROFIT"] = "TAKE_PROFIT";
|
|
2828
|
+
MarginAccountNewOrderTypeEnum$1["TAKE_PROFIT_LIMIT"] = "TAKE_PROFIT_LIMIT";
|
|
2829
|
+
MarginAccountNewOrderTypeEnum$1["LIMIT_MAKER"] = "LIMIT_MAKER";
|
|
2830
|
+
return MarginAccountNewOrderTypeEnum$1;
|
|
2831
|
+
}({});
|
|
2832
|
+
let MarginAccountNewOrderIsIsolatedEnum = /* @__PURE__ */ function(MarginAccountNewOrderIsIsolatedEnum$1) {
|
|
2833
|
+
MarginAccountNewOrderIsIsolatedEnum$1["TRUE"] = "TRUE";
|
|
2834
|
+
MarginAccountNewOrderIsIsolatedEnum$1["FALSE"] = "FALSE";
|
|
2835
|
+
return MarginAccountNewOrderIsIsolatedEnum$1;
|
|
2836
|
+
}({});
|
|
2421
2837
|
let MarginAccountNewOrderNewOrderRespTypeEnum = /* @__PURE__ */ function(MarginAccountNewOrderNewOrderRespTypeEnum$1) {
|
|
2422
2838
|
MarginAccountNewOrderNewOrderRespTypeEnum$1["ACK"] = "ACK";
|
|
2423
2839
|
MarginAccountNewOrderNewOrderRespTypeEnum$1["RESULT"] = "RESULT";
|
|
2424
2840
|
MarginAccountNewOrderNewOrderRespTypeEnum$1["FULL"] = "FULL";
|
|
2425
2841
|
return MarginAccountNewOrderNewOrderRespTypeEnum$1;
|
|
2426
2842
|
}({});
|
|
2843
|
+
let MarginAccountNewOrderSideEffectTypeEnum = /* @__PURE__ */ function(MarginAccountNewOrderSideEffectTypeEnum$1) {
|
|
2844
|
+
MarginAccountNewOrderSideEffectTypeEnum$1["NO_SIDE_EFFECT"] = "NO_SIDE_EFFECT";
|
|
2845
|
+
MarginAccountNewOrderSideEffectTypeEnum$1["MARGIN_BUY"] = "MARGIN_BUY";
|
|
2846
|
+
MarginAccountNewOrderSideEffectTypeEnum$1["AUTO_REPAY"] = "AUTO_REPAY";
|
|
2847
|
+
MarginAccountNewOrderSideEffectTypeEnum$1["AUTO_BORROW_REPAY"] = "AUTO_BORROW_REPAY";
|
|
2848
|
+
return MarginAccountNewOrderSideEffectTypeEnum$1;
|
|
2849
|
+
}({});
|
|
2427
2850
|
let MarginAccountNewOrderTimeInForceEnum = /* @__PURE__ */ function(MarginAccountNewOrderTimeInForceEnum$1) {
|
|
2428
2851
|
MarginAccountNewOrderTimeInForceEnum$1["GTC"] = "GTC";
|
|
2429
2852
|
MarginAccountNewOrderTimeInForceEnum$1["IOC"] = "IOC";
|
|
2430
2853
|
MarginAccountNewOrderTimeInForceEnum$1["FOK"] = "FOK";
|
|
2431
2854
|
return MarginAccountNewOrderTimeInForceEnum$1;
|
|
2432
2855
|
}({});
|
|
2856
|
+
let MarginAccountNewOrderSelfTradePreventionModeEnum = /* @__PURE__ */ function(MarginAccountNewOrderSelfTradePreventionModeEnum$1) {
|
|
2857
|
+
MarginAccountNewOrderSelfTradePreventionModeEnum$1["EXPIRE_TAKER"] = "EXPIRE_TAKER";
|
|
2858
|
+
MarginAccountNewOrderSelfTradePreventionModeEnum$1["EXPIRE_MAKER"] = "EXPIRE_MAKER";
|
|
2859
|
+
MarginAccountNewOrderSelfTradePreventionModeEnum$1["EXPIRE_BOTH"] = "EXPIRE_BOTH";
|
|
2860
|
+
MarginAccountNewOrderSelfTradePreventionModeEnum$1["NONE"] = "NONE";
|
|
2861
|
+
return MarginAccountNewOrderSelfTradePreventionModeEnum$1;
|
|
2862
|
+
}({});
|
|
2863
|
+
let MarginAccountNewOtoWorkingTypeEnum = /* @__PURE__ */ function(MarginAccountNewOtoWorkingTypeEnum$1) {
|
|
2864
|
+
MarginAccountNewOtoWorkingTypeEnum$1["LIMIT"] = "LIMIT";
|
|
2865
|
+
MarginAccountNewOtoWorkingTypeEnum$1["LIMIT_MAKER"] = "LIMIT_MAKER";
|
|
2866
|
+
return MarginAccountNewOtoWorkingTypeEnum$1;
|
|
2867
|
+
}({});
|
|
2868
|
+
let MarginAccountNewOtoWorkingSideEnum = /* @__PURE__ */ function(MarginAccountNewOtoWorkingSideEnum$1) {
|
|
2869
|
+
MarginAccountNewOtoWorkingSideEnum$1["BUY"] = "BUY";
|
|
2870
|
+
MarginAccountNewOtoWorkingSideEnum$1["SELL"] = "SELL";
|
|
2871
|
+
return MarginAccountNewOtoWorkingSideEnum$1;
|
|
2872
|
+
}({});
|
|
2873
|
+
let MarginAccountNewOtoPendingTypeEnum = /* @__PURE__ */ function(MarginAccountNewOtoPendingTypeEnum$1) {
|
|
2874
|
+
MarginAccountNewOtoPendingTypeEnum$1["LIMIT"] = "LIMIT";
|
|
2875
|
+
MarginAccountNewOtoPendingTypeEnum$1["MARKET"] = "MARKET";
|
|
2876
|
+
MarginAccountNewOtoPendingTypeEnum$1["STOP_LOSS"] = "STOP_LOSS";
|
|
2877
|
+
MarginAccountNewOtoPendingTypeEnum$1["STOP_LOSS_LIMIT"] = "STOP_LOSS_LIMIT";
|
|
2878
|
+
MarginAccountNewOtoPendingTypeEnum$1["TAKE_PROFIT"] = "TAKE_PROFIT";
|
|
2879
|
+
MarginAccountNewOtoPendingTypeEnum$1["TAKE_PROFIT_LIMIT"] = "TAKE_PROFIT_LIMIT";
|
|
2880
|
+
MarginAccountNewOtoPendingTypeEnum$1["LIMIT_MAKER"] = "LIMIT_MAKER";
|
|
2881
|
+
return MarginAccountNewOtoPendingTypeEnum$1;
|
|
2882
|
+
}({});
|
|
2883
|
+
let MarginAccountNewOtoPendingSideEnum = /* @__PURE__ */ function(MarginAccountNewOtoPendingSideEnum$1) {
|
|
2884
|
+
MarginAccountNewOtoPendingSideEnum$1["BUY"] = "BUY";
|
|
2885
|
+
MarginAccountNewOtoPendingSideEnum$1["SELL"] = "SELL";
|
|
2886
|
+
return MarginAccountNewOtoPendingSideEnum$1;
|
|
2887
|
+
}({});
|
|
2888
|
+
let MarginAccountNewOtoIsIsolatedEnum = /* @__PURE__ */ function(MarginAccountNewOtoIsIsolatedEnum$1) {
|
|
2889
|
+
MarginAccountNewOtoIsIsolatedEnum$1["TRUE"] = "TRUE";
|
|
2890
|
+
MarginAccountNewOtoIsIsolatedEnum$1["FALSE"] = "FALSE";
|
|
2891
|
+
return MarginAccountNewOtoIsIsolatedEnum$1;
|
|
2892
|
+
}({});
|
|
2433
2893
|
let MarginAccountNewOtoNewOrderRespTypeEnum = /* @__PURE__ */ function(MarginAccountNewOtoNewOrderRespTypeEnum$1) {
|
|
2434
2894
|
MarginAccountNewOtoNewOrderRespTypeEnum$1["ACK"] = "ACK";
|
|
2435
2895
|
MarginAccountNewOtoNewOrderRespTypeEnum$1["RESULT"] = "RESULT";
|
|
2436
2896
|
MarginAccountNewOtoNewOrderRespTypeEnum$1["FULL"] = "FULL";
|
|
2437
2897
|
return MarginAccountNewOtoNewOrderRespTypeEnum$1;
|
|
2438
2898
|
}({});
|
|
2899
|
+
let MarginAccountNewOtoSideEffectTypeEnum = /* @__PURE__ */ function(MarginAccountNewOtoSideEffectTypeEnum$1) {
|
|
2900
|
+
MarginAccountNewOtoSideEffectTypeEnum$1["NO_SIDE_EFFECT"] = "NO_SIDE_EFFECT";
|
|
2901
|
+
MarginAccountNewOtoSideEffectTypeEnum$1["MARGIN_BUY"] = "MARGIN_BUY";
|
|
2902
|
+
return MarginAccountNewOtoSideEffectTypeEnum$1;
|
|
2903
|
+
}({});
|
|
2904
|
+
let MarginAccountNewOtoSelfTradePreventionModeEnum = /* @__PURE__ */ function(MarginAccountNewOtoSelfTradePreventionModeEnum$1) {
|
|
2905
|
+
MarginAccountNewOtoSelfTradePreventionModeEnum$1["EXPIRE_TAKER"] = "EXPIRE_TAKER";
|
|
2906
|
+
MarginAccountNewOtoSelfTradePreventionModeEnum$1["EXPIRE_MAKER"] = "EXPIRE_MAKER";
|
|
2907
|
+
MarginAccountNewOtoSelfTradePreventionModeEnum$1["EXPIRE_BOTH"] = "EXPIRE_BOTH";
|
|
2908
|
+
MarginAccountNewOtoSelfTradePreventionModeEnum$1["NONE"] = "NONE";
|
|
2909
|
+
return MarginAccountNewOtoSelfTradePreventionModeEnum$1;
|
|
2910
|
+
}({});
|
|
2911
|
+
let MarginAccountNewOtoWorkingTimeInForceEnum = /* @__PURE__ */ function(MarginAccountNewOtoWorkingTimeInForceEnum$1) {
|
|
2912
|
+
MarginAccountNewOtoWorkingTimeInForceEnum$1["GTC"] = "GTC";
|
|
2913
|
+
MarginAccountNewOtoWorkingTimeInForceEnum$1["IOC"] = "IOC";
|
|
2914
|
+
MarginAccountNewOtoWorkingTimeInForceEnum$1["FOK"] = "FOK";
|
|
2915
|
+
return MarginAccountNewOtoWorkingTimeInForceEnum$1;
|
|
2916
|
+
}({});
|
|
2917
|
+
let MarginAccountNewOtoPendingTimeInForceEnum = /* @__PURE__ */ function(MarginAccountNewOtoPendingTimeInForceEnum$1) {
|
|
2918
|
+
MarginAccountNewOtoPendingTimeInForceEnum$1["GTC"] = "GTC";
|
|
2919
|
+
MarginAccountNewOtoPendingTimeInForceEnum$1["IOC"] = "IOC";
|
|
2920
|
+
MarginAccountNewOtoPendingTimeInForceEnum$1["FOK"] = "FOK";
|
|
2921
|
+
return MarginAccountNewOtoPendingTimeInForceEnum$1;
|
|
2922
|
+
}({});
|
|
2923
|
+
let MarginAccountNewOtocoWorkingTypeEnum = /* @__PURE__ */ function(MarginAccountNewOtocoWorkingTypeEnum$1) {
|
|
2924
|
+
MarginAccountNewOtocoWorkingTypeEnum$1["LIMIT"] = "LIMIT";
|
|
2925
|
+
MarginAccountNewOtocoWorkingTypeEnum$1["LIMIT_MAKER"] = "LIMIT_MAKER";
|
|
2926
|
+
return MarginAccountNewOtocoWorkingTypeEnum$1;
|
|
2927
|
+
}({});
|
|
2928
|
+
let MarginAccountNewOtocoWorkingSideEnum = /* @__PURE__ */ function(MarginAccountNewOtocoWorkingSideEnum$1) {
|
|
2929
|
+
MarginAccountNewOtocoWorkingSideEnum$1["BUY"] = "BUY";
|
|
2930
|
+
MarginAccountNewOtocoWorkingSideEnum$1["SELL"] = "SELL";
|
|
2931
|
+
return MarginAccountNewOtocoWorkingSideEnum$1;
|
|
2932
|
+
}({});
|
|
2933
|
+
let MarginAccountNewOtocoPendingSideEnum = /* @__PURE__ */ function(MarginAccountNewOtocoPendingSideEnum$1) {
|
|
2934
|
+
MarginAccountNewOtocoPendingSideEnum$1["BUY"] = "BUY";
|
|
2935
|
+
MarginAccountNewOtocoPendingSideEnum$1["SELL"] = "SELL";
|
|
2936
|
+
return MarginAccountNewOtocoPendingSideEnum$1;
|
|
2937
|
+
}({});
|
|
2938
|
+
let MarginAccountNewOtocoPendingAboveTypeEnum = /* @__PURE__ */ function(MarginAccountNewOtocoPendingAboveTypeEnum$1) {
|
|
2939
|
+
MarginAccountNewOtocoPendingAboveTypeEnum$1["LIMIT_MAKER"] = "LIMIT_MAKER";
|
|
2940
|
+
MarginAccountNewOtocoPendingAboveTypeEnum$1["STOP_LOSS"] = "STOP_LOSS";
|
|
2941
|
+
MarginAccountNewOtocoPendingAboveTypeEnum$1["STOP_LOSS_LIMIT"] = "STOP_LOSS_LIMIT";
|
|
2942
|
+
return MarginAccountNewOtocoPendingAboveTypeEnum$1;
|
|
2943
|
+
}({});
|
|
2944
|
+
let MarginAccountNewOtocoIsIsolatedEnum = /* @__PURE__ */ function(MarginAccountNewOtocoIsIsolatedEnum$1) {
|
|
2945
|
+
MarginAccountNewOtocoIsIsolatedEnum$1["TRUE"] = "TRUE";
|
|
2946
|
+
MarginAccountNewOtocoIsIsolatedEnum$1["FALSE"] = "FALSE";
|
|
2947
|
+
return MarginAccountNewOtocoIsIsolatedEnum$1;
|
|
2948
|
+
}({});
|
|
2949
|
+
let MarginAccountNewOtocoSideEffectTypeEnum = /* @__PURE__ */ function(MarginAccountNewOtocoSideEffectTypeEnum$1) {
|
|
2950
|
+
MarginAccountNewOtocoSideEffectTypeEnum$1["NO_SIDE_EFFECT"] = "NO_SIDE_EFFECT";
|
|
2951
|
+
MarginAccountNewOtocoSideEffectTypeEnum$1["MARGIN_BUY"] = "MARGIN_BUY";
|
|
2952
|
+
return MarginAccountNewOtocoSideEffectTypeEnum$1;
|
|
2953
|
+
}({});
|
|
2439
2954
|
let MarginAccountNewOtocoNewOrderRespTypeEnum = /* @__PURE__ */ function(MarginAccountNewOtocoNewOrderRespTypeEnum$1) {
|
|
2440
2955
|
MarginAccountNewOtocoNewOrderRespTypeEnum$1["ACK"] = "ACK";
|
|
2441
2956
|
MarginAccountNewOtocoNewOrderRespTypeEnum$1["RESULT"] = "RESULT";
|
|
2442
2957
|
MarginAccountNewOtocoNewOrderRespTypeEnum$1["FULL"] = "FULL";
|
|
2443
2958
|
return MarginAccountNewOtocoNewOrderRespTypeEnum$1;
|
|
2444
2959
|
}({});
|
|
2960
|
+
let MarginAccountNewOtocoSelfTradePreventionModeEnum = /* @__PURE__ */ function(MarginAccountNewOtocoSelfTradePreventionModeEnum$1) {
|
|
2961
|
+
MarginAccountNewOtocoSelfTradePreventionModeEnum$1["EXPIRE_TAKER"] = "EXPIRE_TAKER";
|
|
2962
|
+
MarginAccountNewOtocoSelfTradePreventionModeEnum$1["EXPIRE_MAKER"] = "EXPIRE_MAKER";
|
|
2963
|
+
MarginAccountNewOtocoSelfTradePreventionModeEnum$1["EXPIRE_BOTH"] = "EXPIRE_BOTH";
|
|
2964
|
+
MarginAccountNewOtocoSelfTradePreventionModeEnum$1["NONE"] = "NONE";
|
|
2965
|
+
return MarginAccountNewOtocoSelfTradePreventionModeEnum$1;
|
|
2966
|
+
}({});
|
|
2967
|
+
let MarginAccountNewOtocoWorkingTimeInForceEnum = /* @__PURE__ */ function(MarginAccountNewOtocoWorkingTimeInForceEnum$1) {
|
|
2968
|
+
MarginAccountNewOtocoWorkingTimeInForceEnum$1["GTC"] = "GTC";
|
|
2969
|
+
MarginAccountNewOtocoWorkingTimeInForceEnum$1["IOC"] = "IOC";
|
|
2970
|
+
MarginAccountNewOtocoWorkingTimeInForceEnum$1["FOK"] = "FOK";
|
|
2971
|
+
return MarginAccountNewOtocoWorkingTimeInForceEnum$1;
|
|
2972
|
+
}({});
|
|
2973
|
+
let MarginAccountNewOtocoPendingAboveTimeInForceEnum = /* @__PURE__ */ function(MarginAccountNewOtocoPendingAboveTimeInForceEnum$1) {
|
|
2974
|
+
MarginAccountNewOtocoPendingAboveTimeInForceEnum$1["GTC"] = "GTC";
|
|
2975
|
+
MarginAccountNewOtocoPendingAboveTimeInForceEnum$1["IOC"] = "IOC";
|
|
2976
|
+
MarginAccountNewOtocoPendingAboveTimeInForceEnum$1["FOK"] = "FOK";
|
|
2977
|
+
return MarginAccountNewOtocoPendingAboveTimeInForceEnum$1;
|
|
2978
|
+
}({});
|
|
2979
|
+
let MarginAccountNewOtocoPendingBelowTypeEnum = /* @__PURE__ */ function(MarginAccountNewOtocoPendingBelowTypeEnum$1) {
|
|
2980
|
+
MarginAccountNewOtocoPendingBelowTypeEnum$1["LIMIT_MAKER"] = "LIMIT_MAKER";
|
|
2981
|
+
MarginAccountNewOtocoPendingBelowTypeEnum$1["STOP_LOSS"] = "STOP_LOSS";
|
|
2982
|
+
MarginAccountNewOtocoPendingBelowTypeEnum$1["STOP_LOSS_LIMIT"] = "STOP_LOSS_LIMIT";
|
|
2983
|
+
return MarginAccountNewOtocoPendingBelowTypeEnum$1;
|
|
2984
|
+
}({});
|
|
2985
|
+
let MarginAccountNewOtocoPendingBelowTimeInForceEnum = /* @__PURE__ */ function(MarginAccountNewOtocoPendingBelowTimeInForceEnum$1) {
|
|
2986
|
+
MarginAccountNewOtocoPendingBelowTimeInForceEnum$1["GTC"] = "GTC";
|
|
2987
|
+
MarginAccountNewOtocoPendingBelowTimeInForceEnum$1["IOC"] = "IOC";
|
|
2988
|
+
MarginAccountNewOtocoPendingBelowTimeInForceEnum$1["FOK"] = "FOK";
|
|
2989
|
+
return MarginAccountNewOtocoPendingBelowTimeInForceEnum$1;
|
|
2990
|
+
}({});
|
|
2991
|
+
let MarginManualLiquidationTypeEnum = /* @__PURE__ */ function(MarginManualLiquidationTypeEnum$1) {
|
|
2992
|
+
MarginManualLiquidationTypeEnum$1["MARGIN"] = "MARGIN";
|
|
2993
|
+
MarginManualLiquidationTypeEnum$1["ISOLATED"] = "ISOLATED";
|
|
2994
|
+
return MarginManualLiquidationTypeEnum$1;
|
|
2995
|
+
}({});
|
|
2996
|
+
let QueryCurrentMarginOrderCountUsageIsIsolatedEnum = /* @__PURE__ */ function(QueryCurrentMarginOrderCountUsageIsIsolatedEnum$1) {
|
|
2997
|
+
QueryCurrentMarginOrderCountUsageIsIsolatedEnum$1["TRUE"] = "TRUE";
|
|
2998
|
+
QueryCurrentMarginOrderCountUsageIsIsolatedEnum$1["FALSE"] = "FALSE";
|
|
2999
|
+
return QueryCurrentMarginOrderCountUsageIsIsolatedEnum$1;
|
|
3000
|
+
}({});
|
|
3001
|
+
let QueryMarginAccountsAllOcoIsIsolatedEnum = /* @__PURE__ */ function(QueryMarginAccountsAllOcoIsIsolatedEnum$1) {
|
|
3002
|
+
QueryMarginAccountsAllOcoIsIsolatedEnum$1["TRUE"] = "TRUE";
|
|
3003
|
+
QueryMarginAccountsAllOcoIsIsolatedEnum$1["FALSE"] = "FALSE";
|
|
3004
|
+
return QueryMarginAccountsAllOcoIsIsolatedEnum$1;
|
|
3005
|
+
}({});
|
|
3006
|
+
let QueryMarginAccountsAllOrdersIsIsolatedEnum = /* @__PURE__ */ function(QueryMarginAccountsAllOrdersIsIsolatedEnum$1) {
|
|
3007
|
+
QueryMarginAccountsAllOrdersIsIsolatedEnum$1["TRUE"] = "TRUE";
|
|
3008
|
+
QueryMarginAccountsAllOrdersIsIsolatedEnum$1["FALSE"] = "FALSE";
|
|
3009
|
+
return QueryMarginAccountsAllOrdersIsIsolatedEnum$1;
|
|
3010
|
+
}({});
|
|
3011
|
+
let QueryMarginAccountsOcoIsIsolatedEnum = /* @__PURE__ */ function(QueryMarginAccountsOcoIsIsolatedEnum$1) {
|
|
3012
|
+
QueryMarginAccountsOcoIsIsolatedEnum$1["TRUE"] = "TRUE";
|
|
3013
|
+
QueryMarginAccountsOcoIsIsolatedEnum$1["FALSE"] = "FALSE";
|
|
3014
|
+
return QueryMarginAccountsOcoIsIsolatedEnum$1;
|
|
3015
|
+
}({});
|
|
3016
|
+
let QueryMarginAccountsOpenOcoIsIsolatedEnum = /* @__PURE__ */ function(QueryMarginAccountsOpenOcoIsIsolatedEnum$1) {
|
|
3017
|
+
QueryMarginAccountsOpenOcoIsIsolatedEnum$1["TRUE"] = "TRUE";
|
|
3018
|
+
QueryMarginAccountsOpenOcoIsIsolatedEnum$1["FALSE"] = "FALSE";
|
|
3019
|
+
return QueryMarginAccountsOpenOcoIsIsolatedEnum$1;
|
|
3020
|
+
}({});
|
|
3021
|
+
let QueryMarginAccountsOpenOrdersIsIsolatedEnum = /* @__PURE__ */ function(QueryMarginAccountsOpenOrdersIsIsolatedEnum$1) {
|
|
3022
|
+
QueryMarginAccountsOpenOrdersIsIsolatedEnum$1["TRUE"] = "TRUE";
|
|
3023
|
+
QueryMarginAccountsOpenOrdersIsIsolatedEnum$1["FALSE"] = "FALSE";
|
|
3024
|
+
return QueryMarginAccountsOpenOrdersIsIsolatedEnum$1;
|
|
3025
|
+
}({});
|
|
3026
|
+
let QueryMarginAccountsOrderIsIsolatedEnum = /* @__PURE__ */ function(QueryMarginAccountsOrderIsIsolatedEnum$1) {
|
|
3027
|
+
QueryMarginAccountsOrderIsIsolatedEnum$1["TRUE"] = "TRUE";
|
|
3028
|
+
QueryMarginAccountsOrderIsIsolatedEnum$1["FALSE"] = "FALSE";
|
|
3029
|
+
return QueryMarginAccountsOrderIsIsolatedEnum$1;
|
|
3030
|
+
}({});
|
|
3031
|
+
let QueryMarginAccountsTradeListIsIsolatedEnum = /* @__PURE__ */ function(QueryMarginAccountsTradeListIsIsolatedEnum$1) {
|
|
3032
|
+
QueryMarginAccountsTradeListIsIsolatedEnum$1["TRUE"] = "TRUE";
|
|
3033
|
+
QueryMarginAccountsTradeListIsIsolatedEnum$1["FALSE"] = "FALSE";
|
|
3034
|
+
return QueryMarginAccountsTradeListIsIsolatedEnum$1;
|
|
3035
|
+
}({});
|
|
3036
|
+
let QueryPreventedMatchesIsIsolatedEnum = /* @__PURE__ */ function(QueryPreventedMatchesIsIsolatedEnum$1) {
|
|
3037
|
+
QueryPreventedMatchesIsIsolatedEnum$1["TRUE"] = "TRUE";
|
|
3038
|
+
QueryPreventedMatchesIsIsolatedEnum$1["FALSE"] = "FALSE";
|
|
3039
|
+
return QueryPreventedMatchesIsIsolatedEnum$1;
|
|
3040
|
+
}({});
|
|
2445
3041
|
|
|
2446
3042
|
//#endregion
|
|
2447
3043
|
//#region src/rest-api/modules/transfer-api.ts
|
|
2448
3044
|
/**
|
|
2449
|
-
*
|
|
3045
|
+
* Margin REST API
|
|
2450
3046
|
*
|
|
2451
|
-
*
|
|
3047
|
+
* Access account information, borrow and repay assets, and trade with Binance Margin.
|
|
2452
3048
|
*
|
|
2453
3049
|
* The version of the OpenAPI document: 1.0.0
|
|
2454
3050
|
*
|
|
@@ -2518,18 +3114,21 @@ var TransferApi = class {
|
|
|
2518
3114
|
/**
|
|
2519
3115
|
* Get Cross Margin Transfer History
|
|
2520
3116
|
*
|
|
2521
|
-
*
|
|
2522
|
-
*
|
|
2523
|
-
*
|
|
3117
|
+
* Weight(IP): 1
|
|
3118
|
+
*
|
|
3119
|
+
* Security Type: USER_DATA
|
|
2524
3120
|
*
|
|
2525
|
-
*
|
|
3121
|
+
* Notes:
|
|
3122
|
+
* - Response in descending order
|
|
3123
|
+
* - The max interval between `startTime` and `endTime` is 30 days.
|
|
3124
|
+
* - Returns data for last 7 days by default
|
|
2526
3125
|
*
|
|
2527
3126
|
* @summary Get Cross Margin Transfer History (USER_DATA)
|
|
2528
3127
|
* @param {GetCrossMarginTransferHistoryRequest} requestParameters Request parameters.
|
|
2529
3128
|
* @returns {Promise<RestApiResponse<GetCrossMarginTransferHistoryResponse>>}
|
|
2530
3129
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
2531
3130
|
* @memberof TransferApi
|
|
2532
|
-
* @see {@link https://developers.binance.com/docs/
|
|
3131
|
+
* @see {@link https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/transfer#get-cross-margin-transfer-history Binance API Documentation}
|
|
2533
3132
|
*/
|
|
2534
3133
|
async getCrossMarginTransferHistory(requestParameters = {}) {
|
|
2535
3134
|
const localVarAxiosArgs = await this.localVarAxiosParamCreator.getCrossMarginTransferHistory(requestParameters?.asset, requestParameters?.type, requestParameters?.startTime, requestParameters?.endTime, requestParameters?.current, requestParameters?.size, requestParameters?.isolatedSymbol, requestParameters?.recvWindow);
|
|
@@ -2538,29 +3137,168 @@ var TransferApi = class {
|
|
|
2538
3137
|
/**
|
|
2539
3138
|
* Query Max Transfer-Out Amount
|
|
2540
3139
|
*
|
|
2541
|
-
*
|
|
3140
|
+
* Weight(IP): 50
|
|
2542
3141
|
*
|
|
2543
|
-
*
|
|
3142
|
+
* Security Type: USER_DATA
|
|
3143
|
+
*
|
|
3144
|
+
* Notes:
|
|
3145
|
+
* - If isolatedSymbol is not sent, crossed margin data will be sent.
|
|
2544
3146
|
*
|
|
2545
3147
|
* @summary Query Max Transfer-Out Amount (USER_DATA)
|
|
2546
3148
|
* @param {QueryMaxTransferOutAmountRequest} requestParameters Request parameters.
|
|
2547
3149
|
* @returns {Promise<RestApiResponse<QueryMaxTransferOutAmountResponse>>}
|
|
2548
3150
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
2549
3151
|
* @memberof TransferApi
|
|
2550
|
-
* @see {@link https://developers.binance.com/docs/
|
|
3152
|
+
* @see {@link https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/transfer#query-max-transfer-out-amount Binance API Documentation}
|
|
2551
3153
|
*/
|
|
2552
3154
|
async queryMaxTransferOutAmount(requestParameters) {
|
|
2553
3155
|
const localVarAxiosArgs = await this.localVarAxiosParamCreator.queryMaxTransferOutAmount(requestParameters?.asset, requestParameters?.isolatedSymbol, requestParameters?.recvWindow);
|
|
2554
3156
|
return sendRequest(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs.headerParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
|
|
2555
3157
|
}
|
|
2556
3158
|
};
|
|
3159
|
+
let GetCrossMarginTransferHistoryTypeEnum = /* @__PURE__ */ function(GetCrossMarginTransferHistoryTypeEnum$1) {
|
|
3160
|
+
GetCrossMarginTransferHistoryTypeEnum$1["ROLL_IN"] = "ROLL_IN";
|
|
3161
|
+
GetCrossMarginTransferHistoryTypeEnum$1["ROLL_OUT"] = "ROLL_OUT";
|
|
3162
|
+
return GetCrossMarginTransferHistoryTypeEnum$1;
|
|
3163
|
+
}({});
|
|
3164
|
+
|
|
3165
|
+
//#endregion
|
|
3166
|
+
//#region src/rest-api/modules/user-data-stream-api.ts
|
|
3167
|
+
/**
|
|
3168
|
+
* Margin REST API
|
|
3169
|
+
*
|
|
3170
|
+
* Access account information, borrow and repay assets, and trade with Binance Margin.
|
|
3171
|
+
*
|
|
3172
|
+
* The version of the OpenAPI document: 1.0.0
|
|
3173
|
+
*
|
|
3174
|
+
*
|
|
3175
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
3176
|
+
* https://openapi-generator.tech
|
|
3177
|
+
* Do not edit the class manually.
|
|
3178
|
+
*/
|
|
3179
|
+
/**
|
|
3180
|
+
* UserDataStreamApi - axios parameter creator
|
|
3181
|
+
*/
|
|
3182
|
+
const UserDataStreamApiAxiosParamCreator = function(configuration) {
|
|
3183
|
+
return {
|
|
3184
|
+
closeUserDataStream: async () => {
|
|
3185
|
+
const localVarQueryParameter = {};
|
|
3186
|
+
const localVarBodyParameter = {};
|
|
3187
|
+
const localVarHeaderParameter = {};
|
|
3188
|
+
let _timeUnit;
|
|
3189
|
+
if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
|
|
3190
|
+
return {
|
|
3191
|
+
endpoint: "/sapi/v1/margin/listen-key",
|
|
3192
|
+
method: "DELETE",
|
|
3193
|
+
queryParams: localVarQueryParameter,
|
|
3194
|
+
bodyParams: localVarBodyParameter,
|
|
3195
|
+
headerParams: localVarHeaderParameter,
|
|
3196
|
+
timeUnit: _timeUnit
|
|
3197
|
+
};
|
|
3198
|
+
},
|
|
3199
|
+
keepaliveUserDataStream: async (listenKey) => {
|
|
3200
|
+
assertParamExists("keepaliveUserDataStream", "listenKey", listenKey);
|
|
3201
|
+
const localVarQueryParameter = {};
|
|
3202
|
+
const localVarBodyParameter = {};
|
|
3203
|
+
const localVarHeaderParameter = {};
|
|
3204
|
+
if (listenKey !== void 0 && listenKey !== null) localVarQueryParameter["listenKey"] = listenKey;
|
|
3205
|
+
let _timeUnit;
|
|
3206
|
+
if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
|
|
3207
|
+
return {
|
|
3208
|
+
endpoint: "/sapi/v1/margin/listen-key",
|
|
3209
|
+
method: "PUT",
|
|
3210
|
+
queryParams: localVarQueryParameter,
|
|
3211
|
+
bodyParams: localVarBodyParameter,
|
|
3212
|
+
headerParams: localVarHeaderParameter,
|
|
3213
|
+
timeUnit: _timeUnit
|
|
3214
|
+
};
|
|
3215
|
+
},
|
|
3216
|
+
startUserDataStream: async () => {
|
|
3217
|
+
const localVarQueryParameter = {};
|
|
3218
|
+
const localVarBodyParameter = {};
|
|
3219
|
+
const localVarHeaderParameter = {};
|
|
3220
|
+
let _timeUnit;
|
|
3221
|
+
if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
|
|
3222
|
+
return {
|
|
3223
|
+
endpoint: "/sapi/v1/margin/listen-key",
|
|
3224
|
+
method: "POST",
|
|
3225
|
+
queryParams: localVarQueryParameter,
|
|
3226
|
+
bodyParams: localVarBodyParameter,
|
|
3227
|
+
headerParams: localVarHeaderParameter,
|
|
3228
|
+
timeUnit: _timeUnit
|
|
3229
|
+
};
|
|
3230
|
+
}
|
|
3231
|
+
};
|
|
3232
|
+
};
|
|
3233
|
+
/**
|
|
3234
|
+
* UserDataStreamApi - object-oriented interface
|
|
3235
|
+
* @class UserDataStreamApi
|
|
3236
|
+
*/
|
|
3237
|
+
var UserDataStreamApi = class {
|
|
3238
|
+
constructor(configuration) {
|
|
3239
|
+
this.configuration = configuration;
|
|
3240
|
+
this.localVarAxiosParamCreator = UserDataStreamApiAxiosParamCreator(configuration);
|
|
3241
|
+
}
|
|
3242
|
+
/**
|
|
3243
|
+
* Close out a user data stream.
|
|
3244
|
+
*
|
|
3245
|
+
* Weight(UID): 3000
|
|
3246
|
+
*
|
|
3247
|
+
* Security Type: USER_STREAM
|
|
3248
|
+
*
|
|
3249
|
+
* @summary Close User Data Stream (USER_STREAM)
|
|
3250
|
+
* @returns {Promise<RestApiResponse<void>>}
|
|
3251
|
+
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
3252
|
+
* @memberof UserDataStreamApi
|
|
3253
|
+
* @see {@link https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/user-data-stream#close-user-data-stream Binance API Documentation}
|
|
3254
|
+
*/
|
|
3255
|
+
async closeUserDataStream() {
|
|
3256
|
+
const localVarAxiosArgs = await this.localVarAxiosParamCreator.closeUserDataStream();
|
|
3257
|
+
return sendRequest(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs.headerParams, localVarAxiosArgs?.timeUnit, { isSigned: false });
|
|
3258
|
+
}
|
|
3259
|
+
/**
|
|
3260
|
+
* Keepalive a user data stream to prevent a time out.
|
|
3261
|
+
*
|
|
3262
|
+
* Weight(UID): 1
|
|
3263
|
+
*
|
|
3264
|
+
* Security Type: USER_STREAM
|
|
3265
|
+
*
|
|
3266
|
+
* @summary Keepalive User Data Stream (USER_STREAM)
|
|
3267
|
+
* @param {KeepaliveUserDataStreamRequest} requestParameters Request parameters.
|
|
3268
|
+
* @returns {Promise<RestApiResponse<void>>}
|
|
3269
|
+
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
3270
|
+
* @memberof UserDataStreamApi
|
|
3271
|
+
* @see {@link https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/user-data-stream#keepalive-user-data-stream Binance API Documentation}
|
|
3272
|
+
*/
|
|
3273
|
+
async keepaliveUserDataStream(requestParameters) {
|
|
3274
|
+
const localVarAxiosArgs = await this.localVarAxiosParamCreator.keepaliveUserDataStream(requestParameters?.listenKey);
|
|
3275
|
+
return sendRequest(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs.headerParams, localVarAxiosArgs?.timeUnit, { isSigned: false });
|
|
3276
|
+
}
|
|
3277
|
+
/**
|
|
3278
|
+
* Start a new user data stream.
|
|
3279
|
+
*
|
|
3280
|
+
* Weight(UID): 1
|
|
3281
|
+
*
|
|
3282
|
+
* Security Type: USER_STREAM
|
|
3283
|
+
*
|
|
3284
|
+
* @summary Start User Data Stream (USER_STREAM)
|
|
3285
|
+
* @returns {Promise<RestApiResponse<StartUserDataStreamResponse>>}
|
|
3286
|
+
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
3287
|
+
* @memberof UserDataStreamApi
|
|
3288
|
+
* @see {@link https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/user-data-stream#start-user-data-stream Binance API Documentation}
|
|
3289
|
+
*/
|
|
3290
|
+
async startUserDataStream() {
|
|
3291
|
+
const localVarAxiosArgs = await this.localVarAxiosParamCreator.startUserDataStream();
|
|
3292
|
+
return sendRequest(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs.headerParams, localVarAxiosArgs?.timeUnit, { isSigned: false });
|
|
3293
|
+
}
|
|
3294
|
+
};
|
|
2557
3295
|
|
|
2558
3296
|
//#endregion
|
|
2559
3297
|
//#region src/rest-api/rest-api.ts
|
|
2560
3298
|
/**
|
|
2561
|
-
*
|
|
3299
|
+
* Margin REST API
|
|
2562
3300
|
*
|
|
2563
|
-
*
|
|
3301
|
+
* Access account information, borrow and repay assets, and trade with Binance Margin.
|
|
2564
3302
|
*
|
|
2565
3303
|
* The version of the OpenAPI document: 1.0.0
|
|
2566
3304
|
*
|
|
@@ -2575,9 +3313,9 @@ var RestAPI = class {
|
|
|
2575
3313
|
this.accountApi = new AccountApi(configuration);
|
|
2576
3314
|
this.borrowRepayApi = new BorrowRepayApi(configuration);
|
|
2577
3315
|
this.marketDataApi = new MarketDataApi(configuration);
|
|
2578
|
-
this.riskDataStreamApi = new RiskDataStreamApi(configuration);
|
|
2579
3316
|
this.tradeApi = new TradeApi(configuration);
|
|
2580
3317
|
this.transferApi = new TransferApi(configuration);
|
|
3318
|
+
this.userDataStreamApi = new UserDataStreamApi(configuration);
|
|
2581
3319
|
}
|
|
2582
3320
|
/**
|
|
2583
3321
|
* Generic function to send a request.
|
|
@@ -2606,32 +3344,36 @@ var RestAPI = class {
|
|
|
2606
3344
|
/**
|
|
2607
3345
|
* Adjust cross margin max leverage
|
|
2608
3346
|
*
|
|
2609
|
-
*
|
|
3347
|
+
* Weight(UID): 3000, 1 times/min per IP
|
|
2610
3348
|
*
|
|
2611
|
-
*
|
|
3349
|
+
* Security Type: USER_DATA
|
|
3350
|
+
*
|
|
3351
|
+
* Notes:
|
|
3352
|
+
* - The margin level need higher than the initial risk ratio of adjusted leverage, the initial risk ratio of 3x is 1.5 , the initial risk ratio of 5x is 1.25; The detail conditions on how to switch between Cross Margin Classic and Cross Margin Pro can refer to [the FAQ](https://www.binance.com/en/support/faq/how-to-activate-the-cross-margin-pro-mode-on-binance-e27786da05e743a694b8c625b3bc475d).
|
|
2612
3353
|
*
|
|
2613
3354
|
* @summary Adjust cross margin max leverage (USER_DATA)
|
|
2614
3355
|
* @param {AdjustCrossMarginMaxLeverageRequest} requestParameters Request parameters.
|
|
2615
3356
|
*
|
|
2616
3357
|
* @returns {Promise<RestApiResponse<AdjustCrossMarginMaxLeverageResponse>>}
|
|
2617
3358
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
2618
|
-
* @see {@link https://developers.binance.com/docs/
|
|
3359
|
+
* @see {@link https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/account#adjust-cross-margin-max-leverage Binance API Documentation}
|
|
2619
3360
|
*/
|
|
2620
3361
|
adjustCrossMarginMaxLeverage(requestParameters) {
|
|
2621
3362
|
return this.accountApi.adjustCrossMarginMaxLeverage(requestParameters);
|
|
2622
3363
|
}
|
|
2623
3364
|
/**
|
|
2624
|
-
* Disable isolated margin account for a specific symbol. Each trading pair can only be deactivated once every 24
|
|
2625
|
-
*
|
|
3365
|
+
* Disable isolated margin account for a specific symbol. Each trading pair can only be deactivated once every 24 hours.
|
|
3366
|
+
*
|
|
3367
|
+
* Weight(UID): 300
|
|
2626
3368
|
*
|
|
2627
|
-
*
|
|
3369
|
+
* Security Type: TRADE
|
|
2628
3370
|
*
|
|
2629
3371
|
* @summary Disable Isolated Margin Account (TRADE)
|
|
2630
3372
|
* @param {DisableIsolatedMarginAccountRequest} requestParameters Request parameters.
|
|
2631
3373
|
*
|
|
2632
3374
|
* @returns {Promise<RestApiResponse<DisableIsolatedMarginAccountResponse>>}
|
|
2633
3375
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
2634
|
-
* @see {@link https://developers.binance.com/docs/
|
|
3376
|
+
* @see {@link https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/account#disable-isolated-margin-account Binance API Documentation}
|
|
2635
3377
|
*/
|
|
2636
3378
|
disableIsolatedMarginAccount(requestParameters) {
|
|
2637
3379
|
return this.accountApi.disableIsolatedMarginAccount(requestParameters);
|
|
@@ -2639,14 +3381,16 @@ var RestAPI = class {
|
|
|
2639
3381
|
/**
|
|
2640
3382
|
* Enable isolated margin account for a specific symbol(Only supports activation of previously disabled accounts).
|
|
2641
3383
|
*
|
|
2642
|
-
* Weight: 300
|
|
3384
|
+
* Weight(UID): 300
|
|
3385
|
+
*
|
|
3386
|
+
* Security Type: TRADE
|
|
2643
3387
|
*
|
|
2644
3388
|
* @summary Enable Isolated Margin Account (TRADE)
|
|
2645
3389
|
* @param {EnableIsolatedMarginAccountRequest} requestParameters Request parameters.
|
|
2646
3390
|
*
|
|
2647
3391
|
* @returns {Promise<RestApiResponse<EnableIsolatedMarginAccountResponse>>}
|
|
2648
3392
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
2649
|
-
* @see {@link https://developers.binance.com/docs/
|
|
3393
|
+
* @see {@link https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/account#enable-isolated-margin-account Binance API Documentation}
|
|
2650
3394
|
*/
|
|
2651
3395
|
enableIsolatedMarginAccount(requestParameters) {
|
|
2652
3396
|
return this.accountApi.enableIsolatedMarginAccount(requestParameters);
|
|
@@ -2654,14 +3398,16 @@ var RestAPI = class {
|
|
|
2654
3398
|
/**
|
|
2655
3399
|
* Get BNB Burn Status
|
|
2656
3400
|
*
|
|
2657
|
-
* Weight: 1
|
|
3401
|
+
* Weight(IP): 1
|
|
3402
|
+
*
|
|
3403
|
+
* Security Type: USER_DATA
|
|
2658
3404
|
*
|
|
2659
3405
|
* @summary Get BNB Burn Status (USER_DATA)
|
|
2660
3406
|
* @param {GetBnbBurnStatusRequest} requestParameters Request parameters.
|
|
2661
3407
|
*
|
|
2662
3408
|
* @returns {Promise<RestApiResponse<GetBnbBurnStatusResponse>>}
|
|
2663
3409
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
2664
|
-
* @see {@link https://developers.binance.com/docs/
|
|
3410
|
+
* @see {@link https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/account#get-bnb-burn-status Binance API Documentation}
|
|
2665
3411
|
*/
|
|
2666
3412
|
getBnbBurnStatus(requestParameters = {}) {
|
|
2667
3413
|
return this.accountApi.getBnbBurnStatus(requestParameters);
|
|
@@ -2669,14 +3415,16 @@ var RestAPI = class {
|
|
|
2669
3415
|
/**
|
|
2670
3416
|
* Get personal margin level information
|
|
2671
3417
|
*
|
|
2672
|
-
* Weight: 10
|
|
3418
|
+
* Weight(IP): 10
|
|
3419
|
+
*
|
|
3420
|
+
* Security Type: USER_DATA
|
|
2673
3421
|
*
|
|
2674
3422
|
* @summary Get Summary of Margin account (USER_DATA)
|
|
2675
3423
|
* @param {GetSummaryOfMarginAccountRequest} requestParameters Request parameters.
|
|
2676
3424
|
*
|
|
2677
3425
|
* @returns {Promise<RestApiResponse<GetSummaryOfMarginAccountResponse>>}
|
|
2678
3426
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
2679
|
-
* @see {@link https://developers.binance.com/docs/
|
|
3427
|
+
* @see {@link https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/account#get-summary-of-margin-account Binance API Documentation}
|
|
2680
3428
|
*/
|
|
2681
3429
|
getSummaryOfMarginAccount(requestParameters = {}) {
|
|
2682
3430
|
return this.accountApi.getSummaryOfMarginAccount(requestParameters);
|
|
@@ -2684,14 +3432,26 @@ var RestAPI = class {
|
|
|
2684
3432
|
/**
|
|
2685
3433
|
* Query Cross Isolated Margin Capital Flow
|
|
2686
3434
|
*
|
|
2687
|
-
* Weight: 100
|
|
3435
|
+
* Weight(IP): 100
|
|
3436
|
+
*
|
|
3437
|
+
* Security Type: USER_DATA
|
|
3438
|
+
*
|
|
3439
|
+
* Notes:
|
|
3440
|
+
* - Only supports querying the data of the last 90 days
|
|
3441
|
+
*
|
|
3442
|
+
* - The time between startTime and endTime cannot be longer than 7 days.
|
|
3443
|
+
*
|
|
3444
|
+
* - If fromId is set, the data with id > fromId will be returned.
|
|
3445
|
+
* Otherwise the latest data will be returned
|
|
3446
|
+
*
|
|
3447
|
+
* - To query isolated data, Symbol needs to be entered.
|
|
2688
3448
|
*
|
|
2689
3449
|
* @summary Query Cross Isolated Margin Capital Flow (USER_DATA)
|
|
2690
3450
|
* @param {QueryCrossIsolatedMarginCapitalFlowRequest} requestParameters Request parameters.
|
|
2691
3451
|
*
|
|
2692
3452
|
* @returns {Promise<RestApiResponse<QueryCrossIsolatedMarginCapitalFlowResponse>>}
|
|
2693
3453
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
2694
|
-
* @see {@link https://developers.binance.com/docs/
|
|
3454
|
+
* @see {@link https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/account#query-cross-isolated-margin-capital-flow Binance API Documentation}
|
|
2695
3455
|
*/
|
|
2696
3456
|
queryCrossIsolatedMarginCapitalFlow(requestParameters = {}) {
|
|
2697
3457
|
return this.accountApi.queryCrossIsolatedMarginCapitalFlow(requestParameters);
|
|
@@ -2699,14 +3459,16 @@ var RestAPI = class {
|
|
|
2699
3459
|
/**
|
|
2700
3460
|
* Query Cross Margin Account Details
|
|
2701
3461
|
*
|
|
2702
|
-
* Weight: 10
|
|
3462
|
+
* Weight(IP): 10
|
|
3463
|
+
*
|
|
3464
|
+
* Security Type: USER_DATA
|
|
2703
3465
|
*
|
|
2704
3466
|
* @summary Query Cross Margin Account Details (USER_DATA)
|
|
2705
3467
|
* @param {QueryCrossMarginAccountDetailsRequest} requestParameters Request parameters.
|
|
2706
3468
|
*
|
|
2707
3469
|
* @returns {Promise<RestApiResponse<QueryCrossMarginAccountDetailsResponse>>}
|
|
2708
3470
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
2709
|
-
* @see {@link https://developers.binance.com/docs/
|
|
3471
|
+
* @see {@link https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/account#query-cross-margin-account-details Binance API Documentation}
|
|
2710
3472
|
*/
|
|
2711
3473
|
queryCrossMarginAccountDetails(requestParameters = {}) {
|
|
2712
3474
|
return this.accountApi.queryCrossMarginAccountDetails(requestParameters);
|
|
@@ -2714,14 +3476,16 @@ var RestAPI = class {
|
|
|
2714
3476
|
/**
|
|
2715
3477
|
* Get cross margin fee data collection with any vip level or user's current specific data as https://www.binance.com/en/margin-fee
|
|
2716
3478
|
*
|
|
2717
|
-
* Weight: 1 when coin is specified;(IP)
|
|
3479
|
+
* Weight: 1 when coin is specified;(IP) 5 when the coin parameter is omitted(IP)
|
|
3480
|
+
*
|
|
3481
|
+
* Security Type: USER_DATA
|
|
2718
3482
|
*
|
|
2719
3483
|
* @summary Query Cross Margin Fee Data (USER_DATA)
|
|
2720
3484
|
* @param {QueryCrossMarginFeeDataRequest} requestParameters Request parameters.
|
|
2721
3485
|
*
|
|
2722
3486
|
* @returns {Promise<RestApiResponse<QueryCrossMarginFeeDataResponse>>}
|
|
2723
3487
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
2724
|
-
* @see {@link https://developers.binance.com/docs/
|
|
3488
|
+
* @see {@link https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/account#query-cross-margin-fee-data Binance API Documentation}
|
|
2725
3489
|
*/
|
|
2726
3490
|
queryCrossMarginFeeData(requestParameters = {}) {
|
|
2727
3491
|
return this.accountApi.queryCrossMarginFeeData(requestParameters);
|
|
@@ -2729,14 +3493,16 @@ var RestAPI = class {
|
|
|
2729
3493
|
/**
|
|
2730
3494
|
* Query enabled isolated margin account limit.
|
|
2731
3495
|
*
|
|
2732
|
-
* Weight: 1
|
|
3496
|
+
* Weight(IP): 1
|
|
3497
|
+
*
|
|
3498
|
+
* Security Type: USER_DATA
|
|
2733
3499
|
*
|
|
2734
3500
|
* @summary Query Enabled Isolated Margin Account Limit (USER_DATA)
|
|
2735
3501
|
* @param {QueryEnabledIsolatedMarginAccountLimitRequest} requestParameters Request parameters.
|
|
2736
3502
|
*
|
|
2737
3503
|
* @returns {Promise<RestApiResponse<QueryEnabledIsolatedMarginAccountLimitResponse>>}
|
|
2738
3504
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
2739
|
-
* @see {@link https://developers.binance.com/docs/
|
|
3505
|
+
* @see {@link https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/account#query-enabled-isolated-margin-account-limit Binance API Documentation}
|
|
2740
3506
|
*/
|
|
2741
3507
|
queryEnabledIsolatedMarginAccountLimit(requestParameters = {}) {
|
|
2742
3508
|
return this.accountApi.queryEnabledIsolatedMarginAccountLimit(requestParameters);
|
|
@@ -2744,17 +3510,22 @@ var RestAPI = class {
|
|
|
2744
3510
|
/**
|
|
2745
3511
|
* Query Isolated Margin Account Info
|
|
2746
3512
|
*
|
|
2747
|
-
*
|
|
2748
|
-
*
|
|
3513
|
+
* Weight(IP): 10
|
|
3514
|
+
*
|
|
3515
|
+
* Security Type: USER_DATA
|
|
3516
|
+
*
|
|
3517
|
+
* Notes:
|
|
3518
|
+
* - If "symbols" is not sent, all isolated assets will be returned.
|
|
2749
3519
|
*
|
|
2750
|
-
*
|
|
3520
|
+
* - If "symbols" is sent, only the isolated assets of the sent symbols
|
|
3521
|
+
* will be returned.
|
|
2751
3522
|
*
|
|
2752
3523
|
* @summary Query Isolated Margin Account Info (USER_DATA)
|
|
2753
3524
|
* @param {QueryIsolatedMarginAccountInfoRequest} requestParameters Request parameters.
|
|
2754
3525
|
*
|
|
2755
3526
|
* @returns {Promise<RestApiResponse<QueryIsolatedMarginAccountInfoResponse>>}
|
|
2756
3527
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
2757
|
-
* @see {@link https://developers.binance.com/docs/
|
|
3528
|
+
* @see {@link https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/account#query-isolated-margin-account-info Binance API Documentation}
|
|
2758
3529
|
*/
|
|
2759
3530
|
queryIsolatedMarginAccountInfo(requestParameters = {}) {
|
|
2760
3531
|
return this.accountApi.queryIsolatedMarginAccountInfo(requestParameters);
|
|
@@ -2762,14 +3533,16 @@ var RestAPI = class {
|
|
|
2762
3533
|
/**
|
|
2763
3534
|
* Get isolated margin fee data collection with any vip level or user's current specific data as https://www.binance.com/en/margin-fee
|
|
2764
3535
|
*
|
|
2765
|
-
* Weight: 1 when a single is specified;(IP)
|
|
3536
|
+
* Weight: 1 when a single is specified;(IP) 10 when the symbol parameter is omitted(IP)
|
|
3537
|
+
*
|
|
3538
|
+
* Security Type: USER_DATA
|
|
2766
3539
|
*
|
|
2767
3540
|
* @summary Query Isolated Margin Fee Data (USER_DATA)
|
|
2768
3541
|
* @param {QueryIsolatedMarginFeeDataRequest} requestParameters Request parameters.
|
|
2769
3542
|
*
|
|
2770
3543
|
* @returns {Promise<RestApiResponse<QueryIsolatedMarginFeeDataResponse>>}
|
|
2771
3544
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
2772
|
-
* @see {@link https://developers.binance.com/docs/
|
|
3545
|
+
* @see {@link https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/account#query-isolated-margin-fee-data Binance API Documentation}
|
|
2773
3546
|
*/
|
|
2774
3547
|
queryIsolatedMarginFeeData(requestParameters = {}) {
|
|
2775
3548
|
return this.accountApi.queryIsolatedMarginFeeData(requestParameters);
|
|
@@ -2777,14 +3550,16 @@ var RestAPI = class {
|
|
|
2777
3550
|
/**
|
|
2778
3551
|
* Get future hourly interest rate
|
|
2779
3552
|
*
|
|
2780
|
-
* Weight: 100
|
|
3553
|
+
* Weight(IP): 100
|
|
3554
|
+
*
|
|
3555
|
+
* Security Type: USER_DATA
|
|
2781
3556
|
*
|
|
2782
3557
|
* @summary Get future hourly interest rate (USER_DATA)
|
|
2783
3558
|
* @param {GetFutureHourlyInterestRateRequest} requestParameters Request parameters.
|
|
2784
3559
|
*
|
|
2785
3560
|
* @returns {Promise<RestApiResponse<GetFutureHourlyInterestRateResponse>>}
|
|
2786
3561
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
2787
|
-
* @see {@link https://developers.binance.com/docs/
|
|
3562
|
+
* @see {@link https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/borrow-repay#get-future-hourly-interest-rate Binance API Documentation}
|
|
2788
3563
|
*/
|
|
2789
3564
|
getFutureHourlyInterestRate(requestParameters) {
|
|
2790
3565
|
return this.borrowRepayApi.getFutureHourlyInterestRate(requestParameters);
|
|
@@ -2792,42 +3567,64 @@ var RestAPI = class {
|
|
|
2792
3567
|
/**
|
|
2793
3568
|
* Get Interest History
|
|
2794
3569
|
*
|
|
2795
|
-
*
|
|
2796
|
-
*
|
|
2797
|
-
*
|
|
2798
|
-
*
|
|
2799
|
-
*
|
|
2800
|
-
*
|
|
2801
|
-
*
|
|
2802
|
-
*
|
|
2803
|
-
*
|
|
2804
|
-
* `
|
|
2805
|
-
*
|
|
2806
|
-
*
|
|
2807
|
-
*
|
|
2808
|
-
*
|
|
3570
|
+
* Weight(IP): 1
|
|
3571
|
+
*
|
|
3572
|
+
* Security Type: USER_DATA
|
|
3573
|
+
*
|
|
3574
|
+
* Notes:
|
|
3575
|
+
* - Response in descending order
|
|
3576
|
+
*
|
|
3577
|
+
* - If isolatedSymbol is not sent, crossed margin data will be returned
|
|
3578
|
+
*
|
|
3579
|
+
* - The max interval between `startTime` and `endTime` is 30 days. It is a
|
|
3580
|
+
* MUST to ensure data correctness.
|
|
3581
|
+
*
|
|
3582
|
+
* - If `startTime`and `endTime` not sent, return records of the last 7
|
|
3583
|
+
* days by default.
|
|
3584
|
+
*
|
|
3585
|
+
* - If `startTime` is sent and `endTime` is not sent, return records of
|
|
3586
|
+
* [max(`startTime`, now-30d), now].
|
|
3587
|
+
*
|
|
3588
|
+
* - If `startTime` is not sent and `endTime` is sent, return records of
|
|
3589
|
+
* [`endTime`-7, `endTime`]
|
|
3590
|
+
*
|
|
3591
|
+
* - `type` in response has 4 enums:
|
|
3592
|
+
*
|
|
3593
|
+
* - `PERIODIC` interest charged per hour
|
|
3594
|
+
*
|
|
3595
|
+
* - `ON_BORROW` first interest charged on borrow
|
|
3596
|
+
*
|
|
3597
|
+
* - `PERIODIC_CONVERTED` interest charged per hour converted into BNB
|
|
3598
|
+
*
|
|
3599
|
+
* - `ON_BORROW_CONVERTED` first interest charged on borrow converted into
|
|
3600
|
+
* BNB
|
|
3601
|
+
*
|
|
3602
|
+
* - `PORTFOLIO` interest charged daily on the portfolio margin negative
|
|
3603
|
+
* balance
|
|
2809
3604
|
*
|
|
2810
3605
|
* @summary Get Interest History (USER_DATA)
|
|
2811
3606
|
* @param {GetInterestHistoryRequest} requestParameters Request parameters.
|
|
2812
3607
|
*
|
|
2813
3608
|
* @returns {Promise<RestApiResponse<GetInterestHistoryResponse>>}
|
|
2814
3609
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
2815
|
-
* @see {@link https://developers.binance.com/docs/
|
|
3610
|
+
* @see {@link https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/borrow-repay#get-interest-history Binance API Documentation}
|
|
2816
3611
|
*/
|
|
2817
3612
|
getInterestHistory(requestParameters = {}) {
|
|
2818
3613
|
return this.borrowRepayApi.getInterestHistory(requestParameters);
|
|
2819
3614
|
}
|
|
2820
3615
|
/**
|
|
2821
|
-
* Margin account borrow/repay
|
|
3616
|
+
* Margin account borrow/repay
|
|
2822
3617
|
*
|
|
2823
|
-
* Weight: 1500
|
|
3618
|
+
* Weight(UID): 1500
|
|
2824
3619
|
*
|
|
2825
|
-
*
|
|
3620
|
+
* Security Type: USER_DATA
|
|
3621
|
+
*
|
|
3622
|
+
* @summary Margin account borrow/repay (USER_DATA)
|
|
2826
3623
|
* @param {MarginAccountBorrowRepayRequest} requestParameters Request parameters.
|
|
2827
3624
|
*
|
|
2828
3625
|
* @returns {Promise<RestApiResponse<MarginAccountBorrowRepayResponse>>}
|
|
2829
3626
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
2830
|
-
* @see {@link https://developers.binance.com/docs/
|
|
3627
|
+
* @see {@link https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/borrow-repay#margin-account-borrow-repay Binance API Documentation}
|
|
2831
3628
|
*/
|
|
2832
3629
|
marginAccountBorrowRepay(requestParameters) {
|
|
2833
3630
|
return this.borrowRepayApi.marginAccountBorrowRepay(requestParameters);
|
|
@@ -2835,19 +3632,27 @@ var RestAPI = class {
|
|
|
2835
3632
|
/**
|
|
2836
3633
|
* Query borrow/repay records in Margin account
|
|
2837
3634
|
*
|
|
2838
|
-
*
|
|
2839
|
-
*
|
|
2840
|
-
*
|
|
2841
|
-
*
|
|
3635
|
+
* Weight(IP): 10
|
|
3636
|
+
*
|
|
3637
|
+
* Security Type: USER_DATA
|
|
3638
|
+
*
|
|
3639
|
+
* Notes:
|
|
3640
|
+
* - `txId` or `startTime` must be sent. `txId` takes precedence.
|
|
2842
3641
|
*
|
|
2843
|
-
*
|
|
3642
|
+
* - Response in descending order
|
|
2844
3643
|
*
|
|
2845
|
-
*
|
|
3644
|
+
* - If an asset is sent, data within 30 days before `endTime`; If an asset is not sent, data within 7 days before `endTime`
|
|
3645
|
+
*
|
|
3646
|
+
* - If neither `startTime` nor `endTime` is sent, the recent 7-day data will be returned.
|
|
3647
|
+
*
|
|
3648
|
+
* - `startTime` set as `endTime` - 7 days by default, `endTime` set as current time by default
|
|
3649
|
+
*
|
|
3650
|
+
* @summary Query borrow/repay records in Margin account (USER_DATA)
|
|
2846
3651
|
* @param {QueryBorrowRepayRecordsInMarginAccountRequest} requestParameters Request parameters.
|
|
2847
3652
|
*
|
|
2848
3653
|
* @returns {Promise<RestApiResponse<QueryBorrowRepayRecordsInMarginAccountResponse>>}
|
|
2849
3654
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
2850
|
-
* @see {@link https://developers.binance.com/docs/
|
|
3655
|
+
* @see {@link https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/borrow-repay#query-borrow-repay-records-in-margin-account Binance API Documentation}
|
|
2851
3656
|
*/
|
|
2852
3657
|
queryBorrowRepayRecordsInMarginAccount(requestParameters) {
|
|
2853
3658
|
return this.borrowRepayApi.queryBorrowRepayRecordsInMarginAccount(requestParameters);
|
|
@@ -2855,14 +3660,16 @@ var RestAPI = class {
|
|
|
2855
3660
|
/**
|
|
2856
3661
|
* Query Margin Interest Rate History
|
|
2857
3662
|
*
|
|
2858
|
-
* Weight: 1
|
|
3663
|
+
* Weight(IP): 1
|
|
3664
|
+
*
|
|
3665
|
+
* Security Type: USER_DATA
|
|
2859
3666
|
*
|
|
2860
3667
|
* @summary Query Margin Interest Rate History (USER_DATA)
|
|
2861
3668
|
* @param {QueryMarginInterestRateHistoryRequest} requestParameters Request parameters.
|
|
2862
3669
|
*
|
|
2863
3670
|
* @returns {Promise<RestApiResponse<QueryMarginInterestRateHistoryResponse>>}
|
|
2864
3671
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
2865
|
-
* @see {@link https://developers.binance.com/docs/
|
|
3672
|
+
* @see {@link https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/borrow-repay#query-margin-interest-rate-history Binance API Documentation}
|
|
2866
3673
|
*/
|
|
2867
3674
|
queryMarginInterestRateHistory(requestParameters) {
|
|
2868
3675
|
return this.borrowRepayApi.queryMarginInterestRateHistory(requestParameters);
|
|
@@ -2870,17 +3677,20 @@ var RestAPI = class {
|
|
|
2870
3677
|
/**
|
|
2871
3678
|
* Query Max Borrow
|
|
2872
3679
|
*
|
|
2873
|
-
*
|
|
2874
|
-
* `borrowLimit` is also available from [https://www.binance.com/en/margin-fee](https://www.binance.com/en/margin-fee)
|
|
3680
|
+
* Weight(IP): 50
|
|
2875
3681
|
*
|
|
2876
|
-
*
|
|
3682
|
+
* Security Type: USER_DATA
|
|
3683
|
+
*
|
|
3684
|
+
* Notes:
|
|
3685
|
+
* - If isolatedSymbol is not sent, crossed margin data will be sent.
|
|
3686
|
+
* - `borrowLimit` is also available from [https://www.binance.com/en/margin-fee](https://www.binance.com/en/margin-fee)
|
|
2877
3687
|
*
|
|
2878
3688
|
* @summary Query Max Borrow (USER_DATA)
|
|
2879
3689
|
* @param {QueryMaxBorrowRequest} requestParameters Request parameters.
|
|
2880
3690
|
*
|
|
2881
3691
|
* @returns {Promise<RestApiResponse<QueryMaxBorrowResponse>>}
|
|
2882
3692
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
2883
|
-
* @see {@link https://developers.binance.com/docs/
|
|
3693
|
+
* @see {@link https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/borrow-repay#query-max-borrow Binance API Documentation}
|
|
2884
3694
|
*/
|
|
2885
3695
|
queryMaxBorrow(requestParameters) {
|
|
2886
3696
|
return this.borrowRepayApi.queryMaxBorrow(requestParameters);
|
|
@@ -2888,13 +3698,15 @@ var RestAPI = class {
|
|
|
2888
3698
|
/**
|
|
2889
3699
|
* Cross margin collateral ratio
|
|
2890
3700
|
*
|
|
2891
|
-
* Weight: 100
|
|
3701
|
+
* Weight(IP): 100
|
|
3702
|
+
*
|
|
3703
|
+
* Security Type: MARKET_DATA
|
|
2892
3704
|
*
|
|
2893
3705
|
* @summary Cross margin collateral ratio (MARKET_DATA)
|
|
2894
3706
|
*
|
|
2895
3707
|
* @returns {Promise<RestApiResponse<CrossMarginCollateralRatioResponse>>}
|
|
2896
3708
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
2897
|
-
* @see {@link https://developers.binance.com/docs/
|
|
3709
|
+
* @see {@link https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/market-data#cross-margin-collateral-ratio Binance API Documentation}
|
|
2898
3710
|
*/
|
|
2899
3711
|
crossMarginCollateralRatio() {
|
|
2900
3712
|
return this.marketDataApi.crossMarginCollateralRatio();
|
|
@@ -2902,14 +3714,16 @@ var RestAPI = class {
|
|
|
2902
3714
|
/**
|
|
2903
3715
|
* Get All Cross Margin Pairs
|
|
2904
3716
|
*
|
|
2905
|
-
* Weight: 1
|
|
3717
|
+
* Weight(IP): 1
|
|
3718
|
+
*
|
|
3719
|
+
* Security Type: MARKET_DATA
|
|
2906
3720
|
*
|
|
2907
3721
|
* @summary Get All Cross Margin Pairs (MARKET_DATA)
|
|
2908
3722
|
* @param {GetAllCrossMarginPairsRequest} requestParameters Request parameters.
|
|
2909
3723
|
*
|
|
2910
3724
|
* @returns {Promise<RestApiResponse<GetAllCrossMarginPairsResponse>>}
|
|
2911
3725
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
2912
|
-
* @see {@link https://developers.binance.com/docs/
|
|
3726
|
+
* @see {@link https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/market-data#get-all-cross-margin-pairs Binance API Documentation}
|
|
2913
3727
|
*/
|
|
2914
3728
|
getAllCrossMarginPairs(requestParameters = {}) {
|
|
2915
3729
|
return this.marketDataApi.getAllCrossMarginPairs(requestParameters);
|
|
@@ -2917,14 +3731,16 @@ var RestAPI = class {
|
|
|
2917
3731
|
/**
|
|
2918
3732
|
* Get All Isolated Margin Symbol
|
|
2919
3733
|
*
|
|
2920
|
-
* Weight: 10
|
|
3734
|
+
* Weight(IP): 10
|
|
3735
|
+
*
|
|
3736
|
+
* Security Type: MARKET_DATA
|
|
2921
3737
|
*
|
|
2922
|
-
* @summary Get All Isolated Margin Symbol(MARKET_DATA)
|
|
3738
|
+
* @summary Get All Isolated Margin Symbol (MARKET_DATA)
|
|
2923
3739
|
* @param {GetAllIsolatedMarginSymbolRequest} requestParameters Request parameters.
|
|
2924
3740
|
*
|
|
2925
3741
|
* @returns {Promise<RestApiResponse<GetAllIsolatedMarginSymbolResponse>>}
|
|
2926
3742
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
2927
|
-
* @see {@link https://developers.binance.com/docs/
|
|
3743
|
+
* @see {@link https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/market-data#get-all-isolated-margin-symbol Binance API Documentation}
|
|
2928
3744
|
*/
|
|
2929
3745
|
getAllIsolatedMarginSymbol(requestParameters = {}) {
|
|
2930
3746
|
return this.marketDataApi.getAllIsolatedMarginSymbol(requestParameters);
|
|
@@ -2932,14 +3748,16 @@ var RestAPI = class {
|
|
|
2932
3748
|
/**
|
|
2933
3749
|
* Get All Margin Assets.
|
|
2934
3750
|
*
|
|
2935
|
-
* Weight: 1
|
|
3751
|
+
* Weight(IP): 1
|
|
3752
|
+
*
|
|
3753
|
+
* Security Type: MARKET_DATA
|
|
2936
3754
|
*
|
|
2937
3755
|
* @summary Get All Margin Assets (MARKET_DATA)
|
|
2938
3756
|
* @param {GetAllMarginAssetsRequest} requestParameters Request parameters.
|
|
2939
3757
|
*
|
|
2940
3758
|
* @returns {Promise<RestApiResponse<GetAllMarginAssetsResponse>>}
|
|
2941
3759
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
2942
|
-
* @see {@link https://developers.binance.com/docs/
|
|
3760
|
+
* @see {@link https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/market-data#get-all-margin-assets Binance API Documentation}
|
|
2943
3761
|
*/
|
|
2944
3762
|
getAllMarginAssets(requestParameters = {}) {
|
|
2945
3763
|
return this.marketDataApi.getAllMarginAssets(requestParameters);
|
|
@@ -2947,33 +3765,48 @@ var RestAPI = class {
|
|
|
2947
3765
|
/**
|
|
2948
3766
|
* Get tokens or symbols delist schedule for cross margin and isolated margin
|
|
2949
3767
|
*
|
|
2950
|
-
* Weight: 100
|
|
3768
|
+
* Weight(IP): 100
|
|
3769
|
+
*
|
|
3770
|
+
* Security Type: MARKET_DATA
|
|
2951
3771
|
*
|
|
2952
3772
|
* @summary Get Delist Schedule (MARKET_DATA)
|
|
2953
3773
|
* @param {GetDelistScheduleRequest} requestParameters Request parameters.
|
|
2954
3774
|
*
|
|
2955
3775
|
* @returns {Promise<RestApiResponse<GetDelistScheduleResponse>>}
|
|
2956
3776
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
2957
|
-
* @see {@link https://developers.binance.com/docs/
|
|
3777
|
+
* @see {@link https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/market-data#get-delist-schedule Binance API Documentation}
|
|
2958
3778
|
*/
|
|
2959
3779
|
getDelistSchedule(requestParameters = {}) {
|
|
2960
3780
|
return this.marketDataApi.getDelistSchedule(requestParameters);
|
|
2961
3781
|
}
|
|
2962
3782
|
/**
|
|
2963
3783
|
* Query trading pairs with restriction on limit price range.
|
|
2964
|
-
* In margin trading, you can place orders with limit price. Limit price should be within (-15%, 15%) of current index price for a list of margin trading pairs. This rule only impacts limit sell orders with limit price that is lower than current index price and limit buy orders with limit price that is higher than current index price.
|
|
2965
3784
|
*
|
|
2966
|
-
*
|
|
2967
|
-
*
|
|
2968
|
-
*
|
|
3785
|
+
* In margin trading, you can place orders with limit price. Limit price
|
|
3786
|
+
* should be within (-15%, 15%) of current index price for a list of margin
|
|
3787
|
+
* trading pairs. This rule only impacts limit sell orders with limit price
|
|
3788
|
+
* that is lower than current index price and limit buy orders with limit
|
|
3789
|
+
* price that is higher than current index price.
|
|
3790
|
+
*
|
|
3791
|
+
* - Buy order: Your order will be rejected with an error message
|
|
3792
|
+
* notification if the limit price is 15% above the index price.
|
|
3793
|
+
*
|
|
3794
|
+
* - Sell order: Your order will be rejected with an error message
|
|
3795
|
+
* notification if the limit price is 15% below the index price.
|
|
2969
3796
|
*
|
|
2970
|
-
*
|
|
3797
|
+
* Please review the limit price order placing strategy, backtest and
|
|
3798
|
+
* calibrate the planned order size with the trading volume and order book
|
|
3799
|
+
* depth to prevent trading loss.
|
|
2971
3800
|
*
|
|
2972
|
-
*
|
|
3801
|
+
* Weight(IP): 1
|
|
3802
|
+
*
|
|
3803
|
+
* Security Type: MARKET_DATA
|
|
3804
|
+
*
|
|
3805
|
+
* @summary Get Limit Price Pairs (MARKET_DATA)
|
|
2973
3806
|
*
|
|
2974
3807
|
* @returns {Promise<RestApiResponse<GetLimitPricePairsResponse>>}
|
|
2975
3808
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
2976
|
-
* @see {@link https://developers.binance.com/docs/
|
|
3809
|
+
* @see {@link https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/market-data#get-limit-price-pairs Binance API Documentation}
|
|
2977
3810
|
*/
|
|
2978
3811
|
getLimitPricePairs() {
|
|
2979
3812
|
return this.marketDataApi.getLimitPricePairs();
|
|
@@ -2981,14 +3814,16 @@ var RestAPI = class {
|
|
|
2981
3814
|
/**
|
|
2982
3815
|
* Get the upcoming tokens or symbols listing schedule for Cross Margin and Isolated Margin.
|
|
2983
3816
|
*
|
|
2984
|
-
* Weight: 100
|
|
3817
|
+
* Weight(IP): 100
|
|
3818
|
+
*
|
|
3819
|
+
* Security Type: MARKET_DATA
|
|
2985
3820
|
*
|
|
2986
3821
|
* @summary Get list Schedule (MARKET_DATA)
|
|
2987
3822
|
* @param {GetListScheduleRequest} requestParameters Request parameters.
|
|
2988
3823
|
*
|
|
2989
3824
|
* @returns {Promise<RestApiResponse<GetListScheduleResponse>>}
|
|
2990
3825
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
2991
|
-
* @see {@link https://developers.binance.com/docs/
|
|
3826
|
+
* @see {@link https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/market-data#get-list-schedule Binance API Documentation}
|
|
2992
3827
|
*/
|
|
2993
3828
|
getListSchedule(requestParameters = {}) {
|
|
2994
3829
|
return this.marketDataApi.getListSchedule(requestParameters);
|
|
@@ -2996,27 +3831,31 @@ var RestAPI = class {
|
|
|
2996
3831
|
/**
|
|
2997
3832
|
* Get Margin Asset Risk-Based Liquidation Ratio
|
|
2998
3833
|
*
|
|
2999
|
-
* Weight: 1
|
|
3834
|
+
* Weight(IP): 1
|
|
3835
|
+
*
|
|
3836
|
+
* Security Type: MARKET_DATA
|
|
3000
3837
|
*
|
|
3001
3838
|
* @summary Get Margin Asset Risk-Based Liquidation Ratio (MARKET_DATA)
|
|
3002
3839
|
*
|
|
3003
3840
|
* @returns {Promise<RestApiResponse<GetMarginAssetRiskBasedLiquidationRatioResponse>>}
|
|
3004
3841
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
3005
|
-
* @see {@link https://developers.binance.com/docs/
|
|
3842
|
+
* @see {@link https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/market-data#get-margin-asset-risk-based-liquidation-ratio Binance API Documentation}
|
|
3006
3843
|
*/
|
|
3007
3844
|
getMarginAssetRiskBasedLiquidationRatio() {
|
|
3008
3845
|
return this.marketDataApi.getMarginAssetRiskBasedLiquidationRatio();
|
|
3009
3846
|
}
|
|
3010
3847
|
/**
|
|
3011
|
-
* Get
|
|
3848
|
+
* Get the list of margin-restricted assets.
|
|
3849
|
+
*
|
|
3850
|
+
* Weight(IP): 1
|
|
3012
3851
|
*
|
|
3013
|
-
*
|
|
3852
|
+
* Security Type: MARKET_DATA
|
|
3014
3853
|
*
|
|
3015
3854
|
* @summary Get Margin Restricted Assets (MARKET_DATA)
|
|
3016
3855
|
*
|
|
3017
3856
|
* @returns {Promise<RestApiResponse<GetMarginRestrictedAssetsResponse>>}
|
|
3018
3857
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
3019
|
-
* @see {@link https://developers.binance.com/docs/
|
|
3858
|
+
* @see {@link https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/market-data#get-margin-restricted-assets Binance API Documentation}
|
|
3020
3859
|
*/
|
|
3021
3860
|
getMarginRestrictedAssets() {
|
|
3022
3861
|
return this.marketDataApi.getMarginRestrictedAssets();
|
|
@@ -3024,14 +3863,16 @@ var RestAPI = class {
|
|
|
3024
3863
|
/**
|
|
3025
3864
|
* Get isolated margin tier data collection with any tier as https://www.binance.com/en/margin-data
|
|
3026
3865
|
*
|
|
3027
|
-
* Weight: 1
|
|
3866
|
+
* Weight(IP): 1
|
|
3867
|
+
*
|
|
3868
|
+
* Security Type: USER_DATA
|
|
3028
3869
|
*
|
|
3029
3870
|
* @summary Query Isolated Margin Tier Data (USER_DATA)
|
|
3030
3871
|
* @param {QueryIsolatedMarginTierDataRequest} requestParameters Request parameters.
|
|
3031
3872
|
*
|
|
3032
3873
|
* @returns {Promise<RestApiResponse<QueryIsolatedMarginTierDataResponse>>}
|
|
3033
3874
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
3034
|
-
* @see {@link https://developers.binance.com/docs/
|
|
3875
|
+
* @see {@link https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/market-data#query-isolated-margin-tier-data Binance API Documentation}
|
|
3035
3876
|
*/
|
|
3036
3877
|
queryIsolatedMarginTierData(requestParameters) {
|
|
3037
3878
|
return this.marketDataApi.queryIsolatedMarginTierData(requestParameters);
|
|
@@ -3039,13 +3880,15 @@ var RestAPI = class {
|
|
|
3039
3880
|
/**
|
|
3040
3881
|
* Liability Coin Leverage Bracket in Cross Margin Pro Mode
|
|
3041
3882
|
*
|
|
3042
|
-
* Weight: 1
|
|
3883
|
+
* Weight(IP): 1
|
|
3884
|
+
*
|
|
3885
|
+
* Security Type: MARKET_DATA
|
|
3043
3886
|
*
|
|
3044
|
-
* @summary Query Liability Coin Leverage Bracket in Cross Margin Pro Mode(MARKET_DATA)
|
|
3887
|
+
* @summary Query Liability Coin Leverage Bracket in Cross Margin Pro Mode (MARKET_DATA)
|
|
3045
3888
|
*
|
|
3046
3889
|
* @returns {Promise<RestApiResponse<QueryLiabilityCoinLeverageBracketInCrossMarginProModeResponse>>}
|
|
3047
3890
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
3048
|
-
* @see {@link https://developers.binance.com/docs/
|
|
3891
|
+
* @see {@link https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/market-data#query-liability-coin-leverage-bracket-in-cross-margin-pro-mode Binance API Documentation}
|
|
3049
3892
|
*/
|
|
3050
3893
|
queryLiabilityCoinLeverageBracketInCrossMarginProMode() {
|
|
3051
3894
|
return this.marketDataApi.queryLiabilityCoinLeverageBracketInCrossMarginProMode();
|
|
@@ -3053,14 +3896,16 @@ var RestAPI = class {
|
|
|
3053
3896
|
/**
|
|
3054
3897
|
* Margin available Inventory query
|
|
3055
3898
|
*
|
|
3056
|
-
* Weight: 50
|
|
3899
|
+
* Weight(UID): 50
|
|
3057
3900
|
*
|
|
3058
|
-
*
|
|
3901
|
+
* Security Type: USER_DATA
|
|
3902
|
+
*
|
|
3903
|
+
* @summary Query Margin Available Inventory (USER_DATA)
|
|
3059
3904
|
* @param {QueryMarginAvailableInventoryRequest} requestParameters Request parameters.
|
|
3060
3905
|
*
|
|
3061
3906
|
* @returns {Promise<RestApiResponse<QueryMarginAvailableInventoryResponse>>}
|
|
3062
3907
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
3063
|
-
* @see {@link https://developers.binance.com/docs/
|
|
3908
|
+
* @see {@link https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/market-data#query-margin-available-inventory Binance API Documentation}
|
|
3064
3909
|
*/
|
|
3065
3910
|
queryMarginAvailableInventory(requestParameters) {
|
|
3066
3911
|
return this.marketDataApi.queryMarginAvailableInventory(requestParameters);
|
|
@@ -3068,64 +3913,29 @@ var RestAPI = class {
|
|
|
3068
3913
|
/**
|
|
3069
3914
|
* Query Margin PriceIndex
|
|
3070
3915
|
*
|
|
3071
|
-
* Weight: 10
|
|
3916
|
+
* Weight(IP): 10
|
|
3917
|
+
*
|
|
3918
|
+
* Security Type: MARKET_DATA
|
|
3072
3919
|
*
|
|
3073
3920
|
* @summary Query Margin PriceIndex (MARKET_DATA)
|
|
3074
3921
|
* @param {QueryMarginPriceindexRequest} requestParameters Request parameters.
|
|
3075
3922
|
*
|
|
3076
3923
|
* @returns {Promise<RestApiResponse<QueryMarginPriceindexResponse>>}
|
|
3077
3924
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
3078
|
-
* @see {@link https://developers.binance.com/docs/
|
|
3925
|
+
* @see {@link https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/market-data#query-margin-priceindex Binance API Documentation}
|
|
3079
3926
|
*/
|
|
3080
3927
|
queryMarginPriceindex(requestParameters) {
|
|
3081
3928
|
return this.marketDataApi.queryMarginPriceindex(requestParameters);
|
|
3082
3929
|
}
|
|
3083
3930
|
/**
|
|
3084
|
-
*
|
|
3085
|
-
*
|
|
3086
|
-
* Weight: 3000
|
|
3087
|
-
*
|
|
3088
|
-
* @summary Close User Data Stream (USER_STREAM)
|
|
3089
|
-
*
|
|
3090
|
-
* @returns {Promise<RestApiResponse<void>>}
|
|
3091
|
-
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
3092
|
-
* @see {@link https://developers.binance.com/docs/margin_trading/risk-data-stream/Close-User-Data-Stream Binance API Documentation}
|
|
3093
|
-
*/
|
|
3094
|
-
closeUserDataStream() {
|
|
3095
|
-
return this.riskDataStreamApi.closeUserDataStream();
|
|
3096
|
-
}
|
|
3097
|
-
/**
|
|
3098
|
-
* Keepalive a user data stream to prevent a time out.
|
|
3099
|
-
*
|
|
3100
|
-
* Weight: 1
|
|
3101
|
-
*
|
|
3102
|
-
* @summary Keepalive User Data Stream (USER_STREAM)
|
|
3103
|
-
* @param {KeepaliveUserDataStreamRequest} requestParameters Request parameters.
|
|
3104
|
-
*
|
|
3105
|
-
* @returns {Promise<RestApiResponse<void>>}
|
|
3106
|
-
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
3107
|
-
* @see {@link https://developers.binance.com/docs/margin_trading/risk-data-stream/Keepalive-User-Data-Stream Binance API Documentation}
|
|
3108
|
-
*/
|
|
3109
|
-
keepaliveUserDataStream(requestParameters) {
|
|
3110
|
-
return this.riskDataStreamApi.keepaliveUserDataStream(requestParameters);
|
|
3111
|
-
}
|
|
3112
|
-
/**
|
|
3113
|
-
* Start a new user data stream.
|
|
3931
|
+
* **Eligibility**
|
|
3114
3932
|
*
|
|
3115
|
-
* Weight: 1
|
|
3116
|
-
*
|
|
3117
|
-
* @summary Start User Data Stream (USER_STREAM)
|
|
3118
|
-
*
|
|
3119
|
-
* @returns {Promise<RestApiResponse<StartUserDataStreamResponse>>}
|
|
3120
|
-
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
3121
|
-
* @see {@link https://developers.binance.com/docs/margin_trading/risk-data-stream/Start-User-Data-Stream Binance API Documentation}
|
|
3122
|
-
*/
|
|
3123
|
-
startUserDataStream() {
|
|
3124
|
-
return this.riskDataStreamApi.startUserDataStream();
|
|
3125
|
-
}
|
|
3126
|
-
/**
|
|
3127
3933
|
* - Binance Margin offers low-latency trading through a [special key](https://www.binance.com/en/support/faq/frequently-asked-questions-on-margin-special-api-key-3208663e900d4d2e9fec4140e1832f4e), available exclusively to users with VIP level 7 or higher.
|
|
3128
3934
|
* - If you are VIP level 6 or below, please contact your VIP manager for eligibility criterias.
|
|
3935
|
+
* - All new Margin Special Key users are required to read, understand, and agree to the Margin Special Key Supplemental Product Terms at the master account level before creating a Margin Special Key.
|
|
3936
|
+
* - Once signed at the master account level, the agreement applies to all sub-accounts. The master account and all sub-accounts (Cross Margin Classic and Portfolio Margin Pro) are authorized to create a Margin Special Key and are subject to the LiquidationLoan policy.
|
|
3937
|
+
*
|
|
3938
|
+
* For more information, please refer to [FAQ](https://www.binance.com/en/support/faq/detail/3208663e900d4d2e9fec4140e1832f4e).
|
|
3129
3939
|
*
|
|
3130
3940
|
**Supported Products:**
|
|
3131
3941
|
*
|
|
@@ -3145,67 +3955,144 @@ var RestAPI = class {
|
|
|
3145
3955
|
*
|
|
3146
3956
|
* We recommend to **use Ed25519 API keys** as it should provide the best performance and security out of all supported key types. We accept PKCS#8 (BEGIN PUBLIC KEY). For how to generate an RSA key pair to send API requests on Binance. Please refer to the document below [FAQ](https://www.binance.com/en/support/faq/how-to-generate-an-rsa-key-pair-to-send-api-requests-on-binance-2b79728f331e43079b27440d9d15c5db) .
|
|
3147
3957
|
*
|
|
3148
|
-
|
|
3958
|
+
**How to use the Margin Special Key**
|
|
3959
|
+
* - Use the below `sapi` endpoint to create your margin special API Key.
|
|
3960
|
+
* - For accessing the Cross Margin account, do not send the `symbol` parameter.
|
|
3961
|
+
* - For accessing the Isolated Margin account(s), pass the relevant `symbol` parameter in the API Key creation request.
|
|
3962
|
+
* - Use the generated API Key (and Secret key, if applicable) to perform margin trading and listenKey generation via **Spot** REST API (`https://api.binance.com/api/v3/*`) endpoints.
|
|
3963
|
+
*
|
|
3964
|
+
* Read [REST API](/products/spot/rest-api#signed-trade-and-user_data-endpoint-security) or [WebSocket API](/products/spot/web-socket-api#request-security) documentation to learn how to use different API keys
|
|
3965
|
+
*
|
|
3966
|
+
* You need to enable Permits “Enable Spot & Margin Trading” option for the API Key which requests this endpoint.
|
|
3967
|
+
*
|
|
3968
|
+
* Weight(UID): 1
|
|
3969
|
+
*
|
|
3970
|
+
* Security Type: TRADE
|
|
3149
3971
|
*
|
|
3150
|
-
*
|
|
3972
|
+
* Response Notes:
|
|
3973
|
+
* - Error Code Description
|
|
3974
|
+
*
|
|
3975
|
+
* - **UNSUPPORTED_OPERATION** : Portfolio Margin is an unsupported
|
|
3976
|
+
* product, please change the account type to a supported margin product.
|
|
3977
|
+
*
|
|
3978
|
+
* - **Forbidden**: Cross Margin Pro accounts require additional
|
|
3979
|
+
* agreements, please contact your relationship manager.
|
|
3980
|
+
*
|
|
3981
|
+
* @summary Create Special Key(Low-Latency Trading) (TRADE)
|
|
3151
3982
|
* @param {CreateSpecialKeyRequest} requestParameters Request parameters.
|
|
3152
3983
|
*
|
|
3153
3984
|
* @returns {Promise<RestApiResponse<CreateSpecialKeyResponse>>}
|
|
3154
3985
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
3155
|
-
* @see {@link https://developers.binance.com/docs/
|
|
3986
|
+
* @see {@link https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/trade#create-special-key Binance API Documentation}
|
|
3156
3987
|
*/
|
|
3157
3988
|
createSpecialKey(requestParameters) {
|
|
3158
3989
|
return this.tradeApi.createSpecialKey(requestParameters);
|
|
3159
3990
|
}
|
|
3160
3991
|
/**
|
|
3161
|
-
*
|
|
3992
|
+
* Deleting your Margin Special Key alone does not exit you from the Margin Special Key framework or discharge your obligations under the Margin Special Key Supplemental Product Terms. To fully exit, you must:
|
|
3162
3993
|
*
|
|
3163
|
-
*
|
|
3994
|
+
* 1. Delete your Margin Special Key.
|
|
3995
|
+
* 2. Ensure there are no outstanding liabilities on the account.
|
|
3996
|
+
* 3. Call the Exit Margin Special Key API endpoint.
|
|
3997
|
+
* 4. Confirm the exit status via the API response.
|
|
3164
3998
|
*
|
|
3165
|
-
*
|
|
3999
|
+
* Only after step 4 is completed and the exit status is confirmed by Binance will your account revert to standard liquidation logic and no longer be subject to the Margin Special Key Supplemental Product Terms.
|
|
4000
|
+
*
|
|
4001
|
+
* If apiKey is given, apiName will be ignored. If apiName is given with no
|
|
4002
|
+
* apiKey, all apikeys with given apiName will be deleted.
|
|
4003
|
+
*
|
|
4004
|
+
* You need to enable Permits “Enable Spot & Margin” option for the API Key
|
|
4005
|
+
* which requests this endpoint.
|
|
3166
4006
|
*
|
|
3167
|
-
* Weight: 1
|
|
4007
|
+
* Weight(UID): 1
|
|
3168
4008
|
*
|
|
3169
|
-
*
|
|
4009
|
+
* Security Type: TRADE
|
|
4010
|
+
*
|
|
4011
|
+
* @summary Delete Special Key(Low-Latency Trading) (TRADE)
|
|
3170
4012
|
* @param {DeleteSpecialKeyRequest} requestParameters Request parameters.
|
|
3171
4013
|
*
|
|
3172
4014
|
* @returns {Promise<RestApiResponse<void>>}
|
|
3173
4015
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
3174
|
-
* @see {@link https://developers.binance.com/docs/
|
|
4016
|
+
* @see {@link https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/trade#delete-special-key Binance API Documentation}
|
|
3175
4017
|
*/
|
|
3176
4018
|
deleteSpecialKey(requestParameters = {}) {
|
|
3177
4019
|
return this.tradeApi.deleteSpecialKey(requestParameters);
|
|
3178
4020
|
}
|
|
3179
4021
|
/**
|
|
3180
|
-
* Edit ip restriction. This only applies to Special Key for Low Latency
|
|
4022
|
+
* Edit ip restriction. This only applies to Special Key for Low Latency
|
|
4023
|
+
* Trading.
|
|
3181
4024
|
*
|
|
3182
|
-
* You need to enable Permits “Enable Spot & Margin
|
|
4025
|
+
* You need to enable Permits “Enable Spot & Margin” option for the API Key
|
|
4026
|
+
* which requests this endpoint.
|
|
3183
4027
|
*
|
|
3184
|
-
* Weight: 1
|
|
4028
|
+
* Weight(UID): 1
|
|
3185
4029
|
*
|
|
3186
|
-
*
|
|
4030
|
+
* Security Type: TRADE
|
|
4031
|
+
*
|
|
4032
|
+
* @summary Edit ip for Special Key(Low-Latency Trading) (TRADE)
|
|
3187
4033
|
* @param {EditIpForSpecialKeyRequest} requestParameters Request parameters.
|
|
3188
4034
|
*
|
|
3189
4035
|
* @returns {Promise<RestApiResponse<void>>}
|
|
3190
4036
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
3191
|
-
* @see {@link https://developers.binance.com/docs/
|
|
4037
|
+
* @see {@link https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/trade#edit-ip-for-special-key Binance API Documentation}
|
|
3192
4038
|
*/
|
|
3193
4039
|
editIpForSpecialKey(requestParameters) {
|
|
3194
4040
|
return this.tradeApi.editIpForSpecialKey(requestParameters);
|
|
3195
4041
|
}
|
|
3196
4042
|
/**
|
|
4043
|
+
* Exit the Margin Special Key mode for Cross Margin Classic accounts.
|
|
4044
|
+
*
|
|
4045
|
+
**All outstanding liabilities under the Cross Margin Classic account must be fully repaid before calling this endpoint.** Deleting the Margin Special Key alone does not constitute a valid exit.
|
|
4046
|
+
*
|
|
4047
|
+
* When a user creates a Margin Special API Key, the account enters "Special Key Mode". Upon a successful request, the following actions will be performed atomically:
|
|
4048
|
+
*
|
|
4049
|
+
* 1. All existing Margin Special API Keys under the Cross Margin Classic mode account will be deleted.
|
|
4050
|
+
* 2. All pre-execution margin checks (including Open-order-loss calculation) will revert to standard mode.
|
|
4051
|
+
* 3. A cooldown period (default: 24 hours) will be enforced, during which the account will not be permitted to create new Margin Special API Keys.
|
|
4052
|
+
*
|
|
4053
|
+
* For more information, please refer to [FAQ](https://www.binance.com/en/support/faq/detail/3208663e900d4d2e9fec4140e1832f4e).
|
|
4054
|
+
*
|
|
4055
|
+
**Preconditions:**
|
|
4056
|
+
*
|
|
4057
|
+
* The following conditions must be met; otherwise the request will be rejected:
|
|
4058
|
+
*
|
|
4059
|
+
* - Account type must be **Cross Margin Classic**.
|
|
4060
|
+
* - Account must currently be in **Special Key Mode**. If not, the request silently succeeds.
|
|
4061
|
+
* - Account must **not be in liquidation**.
|
|
4062
|
+
* - Account must **have no liability**.
|
|
4063
|
+
*
|
|
4064
|
+
* You need to enable "Permits Enable Spot & Margin Trading" option for the API Key which requests this endpoint.
|
|
4065
|
+
*
|
|
4066
|
+
* Weight(UID): 10
|
|
4067
|
+
*
|
|
4068
|
+
* Security Type: TRADE
|
|
4069
|
+
*
|
|
4070
|
+
* @summary Exit Special Key Mode (TRADE)
|
|
4071
|
+
* @param {ExitSpecialKeyModeRequest} requestParameters Request parameters.
|
|
4072
|
+
*
|
|
4073
|
+
* @returns {Promise<RestApiResponse<object>>}
|
|
4074
|
+
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
4075
|
+
* @see {@link https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/trade#exit-special-key-mode Binance API Documentation}
|
|
4076
|
+
*/
|
|
4077
|
+
exitSpecialKeyMode(requestParameters = {}) {
|
|
4078
|
+
return this.tradeApi.exitSpecialKeyMode(requestParameters);
|
|
4079
|
+
}
|
|
4080
|
+
/**
|
|
3197
4081
|
* Get Force Liquidation Record
|
|
3198
4082
|
*
|
|
3199
|
-
*
|
|
4083
|
+
* Weight(IP): 1
|
|
3200
4084
|
*
|
|
3201
|
-
*
|
|
4085
|
+
* Security Type: USER_DATA
|
|
4086
|
+
*
|
|
4087
|
+
* Notes:
|
|
4088
|
+
* - Response in descending order
|
|
3202
4089
|
*
|
|
3203
4090
|
* @summary Get Force Liquidation Record (USER_DATA)
|
|
3204
4091
|
* @param {GetForceLiquidationRecordRequest} requestParameters Request parameters.
|
|
3205
4092
|
*
|
|
3206
4093
|
* @returns {Promise<RestApiResponse<GetForceLiquidationRecordResponse>>}
|
|
3207
4094
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
3208
|
-
* @see {@link https://developers.binance.com/docs/
|
|
4095
|
+
* @see {@link https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/trade#get-force-liquidation-record Binance API Documentation}
|
|
3209
4096
|
*/
|
|
3210
4097
|
getForceLiquidationRecord(requestParameters = {}) {
|
|
3211
4098
|
return this.tradeApi.getForceLiquidationRecord(requestParameters);
|
|
@@ -3213,14 +4100,16 @@ var RestAPI = class {
|
|
|
3213
4100
|
/**
|
|
3214
4101
|
* Query the coins which can be small liability exchange
|
|
3215
4102
|
*
|
|
3216
|
-
* Weight: 100
|
|
4103
|
+
* Weight(IP): 100
|
|
4104
|
+
*
|
|
4105
|
+
* Security Type: USER_DATA
|
|
3217
4106
|
*
|
|
3218
4107
|
* @summary Get Small Liability Exchange Coin List (USER_DATA)
|
|
3219
4108
|
* @param {GetSmallLiabilityExchangeCoinListRequest} requestParameters Request parameters.
|
|
3220
4109
|
*
|
|
3221
4110
|
* @returns {Promise<RestApiResponse<GetSmallLiabilityExchangeCoinListResponse>>}
|
|
3222
4111
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
3223
|
-
* @see {@link https://developers.binance.com/docs/
|
|
4112
|
+
* @see {@link https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/trade#get-small-liability-exchange-coin-list Binance API Documentation}
|
|
3224
4113
|
*/
|
|
3225
4114
|
getSmallLiabilityExchangeCoinList(requestParameters = {}) {
|
|
3226
4115
|
return this.tradeApi.getSmallLiabilityExchangeCoinList(requestParameters);
|
|
@@ -3228,30 +4117,51 @@ var RestAPI = class {
|
|
|
3228
4117
|
/**
|
|
3229
4118
|
* Get Small liability Exchange History
|
|
3230
4119
|
*
|
|
3231
|
-
* Weight: 100
|
|
4120
|
+
* Weight(UID): 100
|
|
4121
|
+
*
|
|
4122
|
+
* Security Type: USER_DATA
|
|
3232
4123
|
*
|
|
3233
4124
|
* @summary Get Small Liability Exchange History (USER_DATA)
|
|
3234
4125
|
* @param {GetSmallLiabilityExchangeHistoryRequest} requestParameters Request parameters.
|
|
3235
4126
|
*
|
|
3236
4127
|
* @returns {Promise<RestApiResponse<GetSmallLiabilityExchangeHistoryResponse>>}
|
|
3237
4128
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
3238
|
-
* @see {@link https://developers.binance.com/docs/
|
|
4129
|
+
* @see {@link https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/trade#get-small-liability-exchange-history Binance API Documentation}
|
|
3239
4130
|
*/
|
|
3240
4131
|
getSmallLiabilityExchangeHistory(requestParameters) {
|
|
3241
4132
|
return this.tradeApi.getSmallLiabilityExchangeHistory(requestParameters);
|
|
3242
4133
|
}
|
|
3243
4134
|
/**
|
|
4135
|
+
* Repays the outstanding cross-margin liquidation loan from the user's spot wallet. A liquidation loan represents the account deficit incurred when account equity turns negative during liquidation (bankruptcy). The repayment amount must be greater than 0 and cannot exceed the remaining loan balance. If the Spot Account has insufficient USDC balance, the repayment will fail.
|
|
4136
|
+
*
|
|
4137
|
+
* Weight(UID): 100
|
|
4138
|
+
*
|
|
4139
|
+
* Security Type: MARGIN
|
|
4140
|
+
*
|
|
4141
|
+
* @summary Liquidation Loan Repay (MARGIN)
|
|
4142
|
+
* @param {LiquidationLoanRepayRequest} requestParameters Request parameters.
|
|
4143
|
+
*
|
|
4144
|
+
* @returns {Promise<RestApiResponse<LiquidationLoanRepayResponse>>}
|
|
4145
|
+
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
4146
|
+
* @see {@link https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/trade#liquidation-loan-repay Binance API Documentation}
|
|
4147
|
+
*/
|
|
4148
|
+
liquidationLoanRepay(requestParameters) {
|
|
4149
|
+
return this.tradeApi.liquidationLoanRepay(requestParameters);
|
|
4150
|
+
}
|
|
4151
|
+
/**
|
|
3244
4152
|
* Cancels all active orders on a symbol for margin account.<br></br>
|
|
3245
4153
|
* This includes OCO orders.
|
|
3246
4154
|
*
|
|
3247
|
-
* Weight: 1
|
|
4155
|
+
* Weight(IP): 1
|
|
4156
|
+
*
|
|
4157
|
+
* Security Type: TRADE
|
|
3248
4158
|
*
|
|
3249
4159
|
* @summary Margin Account Cancel all Open Orders on a Symbol (TRADE)
|
|
3250
4160
|
* @param {MarginAccountCancelAllOpenOrdersOnASymbolRequest} requestParameters Request parameters.
|
|
3251
4161
|
*
|
|
3252
4162
|
* @returns {Promise<RestApiResponse<MarginAccountCancelAllOpenOrdersOnASymbolResponse>>}
|
|
3253
4163
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
3254
|
-
* @see {@link https://developers.binance.com/docs/
|
|
4164
|
+
* @see {@link https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/trade#margin-account-cancel-all-open-orders-on-asymbol Binance API Documentation}
|
|
3255
4165
|
*/
|
|
3256
4166
|
marginAccountCancelAllOpenOrdersOnASymbol(requestParameters) {
|
|
3257
4167
|
return this.tradeApi.marginAccountCancelAllOpenOrdersOnASymbol(requestParameters);
|
|
@@ -3259,16 +4169,19 @@ var RestAPI = class {
|
|
|
3259
4169
|
/**
|
|
3260
4170
|
* Cancel an entire Order List for a margin account.
|
|
3261
4171
|
*
|
|
3262
|
-
*
|
|
4172
|
+
* Weight(UID): 1
|
|
4173
|
+
*
|
|
4174
|
+
* Security Type: TRADE
|
|
3263
4175
|
*
|
|
3264
|
-
*
|
|
4176
|
+
* Notes:
|
|
4177
|
+
* - Canceling an individual leg will cancel the entire OCO
|
|
3265
4178
|
*
|
|
3266
4179
|
* @summary Margin Account Cancel OCO (TRADE)
|
|
3267
4180
|
* @param {MarginAccountCancelOcoRequest} requestParameters Request parameters.
|
|
3268
4181
|
*
|
|
3269
4182
|
* @returns {Promise<RestApiResponse<MarginAccountCancelOcoResponse>>}
|
|
3270
4183
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
3271
|
-
* @see {@link https://developers.binance.com/docs/
|
|
4184
|
+
* @see {@link https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/trade#margin-account-cancel-oco Binance API Documentation}
|
|
3272
4185
|
*/
|
|
3273
4186
|
marginAccountCancelOco(requestParameters) {
|
|
3274
4187
|
return this.tradeApi.marginAccountCancelOco(requestParameters);
|
|
@@ -3276,16 +4189,19 @@ var RestAPI = class {
|
|
|
3276
4189
|
/**
|
|
3277
4190
|
* Cancel an active order for margin account.
|
|
3278
4191
|
*
|
|
3279
|
-
*
|
|
4192
|
+
* Weight(IP): 10
|
|
3280
4193
|
*
|
|
3281
|
-
*
|
|
4194
|
+
* Security Type: TRADE
|
|
4195
|
+
*
|
|
4196
|
+
* Notes:
|
|
4197
|
+
* - Either orderId or origClientOrderId must be sent.
|
|
3282
4198
|
*
|
|
3283
4199
|
* @summary Margin Account Cancel Order (TRADE)
|
|
3284
4200
|
* @param {MarginAccountCancelOrderRequest} requestParameters Request parameters.
|
|
3285
4201
|
*
|
|
3286
4202
|
* @returns {Promise<RestApiResponse<MarginAccountCancelOrderResponse>>}
|
|
3287
4203
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
3288
|
-
* @see {@link https://developers.binance.com/docs/
|
|
4204
|
+
* @see {@link https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/trade#margin-account-cancel-order Binance API Documentation}
|
|
3289
4205
|
*/
|
|
3290
4206
|
marginAccountCancelOrder(requestParameters) {
|
|
3291
4207
|
return this.tradeApi.marginAccountCancelOrder(requestParameters);
|
|
@@ -3293,16 +4209,19 @@ var RestAPI = class {
|
|
|
3293
4209
|
/**
|
|
3294
4210
|
* Send in a new OCO for a margin account
|
|
3295
4211
|
*
|
|
3296
|
-
*
|
|
4212
|
+
* Weight: 6(UID) or 1500(UID) when sideEffectType is MARGIN_BUY or AUTO_BORROW_REPAY
|
|
4213
|
+
*
|
|
4214
|
+
* Security Type: TRADE
|
|
3297
4215
|
*
|
|
3298
|
-
*
|
|
4216
|
+
* Notes:
|
|
4217
|
+
* - autoRepayAtCancel is suggested to set as “FALSE” to keep liability unrepaid under high frequent new order/cancel order execution
|
|
3299
4218
|
*
|
|
3300
4219
|
* @summary Margin Account New OCO (TRADE)
|
|
3301
4220
|
* @param {MarginAccountNewOcoRequest} requestParameters Request parameters.
|
|
3302
4221
|
*
|
|
3303
4222
|
* @returns {Promise<RestApiResponse<MarginAccountNewOcoResponse>>}
|
|
3304
4223
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
3305
|
-
* @see {@link https://developers.binance.com/docs/
|
|
4224
|
+
* @see {@link https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/trade#margin-account-new-oco Binance API Documentation}
|
|
3306
4225
|
*/
|
|
3307
4226
|
marginAccountNewOco(requestParameters) {
|
|
3308
4227
|
return this.tradeApi.marginAccountNewOco(requestParameters);
|
|
@@ -3310,16 +4229,19 @@ var RestAPI = class {
|
|
|
3310
4229
|
/**
|
|
3311
4230
|
* Post a new order for margin account.
|
|
3312
4231
|
*
|
|
3313
|
-
*
|
|
4232
|
+
* Weight: 6(UID) or 1500(UID) when sideEffectType is MARGIN_BUY or AUTO_BORROW_REPAY
|
|
3314
4233
|
*
|
|
3315
|
-
*
|
|
4234
|
+
* Security Type: TRADE
|
|
4235
|
+
*
|
|
4236
|
+
* Notes:
|
|
4237
|
+
* - autoRepayAtCancel is suggested to set as “FALSE” to keep liability unrepaid under high frequent new order/cancel order execution
|
|
3316
4238
|
*
|
|
3317
4239
|
* @summary Margin Account New Order (TRADE)
|
|
3318
4240
|
* @param {MarginAccountNewOrderRequest} requestParameters Request parameters.
|
|
3319
4241
|
*
|
|
3320
4242
|
* @returns {Promise<RestApiResponse<MarginAccountNewOrderResponse>>}
|
|
3321
4243
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
3322
|
-
* @see {@link https://developers.binance.com/docs/
|
|
4244
|
+
* @see {@link https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/trade#margin-account-new-order Binance API Documentation}
|
|
3323
4245
|
*/
|
|
3324
4246
|
marginAccountNewOrder(requestParameters) {
|
|
3325
4247
|
return this.tradeApi.marginAccountNewOrder(requestParameters);
|
|
@@ -3327,24 +4249,45 @@ var RestAPI = class {
|
|
|
3327
4249
|
/**
|
|
3328
4250
|
* Post a new OTO order for margin account:
|
|
3329
4251
|
*
|
|
3330
|
-
* - An OTO (One-Triggers-the-Other) is an order list comprised of 2
|
|
3331
|
-
*
|
|
3332
|
-
*
|
|
3333
|
-
* -
|
|
3334
|
-
*
|
|
3335
|
-
*
|
|
4252
|
+
* - An OTO (One-Triggers-the-Other) is an order list comprised of 2
|
|
4253
|
+
* orders.
|
|
4254
|
+
*
|
|
4255
|
+
* - The first order is called the **working order** and must be `LIMIT` or
|
|
4256
|
+
* `LIMIT_MAKER`. Initially, only the working order goes on the order book.
|
|
4257
|
+
*
|
|
4258
|
+
* - The second order is called the **pending order**. It can be any order
|
|
4259
|
+
* type except for `MARKET` orders using parameter `quoteOrderQty`. The
|
|
4260
|
+
* pending order is only placed on the order book when the working order
|
|
4261
|
+
* gets **fully filled**.
|
|
3336
4262
|
*
|
|
3337
|
-
*
|
|
3338
|
-
*
|
|
4263
|
+
* - If either the working order or the pending order is cancelled
|
|
4264
|
+
* individually, the other order in the order list will also be canceled or
|
|
4265
|
+
* expired.
|
|
3339
4266
|
*
|
|
3340
|
-
*
|
|
4267
|
+
* - When the order list is placed, if the working order gets **immediately
|
|
4268
|
+
* fully filled**, the placement response will show the working order as
|
|
4269
|
+
* `FILLED` but the pending order will still appear as `PENDING_NEW`. You
|
|
4270
|
+
* need to query the status of the pending order again to see its updated
|
|
4271
|
+
* status.
|
|
4272
|
+
*
|
|
4273
|
+
* - OTOs add **2 orders** to the unfilled order count,
|
|
4274
|
+
* `EXCHANGE_MAX_NUM_ORDERS` filter and `MAX_NUM_ORDERS` filter.
|
|
4275
|
+
*
|
|
4276
|
+
* Weight: 6(UID) or 1500(UID) when sideEffectType is MARGIN_BUY or AUTO_BORROW_REPAY
|
|
4277
|
+
*
|
|
4278
|
+
* Security Type: TRADE
|
|
4279
|
+
*
|
|
4280
|
+
* Notes:
|
|
4281
|
+
* - autoRepayAtCancel is suggested to set as “FALSE” to keep liability unrepaid under high frequent new order/cancel order execution
|
|
4282
|
+
* - Depending on the `pendingType` or `workingType`, some optional
|
|
4283
|
+
* - parameters will become mandatory: | Type | Additional mandatory parameters | Additional information | | -------------------------------------------------------- | ------------------------------------------------------------ | ---------------------- | | `workingType` = `LIMIT` | `workingTimeInForce` | | | `pendingType` = `LIMIT` | `pendingPrice`, `pendingTimeInForce` | | | `pendingType` = `STOP_LOSS` or `TAKE_PROFIT` | `pendingStopPrice` and/or `pendingTrailingDelta` | | | `pendingType` = `STOP_LOSS_LIMIT` or `TAKE_PROFIT_LIMIT` | `pendingPrice`, `pendingStopPrice` and/or `pendingTrailingDelta`, `pendingTimeInForce` | | | `pendingTrailingDelta` is provided | `pendingPrice` | |
|
|
3341
4284
|
*
|
|
3342
4285
|
* @summary Margin Account New OTO (TRADE)
|
|
3343
4286
|
* @param {MarginAccountNewOtoRequest} requestParameters Request parameters.
|
|
3344
4287
|
*
|
|
3345
4288
|
* @returns {Promise<RestApiResponse<MarginAccountNewOtoResponse>>}
|
|
3346
4289
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
3347
|
-
* @see {@link https://developers.binance.com/docs/
|
|
4290
|
+
* @see {@link https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/trade#margin-account-new-oto Binance API Documentation}
|
|
3348
4291
|
*/
|
|
3349
4292
|
marginAccountNewOto(requestParameters) {
|
|
3350
4293
|
return this.tradeApi.marginAccountNewOto(requestParameters);
|
|
@@ -3352,24 +4295,34 @@ var RestAPI = class {
|
|
|
3352
4295
|
/**
|
|
3353
4296
|
* Post a new OTOCO order for margin account:
|
|
3354
4297
|
*
|
|
3355
|
-
*
|
|
3356
|
-
* -
|
|
4298
|
+
*
|
|
4299
|
+
* - An OTOCO (One-Triggers-One-Cancels-the-Other) is an order list
|
|
4300
|
+
* comprised of 3 orders.
|
|
4301
|
+
*
|
|
4302
|
+
* - The first order is called the **working order** and must be `LIMIT` or
|
|
4303
|
+
* `LIMIT_MAKER`. Initially, only the working order goes on the order book.
|
|
3357
4304
|
* - The behavior of the working order is the same as the OTO.
|
|
3358
|
-
* - OTOCO has 2 pending orders (pending above and pending below), forming
|
|
3359
|
-
*
|
|
3360
|
-
*
|
|
4305
|
+
* - OTOCO has 2 pending orders (pending above and pending below), forming
|
|
4306
|
+
* an OCO pair. The pending orders are only placed on the order book when
|
|
4307
|
+
* the working order gets **fully filled**.
|
|
4308
|
+
* - The rules of the pending above and pending below follow the same rules as the [Order List OCO](https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/trade#margin-account-new-oco).
|
|
4309
|
+
* - OTOCOs add **3 orders** against the unfilled order count,
|
|
4310
|
+
* `EXCHANGE_MAX_NUM_ORDERS` filter, and `MAX_NUM_ORDERS` filter.
|
|
3361
4311
|
*
|
|
3362
|
-
*
|
|
3363
|
-
* Depending on the `pendingAboveType`/`pendingBelowType` or `workingType`, some optional parameters will become mandatory:
|
|
4312
|
+
* Weight: 6(UID) or 1500(UID) when sideEffectType is MARGIN_BUY or AUTO_BORROW_REPAY
|
|
3364
4313
|
*
|
|
3365
|
-
*
|
|
4314
|
+
* Security Type: TRADE
|
|
4315
|
+
*
|
|
4316
|
+
* Notes:
|
|
4317
|
+
* - autoRepayAtCancel is suggested to set as “FALSE” to keep liability unrepaid under high frequent new order/cancel order execution
|
|
4318
|
+
* - Depending on the `pendingAboveType`/`pendingBelowType` or `workingType`, some optional parameters will become mandatory: | Type | Additional mandatory parameters | Additional information | | ------------------------------------ | ------------------------------------------------------------ | ---------------------- | | `workingType` = `LIMIT` | `workingTimeInForce` | | | `pendingAboveType`= `LIMIT_MAKER` | `pendingAbovePrice` | | | `pendingAboveType`= `STOP_LOSS` | `pendingAboveStopPrice` and/or `pendingAboveTrailingDelta` | | | `pendingAboveType`=`STOP_LOSS_LIMIT` | `pendingAbovePrice`, `pendingAboveStopPrice` and/or `pendingAboveTrailingDelta`, `pendingAboveTimeInForce` | | | `pendingBelowType`= `LIMIT_MAKER` | `pendingBelowPrice` | | | `pendingBelowType`= `STOP_LOSS` | `pendingBelowStopPrice` and/or `pendingBelowTrailingDelta` | | | `pendingBelowType`=`STOP_LOSS_LIMIT` | `pendingBelowPrice`, `pendingBelowStopPrice` and/or `pendingBelowTrailingDelta`, `pendingBelowTimeInForce` | | | `pendingAboveTrailingDelta` is provided | `pendingAbovePrice` | | | `pendingBelowTrailingDelta` is provided | `pendingBelowPrice` | |
|
|
3366
4319
|
*
|
|
3367
4320
|
* @summary Margin Account New OTOCO (TRADE)
|
|
3368
4321
|
* @param {MarginAccountNewOtocoRequest} requestParameters Request parameters.
|
|
3369
4322
|
*
|
|
3370
4323
|
* @returns {Promise<RestApiResponse<MarginAccountNewOtocoResponse>>}
|
|
3371
4324
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
3372
|
-
* @see {@link https://developers.binance.com/docs/
|
|
4325
|
+
* @see {@link https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/trade#margin-account-new-otoco Binance API Documentation}
|
|
3373
4326
|
*/
|
|
3374
4327
|
marginAccountNewOtoco(requestParameters) {
|
|
3375
4328
|
return this.tradeApi.marginAccountNewOtoco(requestParameters);
|
|
@@ -3377,17 +4330,20 @@ var RestAPI = class {
|
|
|
3377
4330
|
/**
|
|
3378
4331
|
* Margin Manual Liquidation
|
|
3379
4332
|
*
|
|
3380
|
-
*
|
|
3381
|
-
*
|
|
4333
|
+
* Weight(UID): 3000
|
|
4334
|
+
*
|
|
4335
|
+
* Security Type: TRADE
|
|
3382
4336
|
*
|
|
3383
|
-
*
|
|
4337
|
+
* Notes:
|
|
4338
|
+
* - This endpoint supports Cross Margin Classic Mode and Pro Mode.
|
|
4339
|
+
* - Isolated Margin is only supported in restricted regions.
|
|
3384
4340
|
*
|
|
3385
|
-
* @summary Margin Manual Liquidation(
|
|
4341
|
+
* @summary Margin Manual Liquidation (TRADE)
|
|
3386
4342
|
* @param {MarginManualLiquidationRequest} requestParameters Request parameters.
|
|
3387
4343
|
*
|
|
3388
4344
|
* @returns {Promise<RestApiResponse<MarginManualLiquidationResponse>>}
|
|
3389
4345
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
3390
|
-
* @see {@link https://developers.binance.com/docs/
|
|
4346
|
+
* @see {@link https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/trade#margin-manual-liquidation Binance API Documentation}
|
|
3391
4347
|
*/
|
|
3392
4348
|
marginManualLiquidation(requestParameters) {
|
|
3393
4349
|
return this.tradeApi.marginManualLiquidation(requestParameters);
|
|
@@ -3395,29 +4351,71 @@ var RestAPI = class {
|
|
|
3395
4351
|
/**
|
|
3396
4352
|
* Displays the user's current margin order count usage for all intervals.
|
|
3397
4353
|
*
|
|
3398
|
-
* Weight: 20
|
|
4354
|
+
* Weight(IP): 20
|
|
4355
|
+
*
|
|
4356
|
+
* Security Type: TRADE
|
|
3399
4357
|
*
|
|
3400
4358
|
* @summary Query Current Margin Order Count Usage (TRADE)
|
|
3401
4359
|
* @param {QueryCurrentMarginOrderCountUsageRequest} requestParameters Request parameters.
|
|
3402
4360
|
*
|
|
3403
4361
|
* @returns {Promise<RestApiResponse<QueryCurrentMarginOrderCountUsageResponse>>}
|
|
3404
4362
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
3405
|
-
* @see {@link https://developers.binance.com/docs/
|
|
4363
|
+
* @see {@link https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/trade#query-current-margin-order-count-usage Binance API Documentation}
|
|
3406
4364
|
*/
|
|
3407
4365
|
queryCurrentMarginOrderCountUsage(requestParameters = {}) {
|
|
3408
4366
|
return this.tradeApi.queryCurrentMarginOrderCountUsage(requestParameters);
|
|
3409
4367
|
}
|
|
3410
4368
|
/**
|
|
4369
|
+
* Query the current user's cross-margin liquidation loan information, including the original loan amount, repaid amount, and remaining amount. When a cross-margin account is liquidated and the account equity turns negative (bankruptcy), the system generates a liquidation loan record representing the deficit. This represents the shortfall amount denominated in USDC.
|
|
4370
|
+
*
|
|
4371
|
+
* Weight(UID): 100
|
|
4372
|
+
*
|
|
4373
|
+
* Security Type: USER_DATA
|
|
4374
|
+
*
|
|
4375
|
+
* @summary Query Liquidation Loan (USER_DATA)
|
|
4376
|
+
* @param {QueryLiquidationLoanRequest} requestParameters Request parameters.
|
|
4377
|
+
*
|
|
4378
|
+
* @returns {Promise<RestApiResponse<QueryLiquidationLoanResponse>>}
|
|
4379
|
+
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
4380
|
+
* @see {@link https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/trade#query-liquidation-loan Binance API Documentation}
|
|
4381
|
+
*/
|
|
4382
|
+
queryLiquidationLoan(requestParameters = {}) {
|
|
4383
|
+
return this.tradeApi.queryLiquidationLoan(requestParameters);
|
|
4384
|
+
}
|
|
4385
|
+
/**
|
|
4386
|
+
* Query the repayment history of cross-margin liquidation loans (deficit caused by bankruptcy during liquidation). Supports time-range filtering and pagination.
|
|
4387
|
+
*
|
|
4388
|
+
* Weight(UID): 100
|
|
4389
|
+
*
|
|
4390
|
+
* Security Type: USER_DATA
|
|
4391
|
+
*
|
|
4392
|
+
* Notes:
|
|
4393
|
+
* - The maximum query range is 90 days. If `startTime` is earlier than 90 days ago, it will be clamped to 90 days ago.
|
|
4394
|
+
* - Only records with status `SUCCESS` or `PENDING` are returned. Failed repayment records are excluded.
|
|
4395
|
+
*
|
|
4396
|
+
* @summary Query Liquidation Loan Repay History (USER_DATA)
|
|
4397
|
+
* @param {QueryLiquidationLoanRepayHistoryRequest} requestParameters Request parameters.
|
|
4398
|
+
*
|
|
4399
|
+
* @returns {Promise<RestApiResponse<QueryLiquidationLoanRepayHistoryResponse>>}
|
|
4400
|
+
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
4401
|
+
* @see {@link https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/trade#query-liquidation-loan-repay-history Binance API Documentation}
|
|
4402
|
+
*/
|
|
4403
|
+
queryLiquidationLoanRepayHistory(requestParameters = {}) {
|
|
4404
|
+
return this.tradeApi.queryLiquidationLoanRepayHistory(requestParameters);
|
|
4405
|
+
}
|
|
4406
|
+
/**
|
|
3411
4407
|
* Retrieves all OCO for a specific margin account based on provided optional parameters
|
|
3412
4408
|
*
|
|
3413
|
-
* Weight: 200
|
|
4409
|
+
* Weight(IP): 200
|
|
4410
|
+
*
|
|
4411
|
+
* Security Type: USER_DATA
|
|
3414
4412
|
*
|
|
3415
4413
|
* @summary Query Margin Account\'s all OCO (USER_DATA)
|
|
3416
4414
|
* @param {QueryMarginAccountsAllOcoRequest} requestParameters Request parameters.
|
|
3417
4415
|
*
|
|
3418
4416
|
* @returns {Promise<RestApiResponse<QueryMarginAccountsAllOcoResponse>>}
|
|
3419
4417
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
3420
|
-
* @see {@link https://developers.binance.com/docs/
|
|
4418
|
+
* @see {@link https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/trade#query-margin-accounts-all-oco Binance API Documentation}
|
|
3421
4419
|
*/
|
|
3422
4420
|
queryMarginAccountsAllOco(requestParameters = {}) {
|
|
3423
4421
|
return this.tradeApi.queryMarginAccountsAllOco(requestParameters);
|
|
@@ -3425,18 +4423,25 @@ var RestAPI = class {
|
|
|
3425
4423
|
/**
|
|
3426
4424
|
* Query Margin Account's All Orders
|
|
3427
4425
|
*
|
|
3428
|
-
*
|
|
3429
|
-
*
|
|
3430
|
-
*
|
|
4426
|
+
* Weight(IP): 200
|
|
4427
|
+
*
|
|
4428
|
+
* Security Type: USER_DATA
|
|
4429
|
+
*
|
|
4430
|
+
* Notes:
|
|
4431
|
+
* - If orderId is set, it will get orders >= that orderId. Otherwise the
|
|
4432
|
+
* orders within 24 hours are returned.
|
|
4433
|
+
*
|
|
4434
|
+
* - For some historical orders cummulativeQuoteQty will be < 0, meaning
|
|
4435
|
+
* the data is not available at this time.
|
|
3431
4436
|
*
|
|
3432
|
-
*
|
|
4437
|
+
* - Less than 24 hours between startTime and endTime.
|
|
3433
4438
|
*
|
|
3434
4439
|
* @summary Query Margin Account\'s All Orders (USER_DATA)
|
|
3435
4440
|
* @param {QueryMarginAccountsAllOrdersRequest} requestParameters Request parameters.
|
|
3436
4441
|
*
|
|
3437
4442
|
* @returns {Promise<RestApiResponse<QueryMarginAccountsAllOrdersResponse>>}
|
|
3438
4443
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
3439
|
-
* @see {@link https://developers.binance.com/docs/
|
|
4444
|
+
* @see {@link https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/trade#query-margin-accounts-all-orders Binance API Documentation}
|
|
3440
4445
|
*/
|
|
3441
4446
|
queryMarginAccountsAllOrders(requestParameters) {
|
|
3442
4447
|
return this.tradeApi.queryMarginAccountsAllOrders(requestParameters);
|
|
@@ -3444,14 +4449,16 @@ var RestAPI = class {
|
|
|
3444
4449
|
/**
|
|
3445
4450
|
* Retrieves a specific OCO based on provided optional parameters
|
|
3446
4451
|
*
|
|
3447
|
-
* Weight: 10
|
|
4452
|
+
* Weight(IP): 10
|
|
4453
|
+
*
|
|
4454
|
+
* Security Type: USER_DATA
|
|
3448
4455
|
*
|
|
3449
4456
|
* @summary Query Margin Account\'s OCO (USER_DATA)
|
|
3450
4457
|
* @param {QueryMarginAccountsOcoRequest} requestParameters Request parameters.
|
|
3451
4458
|
*
|
|
3452
4459
|
* @returns {Promise<RestApiResponse<QueryMarginAccountsOcoResponse>>}
|
|
3453
4460
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
3454
|
-
* @see {@link https://developers.binance.com/docs/
|
|
4461
|
+
* @see {@link https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/trade#query-margin-accounts-oco Binance API Documentation}
|
|
3455
4462
|
*/
|
|
3456
4463
|
queryMarginAccountsOco(requestParameters = {}) {
|
|
3457
4464
|
return this.tradeApi.queryMarginAccountsOco(requestParameters);
|
|
@@ -3459,14 +4466,16 @@ var RestAPI = class {
|
|
|
3459
4466
|
/**
|
|
3460
4467
|
* Query Margin Account's Open OCO
|
|
3461
4468
|
*
|
|
3462
|
-
* Weight: 10
|
|
4469
|
+
* Weight(IP): 10
|
|
4470
|
+
*
|
|
4471
|
+
* Security Type: USER_DATA
|
|
3463
4472
|
*
|
|
3464
4473
|
* @summary Query Margin Account\'s Open OCO (USER_DATA)
|
|
3465
4474
|
* @param {QueryMarginAccountsOpenOcoRequest} requestParameters Request parameters.
|
|
3466
4475
|
*
|
|
3467
4476
|
* @returns {Promise<RestApiResponse<QueryMarginAccountsOpenOcoResponse>>}
|
|
3468
4477
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
3469
|
-
* @see {@link https://developers.binance.com/docs/
|
|
4478
|
+
* @see {@link https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/trade#query-margin-accounts-open-oco Binance API Documentation}
|
|
3470
4479
|
*/
|
|
3471
4480
|
queryMarginAccountsOpenOco(requestParameters = {}) {
|
|
3472
4481
|
return this.tradeApi.queryMarginAccountsOpenOco(requestParameters);
|
|
@@ -3474,18 +4483,26 @@ var RestAPI = class {
|
|
|
3474
4483
|
/**
|
|
3475
4484
|
* Query Margin Account's Open Orders
|
|
3476
4485
|
*
|
|
3477
|
-
*
|
|
3478
|
-
*
|
|
3479
|
-
*
|
|
4486
|
+
* Weight(IP): 10
|
|
4487
|
+
*
|
|
4488
|
+
* Security Type: USER_DATA
|
|
4489
|
+
*
|
|
4490
|
+
* Notes:
|
|
4491
|
+
* - If the symbol is not sent, orders for all symbols will be returned in
|
|
4492
|
+
* an array.
|
|
3480
4493
|
*
|
|
3481
|
-
*
|
|
4494
|
+
* - When all symbols are returned, the number of requests counted against
|
|
4495
|
+
* the rate limiter is equal to the number of symbols currently trading on
|
|
4496
|
+
* the exchange.
|
|
4497
|
+
*
|
|
4498
|
+
* - If isIsolated ="TRUE", symbol must be sent.
|
|
3482
4499
|
*
|
|
3483
4500
|
* @summary Query Margin Account\'s Open Orders (USER_DATA)
|
|
3484
4501
|
* @param {QueryMarginAccountsOpenOrdersRequest} requestParameters Request parameters.
|
|
3485
4502
|
*
|
|
3486
4503
|
* @returns {Promise<RestApiResponse<QueryMarginAccountsOpenOrdersResponse>>}
|
|
3487
4504
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
3488
|
-
* @see {@link https://developers.binance.com/docs/
|
|
4505
|
+
* @see {@link https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/trade#query-margin-accounts-open-orders Binance API Documentation}
|
|
3489
4506
|
*/
|
|
3490
4507
|
queryMarginAccountsOpenOrders(requestParameters = {}) {
|
|
3491
4508
|
return this.tradeApi.queryMarginAccountsOpenOrders(requestParameters);
|
|
@@ -3493,17 +4510,22 @@ var RestAPI = class {
|
|
|
3493
4510
|
/**
|
|
3494
4511
|
* Query Margin Account's Order
|
|
3495
4512
|
*
|
|
3496
|
-
*
|
|
3497
|
-
*
|
|
4513
|
+
* Weight(IP): 10
|
|
4514
|
+
*
|
|
4515
|
+
* Security Type: USER_DATA
|
|
3498
4516
|
*
|
|
3499
|
-
*
|
|
4517
|
+
* Notes:
|
|
4518
|
+
* - Either orderId or origClientOrderId must be sent.
|
|
4519
|
+
*
|
|
4520
|
+
* - For some historical orders cummulativeQuoteQty will be < 0, meaning
|
|
4521
|
+
* the data is not available at this time.
|
|
3500
4522
|
*
|
|
3501
4523
|
* @summary Query Margin Account\'s Order (USER_DATA)
|
|
3502
4524
|
* @param {QueryMarginAccountsOrderRequest} requestParameters Request parameters.
|
|
3503
4525
|
*
|
|
3504
4526
|
* @returns {Promise<RestApiResponse<QueryMarginAccountsOrderResponse>>}
|
|
3505
4527
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
3506
|
-
* @see {@link https://developers.binance.com/docs/
|
|
4528
|
+
* @see {@link https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/trade#query-margin-accounts-order Binance API Documentation}
|
|
3507
4529
|
*/
|
|
3508
4530
|
queryMarginAccountsOrder(requestParameters) {
|
|
3509
4531
|
return this.tradeApi.queryMarginAccountsOrder(requestParameters);
|
|
@@ -3511,31 +4533,58 @@ var RestAPI = class {
|
|
|
3511
4533
|
/**
|
|
3512
4534
|
* Query Margin Account's Trade List
|
|
3513
4535
|
*
|
|
3514
|
-
*
|
|
3515
|
-
*
|
|
4536
|
+
* Weight(IP): 10
|
|
4537
|
+
*
|
|
4538
|
+
* Security Type: USER_DATA
|
|
3516
4539
|
*
|
|
3517
|
-
*
|
|
4540
|
+
* Notes:
|
|
4541
|
+
* - If fromId is set, it will get trades >= that fromId. Otherwise the
|
|
4542
|
+
* trades within 24 hours are returned.
|
|
4543
|
+
*
|
|
4544
|
+
* - Less than 24 hours between startTime and endTime.
|
|
3518
4545
|
*
|
|
3519
4546
|
* @summary Query Margin Account\'s Trade List (USER_DATA)
|
|
3520
4547
|
* @param {QueryMarginAccountsTradeListRequest} requestParameters Request parameters.
|
|
3521
4548
|
*
|
|
3522
4549
|
* @returns {Promise<RestApiResponse<QueryMarginAccountsTradeListResponse>>}
|
|
3523
4550
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
3524
|
-
* @see {@link https://developers.binance.com/docs/
|
|
4551
|
+
* @see {@link https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/trade#query-margin-accounts-trade-list Binance API Documentation}
|
|
3525
4552
|
*/
|
|
3526
4553
|
queryMarginAccountsTradeList(requestParameters) {
|
|
3527
4554
|
return this.tradeApi.queryMarginAccountsTradeList(requestParameters);
|
|
3528
4555
|
}
|
|
3529
4556
|
/**
|
|
4557
|
+
* Displays the list of orders that were expired due to STP. (Self-Trade Prevention).
|
|
4558
|
+
*
|
|
4559
|
+
* Weight(IP): 10
|
|
4560
|
+
*
|
|
4561
|
+
* Security Type: USER_DATA
|
|
4562
|
+
*
|
|
4563
|
+
* Notes:
|
|
4564
|
+
* - Supported parameter combinations:
|
|
4565
|
+
*
|
|
4566
|
+
* - `symbol` + `preventedMatchId`
|
|
4567
|
+
*
|
|
4568
|
+
* - `symbol` + `orderId`
|
|
4569
|
+
*
|
|
4570
|
+
* - `symbol` + `orderId` + `fromPreventedMatchId`
|
|
3530
4571
|
*
|
|
3531
|
-
*
|
|
4572
|
+
* - If `orderId` is provided, all prevented matches for that order will be
|
|
4573
|
+
* returned.
|
|
3532
4574
|
*
|
|
3533
|
-
*
|
|
4575
|
+
* - If `preventedMatchId` is provided, the specific prevented match will
|
|
4576
|
+
* be returned.
|
|
4577
|
+
*
|
|
4578
|
+
* - A single request returns a maximum of 500 records. If there are more
|
|
4579
|
+
* than 500 records, use `symbol` + `orderId` + `fromPreventedMatchId`
|
|
4580
|
+
* combination for pagination.
|
|
4581
|
+
*
|
|
4582
|
+
* @summary Query Prevented Matches (USER_DATA)
|
|
3534
4583
|
* @param {QueryPreventedMatchesRequest} requestParameters Request parameters.
|
|
3535
4584
|
*
|
|
3536
4585
|
* @returns {Promise<RestApiResponse<QueryPreventedMatchesResponse>>}
|
|
3537
4586
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
3538
|
-
* @see {@link https://developers.binance.com/docs/
|
|
4587
|
+
* @see {@link https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/trade#query-prevented-matches Binance API Documentation}
|
|
3539
4588
|
*/
|
|
3540
4589
|
queryPreventedMatches(requestParameters) {
|
|
3541
4590
|
return this.tradeApi.queryPreventedMatches(requestParameters);
|
|
@@ -3545,14 +4594,16 @@ var RestAPI = class {
|
|
|
3545
4594
|
*
|
|
3546
4595
|
* This only applies to Special Key for Low Latency Trading.
|
|
3547
4596
|
*
|
|
3548
|
-
* Weight: 1
|
|
4597
|
+
* Weight(UID): 1
|
|
3549
4598
|
*
|
|
3550
|
-
*
|
|
4599
|
+
* Security Type: TRADE
|
|
4600
|
+
*
|
|
4601
|
+
* @summary Query Special key(Low Latency Trading) (TRADE)
|
|
3551
4602
|
* @param {QuerySpecialKeyRequest} requestParameters Request parameters.
|
|
3552
4603
|
*
|
|
3553
4604
|
* @returns {Promise<RestApiResponse<QuerySpecialKeyResponse>>}
|
|
3554
4605
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
3555
|
-
* @see {@link https://developers.binance.com/docs/
|
|
4606
|
+
* @see {@link https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/trade#query-special-key Binance API Documentation}
|
|
3556
4607
|
*/
|
|
3557
4608
|
querySpecialKey(requestParameters = {}) {
|
|
3558
4609
|
return this.tradeApi.querySpecialKey(requestParameters);
|
|
@@ -3560,14 +4611,16 @@ var RestAPI = class {
|
|
|
3560
4611
|
/**
|
|
3561
4612
|
* This only applies to Special Key for Low Latency Trading.
|
|
3562
4613
|
*
|
|
3563
|
-
* Weight: 1
|
|
4614
|
+
* Weight(UID): 1
|
|
4615
|
+
*
|
|
4616
|
+
* Security Type: TRADE
|
|
3564
4617
|
*
|
|
3565
|
-
* @summary Query Special key List(Low Latency Trading)(TRADE)
|
|
4618
|
+
* @summary Query Special key List(Low Latency Trading) (TRADE)
|
|
3566
4619
|
* @param {QuerySpecialKeyListRequest} requestParameters Request parameters.
|
|
3567
4620
|
*
|
|
3568
4621
|
* @returns {Promise<RestApiResponse<QuerySpecialKeyListResponse>>}
|
|
3569
4622
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
3570
|
-
* @see {@link https://developers.binance.com/docs/
|
|
4623
|
+
* @see {@link https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/trade#query-special-key-list Binance API Documentation}
|
|
3571
4624
|
*/
|
|
3572
4625
|
querySpecialKeyList(requestParameters = {}) {
|
|
3573
4626
|
return this.tradeApi.querySpecialKeyList(requestParameters);
|
|
@@ -3575,18 +4628,21 @@ var RestAPI = class {
|
|
|
3575
4628
|
/**
|
|
3576
4629
|
* Small Liability Exchange
|
|
3577
4630
|
*
|
|
3578
|
-
*
|
|
3579
|
-
* Only liability valuation less than 10 USDT are supported
|
|
3580
|
-
* The maximum number of coin is 10
|
|
4631
|
+
* Weight(UID): 3000
|
|
3581
4632
|
*
|
|
3582
|
-
*
|
|
4633
|
+
* Security Type: MARGIN
|
|
4634
|
+
*
|
|
4635
|
+
* Notes:
|
|
4636
|
+
* - Only convert once within 6 hours
|
|
4637
|
+
* - Only liability valuation less than 10 USDT are supported
|
|
4638
|
+
* - The maximum number of coin is 10
|
|
3583
4639
|
*
|
|
3584
4640
|
* @summary Small Liability Exchange (MARGIN)
|
|
3585
4641
|
* @param {SmallLiabilityExchangeRequest} requestParameters Request parameters.
|
|
3586
4642
|
*
|
|
3587
4643
|
* @returns {Promise<RestApiResponse<void>>}
|
|
3588
4644
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
3589
|
-
* @see {@link https://developers.binance.com/docs/
|
|
4645
|
+
* @see {@link https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/trade#small-liability-exchange Binance API Documentation}
|
|
3590
4646
|
*/
|
|
3591
4647
|
smallLiabilityExchange(requestParameters) {
|
|
3592
4648
|
return this.tradeApi.smallLiabilityExchange(requestParameters);
|
|
@@ -3594,18 +4650,21 @@ var RestAPI = class {
|
|
|
3594
4650
|
/**
|
|
3595
4651
|
* Get Cross Margin Transfer History
|
|
3596
4652
|
*
|
|
3597
|
-
*
|
|
3598
|
-
*
|
|
3599
|
-
*
|
|
4653
|
+
* Weight(IP): 1
|
|
4654
|
+
*
|
|
4655
|
+
* Security Type: USER_DATA
|
|
3600
4656
|
*
|
|
3601
|
-
*
|
|
4657
|
+
* Notes:
|
|
4658
|
+
* - Response in descending order
|
|
4659
|
+
* - The max interval between `startTime` and `endTime` is 30 days.
|
|
4660
|
+
* - Returns data for last 7 days by default
|
|
3602
4661
|
*
|
|
3603
4662
|
* @summary Get Cross Margin Transfer History (USER_DATA)
|
|
3604
4663
|
* @param {GetCrossMarginTransferHistoryRequest} requestParameters Request parameters.
|
|
3605
4664
|
*
|
|
3606
4665
|
* @returns {Promise<RestApiResponse<GetCrossMarginTransferHistoryResponse>>}
|
|
3607
4666
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
3608
|
-
* @see {@link https://developers.binance.com/docs/
|
|
4667
|
+
* @see {@link https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/transfer#get-cross-margin-transfer-history Binance API Documentation}
|
|
3609
4668
|
*/
|
|
3610
4669
|
getCrossMarginTransferHistory(requestParameters = {}) {
|
|
3611
4670
|
return this.transferApi.getCrossMarginTransferHistory(requestParameters);
|
|
@@ -3613,20 +4672,72 @@ var RestAPI = class {
|
|
|
3613
4672
|
/**
|
|
3614
4673
|
* Query Max Transfer-Out Amount
|
|
3615
4674
|
*
|
|
3616
|
-
*
|
|
4675
|
+
* Weight(IP): 50
|
|
3617
4676
|
*
|
|
3618
|
-
*
|
|
4677
|
+
* Security Type: USER_DATA
|
|
4678
|
+
*
|
|
4679
|
+
* Notes:
|
|
4680
|
+
* - If isolatedSymbol is not sent, crossed margin data will be sent.
|
|
3619
4681
|
*
|
|
3620
4682
|
* @summary Query Max Transfer-Out Amount (USER_DATA)
|
|
3621
4683
|
* @param {QueryMaxTransferOutAmountRequest} requestParameters Request parameters.
|
|
3622
4684
|
*
|
|
3623
4685
|
* @returns {Promise<RestApiResponse<QueryMaxTransferOutAmountResponse>>}
|
|
3624
4686
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
3625
|
-
* @see {@link https://developers.binance.com/docs/
|
|
4687
|
+
* @see {@link https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/transfer#query-max-transfer-out-amount Binance API Documentation}
|
|
3626
4688
|
*/
|
|
3627
4689
|
queryMaxTransferOutAmount(requestParameters) {
|
|
3628
4690
|
return this.transferApi.queryMaxTransferOutAmount(requestParameters);
|
|
3629
4691
|
}
|
|
4692
|
+
/**
|
|
4693
|
+
* Close out a user data stream.
|
|
4694
|
+
*
|
|
4695
|
+
* Weight(UID): 3000
|
|
4696
|
+
*
|
|
4697
|
+
* Security Type: USER_STREAM
|
|
4698
|
+
*
|
|
4699
|
+
* @summary Close User Data Stream (USER_STREAM)
|
|
4700
|
+
*
|
|
4701
|
+
* @returns {Promise<RestApiResponse<void>>}
|
|
4702
|
+
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
4703
|
+
* @see {@link https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/user-data-stream#close-user-data-stream Binance API Documentation}
|
|
4704
|
+
*/
|
|
4705
|
+
closeUserDataStream() {
|
|
4706
|
+
return this.userDataStreamApi.closeUserDataStream();
|
|
4707
|
+
}
|
|
4708
|
+
/**
|
|
4709
|
+
* Keepalive a user data stream to prevent a time out.
|
|
4710
|
+
*
|
|
4711
|
+
* Weight(UID): 1
|
|
4712
|
+
*
|
|
4713
|
+
* Security Type: USER_STREAM
|
|
4714
|
+
*
|
|
4715
|
+
* @summary Keepalive User Data Stream (USER_STREAM)
|
|
4716
|
+
* @param {KeepaliveUserDataStreamRequest} requestParameters Request parameters.
|
|
4717
|
+
*
|
|
4718
|
+
* @returns {Promise<RestApiResponse<void>>}
|
|
4719
|
+
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
4720
|
+
* @see {@link https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/user-data-stream#keepalive-user-data-stream Binance API Documentation}
|
|
4721
|
+
*/
|
|
4722
|
+
keepaliveUserDataStream(requestParameters) {
|
|
4723
|
+
return this.userDataStreamApi.keepaliveUserDataStream(requestParameters);
|
|
4724
|
+
}
|
|
4725
|
+
/**
|
|
4726
|
+
* Start a new user data stream.
|
|
4727
|
+
*
|
|
4728
|
+
* Weight(UID): 1
|
|
4729
|
+
*
|
|
4730
|
+
* Security Type: USER_STREAM
|
|
4731
|
+
*
|
|
4732
|
+
* @summary Start User Data Stream (USER_STREAM)
|
|
4733
|
+
*
|
|
4734
|
+
* @returns {Promise<RestApiResponse<StartUserDataStreamResponse>>}
|
|
4735
|
+
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
4736
|
+
* @see {@link https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/user-data-stream#start-user-data-stream Binance API Documentation}
|
|
4737
|
+
*/
|
|
4738
|
+
startUserDataStream() {
|
|
4739
|
+
return this.userDataStreamApi.startUserDataStream();
|
|
4740
|
+
}
|
|
3630
4741
|
};
|
|
3631
4742
|
|
|
3632
4743
|
//#endregion
|
|
@@ -3634,26 +4745,75 @@ var RestAPI = class {
|
|
|
3634
4745
|
var rest_api_exports = /* @__PURE__ */ __export({
|
|
3635
4746
|
AccountApi: () => AccountApi,
|
|
3636
4747
|
BorrowRepayApi: () => BorrowRepayApi,
|
|
4748
|
+
CreateSpecialKeyPermissionModeEnum: () => CreateSpecialKeyPermissionModeEnum,
|
|
4749
|
+
GetCrossMarginTransferHistoryTypeEnum: () => GetCrossMarginTransferHistoryTypeEnum,
|
|
4750
|
+
GetFutureHourlyInterestRateIsIsolatedEnum: () => GetFutureHourlyInterestRateIsIsolatedEnum,
|
|
4751
|
+
MarginAccountBorrowRepayIsIsolatedEnum: () => MarginAccountBorrowRepayIsIsolatedEnum,
|
|
4752
|
+
MarginAccountBorrowRepayTypeEnum: () => MarginAccountBorrowRepayTypeEnum,
|
|
4753
|
+
MarginAccountCancelAllOpenOrdersOnASymbolIsIsolatedEnum: () => MarginAccountCancelAllOpenOrdersOnASymbolIsIsolatedEnum,
|
|
4754
|
+
MarginAccountCancelOcoIsIsolatedEnum: () => MarginAccountCancelOcoIsIsolatedEnum,
|
|
4755
|
+
MarginAccountCancelOrderIsIsolatedEnum: () => MarginAccountCancelOrderIsIsolatedEnum,
|
|
4756
|
+
MarginAccountNewOcoIsIsolatedEnum: () => MarginAccountNewOcoIsIsolatedEnum,
|
|
3637
4757
|
MarginAccountNewOcoNewOrderRespTypeEnum: () => MarginAccountNewOcoNewOrderRespTypeEnum,
|
|
4758
|
+
MarginAccountNewOcoSelfTradePreventionModeEnum: () => MarginAccountNewOcoSelfTradePreventionModeEnum,
|
|
4759
|
+
MarginAccountNewOcoSideEffectTypeEnum: () => MarginAccountNewOcoSideEffectTypeEnum,
|
|
3638
4760
|
MarginAccountNewOcoSideEnum: () => MarginAccountNewOcoSideEnum,
|
|
4761
|
+
MarginAccountNewOcoStopLimitTimeInForceEnum: () => MarginAccountNewOcoStopLimitTimeInForceEnum,
|
|
4762
|
+
MarginAccountNewOrderIsIsolatedEnum: () => MarginAccountNewOrderIsIsolatedEnum,
|
|
3639
4763
|
MarginAccountNewOrderNewOrderRespTypeEnum: () => MarginAccountNewOrderNewOrderRespTypeEnum,
|
|
4764
|
+
MarginAccountNewOrderSelfTradePreventionModeEnum: () => MarginAccountNewOrderSelfTradePreventionModeEnum,
|
|
4765
|
+
MarginAccountNewOrderSideEffectTypeEnum: () => MarginAccountNewOrderSideEffectTypeEnum,
|
|
3640
4766
|
MarginAccountNewOrderSideEnum: () => MarginAccountNewOrderSideEnum,
|
|
3641
4767
|
MarginAccountNewOrderTimeInForceEnum: () => MarginAccountNewOrderTimeInForceEnum,
|
|
4768
|
+
MarginAccountNewOrderTypeEnum: () => MarginAccountNewOrderTypeEnum,
|
|
4769
|
+
MarginAccountNewOtoIsIsolatedEnum: () => MarginAccountNewOtoIsIsolatedEnum,
|
|
3642
4770
|
MarginAccountNewOtoNewOrderRespTypeEnum: () => MarginAccountNewOtoNewOrderRespTypeEnum,
|
|
4771
|
+
MarginAccountNewOtoPendingSideEnum: () => MarginAccountNewOtoPendingSideEnum,
|
|
4772
|
+
MarginAccountNewOtoPendingTimeInForceEnum: () => MarginAccountNewOtoPendingTimeInForceEnum,
|
|
4773
|
+
MarginAccountNewOtoPendingTypeEnum: () => MarginAccountNewOtoPendingTypeEnum,
|
|
4774
|
+
MarginAccountNewOtoSelfTradePreventionModeEnum: () => MarginAccountNewOtoSelfTradePreventionModeEnum,
|
|
4775
|
+
MarginAccountNewOtoSideEffectTypeEnum: () => MarginAccountNewOtoSideEffectTypeEnum,
|
|
4776
|
+
MarginAccountNewOtoWorkingSideEnum: () => MarginAccountNewOtoWorkingSideEnum,
|
|
4777
|
+
MarginAccountNewOtoWorkingTimeInForceEnum: () => MarginAccountNewOtoWorkingTimeInForceEnum,
|
|
4778
|
+
MarginAccountNewOtoWorkingTypeEnum: () => MarginAccountNewOtoWorkingTypeEnum,
|
|
4779
|
+
MarginAccountNewOtocoIsIsolatedEnum: () => MarginAccountNewOtocoIsIsolatedEnum,
|
|
3643
4780
|
MarginAccountNewOtocoNewOrderRespTypeEnum: () => MarginAccountNewOtocoNewOrderRespTypeEnum,
|
|
4781
|
+
MarginAccountNewOtocoPendingAboveTimeInForceEnum: () => MarginAccountNewOtocoPendingAboveTimeInForceEnum,
|
|
4782
|
+
MarginAccountNewOtocoPendingAboveTypeEnum: () => MarginAccountNewOtocoPendingAboveTypeEnum,
|
|
4783
|
+
MarginAccountNewOtocoPendingBelowTimeInForceEnum: () => MarginAccountNewOtocoPendingBelowTimeInForceEnum,
|
|
4784
|
+
MarginAccountNewOtocoPendingBelowTypeEnum: () => MarginAccountNewOtocoPendingBelowTypeEnum,
|
|
4785
|
+
MarginAccountNewOtocoPendingSideEnum: () => MarginAccountNewOtocoPendingSideEnum,
|
|
4786
|
+
MarginAccountNewOtocoSelfTradePreventionModeEnum: () => MarginAccountNewOtocoSelfTradePreventionModeEnum,
|
|
4787
|
+
MarginAccountNewOtocoSideEffectTypeEnum: () => MarginAccountNewOtocoSideEffectTypeEnum,
|
|
4788
|
+
MarginAccountNewOtocoWorkingSideEnum: () => MarginAccountNewOtocoWorkingSideEnum,
|
|
4789
|
+
MarginAccountNewOtocoWorkingTimeInForceEnum: () => MarginAccountNewOtocoWorkingTimeInForceEnum,
|
|
4790
|
+
MarginAccountNewOtocoWorkingTypeEnum: () => MarginAccountNewOtocoWorkingTypeEnum,
|
|
4791
|
+
MarginManualLiquidationTypeEnum: () => MarginManualLiquidationTypeEnum,
|
|
3644
4792
|
MarketDataApi: () => MarketDataApi,
|
|
4793
|
+
QueryBorrowRepayRecordsInMarginAccountTypeEnum: () => QueryBorrowRepayRecordsInMarginAccountTypeEnum,
|
|
4794
|
+
QueryCrossIsolatedMarginCapitalFlowTypeEnum: () => QueryCrossIsolatedMarginCapitalFlowTypeEnum,
|
|
4795
|
+
QueryCurrentMarginOrderCountUsageIsIsolatedEnum: () => QueryCurrentMarginOrderCountUsageIsIsolatedEnum,
|
|
4796
|
+
QueryMarginAccountsAllOcoIsIsolatedEnum: () => QueryMarginAccountsAllOcoIsIsolatedEnum,
|
|
4797
|
+
QueryMarginAccountsAllOrdersIsIsolatedEnum: () => QueryMarginAccountsAllOrdersIsIsolatedEnum,
|
|
4798
|
+
QueryMarginAccountsOcoIsIsolatedEnum: () => QueryMarginAccountsOcoIsIsolatedEnum,
|
|
4799
|
+
QueryMarginAccountsOpenOcoIsIsolatedEnum: () => QueryMarginAccountsOpenOcoIsIsolatedEnum,
|
|
4800
|
+
QueryMarginAccountsOpenOrdersIsIsolatedEnum: () => QueryMarginAccountsOpenOrdersIsIsolatedEnum,
|
|
4801
|
+
QueryMarginAccountsOrderIsIsolatedEnum: () => QueryMarginAccountsOrderIsIsolatedEnum,
|
|
4802
|
+
QueryMarginAccountsTradeListIsIsolatedEnum: () => QueryMarginAccountsTradeListIsIsolatedEnum,
|
|
4803
|
+
QueryMarginAvailableInventoryTypeEnum: () => QueryMarginAvailableInventoryTypeEnum,
|
|
4804
|
+
QueryPreventedMatchesIsIsolatedEnum: () => QueryPreventedMatchesIsIsolatedEnum,
|
|
3645
4805
|
RestAPI: () => RestAPI,
|
|
3646
|
-
RiskDataStreamApi: () => RiskDataStreamApi,
|
|
3647
4806
|
TradeApi: () => TradeApi,
|
|
3648
|
-
TransferApi: () => TransferApi
|
|
4807
|
+
TransferApi: () => TransferApi,
|
|
4808
|
+
UserDataStreamApi: () => UserDataStreamApi
|
|
3649
4809
|
});
|
|
3650
4810
|
|
|
3651
4811
|
//#endregion
|
|
3652
4812
|
//#region src/websocket-streams/websocket-streams-connection.ts
|
|
3653
4813
|
/**
|
|
3654
|
-
*
|
|
4814
|
+
* Margin WebSocket Market Streams
|
|
3655
4815
|
*
|
|
3656
|
-
*
|
|
4816
|
+
* Access account information, borrow and repay assets, and trade with Binance Margin.
|
|
3657
4817
|
*
|
|
3658
4818
|
* The version of the OpenAPI document: 1.0.0
|
|
3659
4819
|
*
|
|
@@ -3760,9 +4920,9 @@ var WebsocketStreamsConnection = class {
|
|
|
3760
4920
|
//#endregion
|
|
3761
4921
|
//#region src/websocket-streams/websocket-streams.ts
|
|
3762
4922
|
/**
|
|
3763
|
-
*
|
|
4923
|
+
* Margin WebSocket Market Streams
|
|
3764
4924
|
*
|
|
3765
|
-
*
|
|
4925
|
+
* Access account information, borrow and repay assets, and trade with Binance Margin.
|
|
3766
4926
|
*
|
|
3767
4927
|
* The version of the OpenAPI document: 1.0.0
|
|
3768
4928
|
*
|