ccxt 4.2.62 → 4.2.64

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.
@@ -3784,8 +3784,8 @@ class bybit extends bybit$1 {
3784
3784
  const market = this.market(symbols[0]);
3785
3785
  let category = undefined;
3786
3786
  [category, params] = this.getBybitType('createOrders', market, params);
3787
- if ((category === 'spot') || (category === 'inverse')) {
3788
- throw new errors.NotSupported(this.id + ' createOrders does not allow spot or inverse orders');
3787
+ if (category === 'inverse') {
3788
+ throw new errors.NotSupported(this.id + ' createOrders does not allow inverse orders');
3789
3789
  }
3790
3790
  const request = {
3791
3791
  'category': category,
@@ -4265,6 +4265,87 @@ class bybit extends bybit$1 {
4265
4265
  const result = this.safeValue(response, 'result', {});
4266
4266
  return this.parseOrder(result, market);
4267
4267
  }
4268
+ async cancelOrders(ids, symbol = undefined, params = {}) {
4269
+ /**
4270
+ * @method
4271
+ * @name bybit#cancelOrders
4272
+ * @description cancel multiple orders
4273
+ * @see https://bybit-exchange.github.io/docs/v5/order/batch-cancel
4274
+ * @param {string[]} ids order ids
4275
+ * @param {string} symbol unified symbol of the market the order was made in
4276
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
4277
+ * @param {string[]} [params.clientOrderIds] client order ids
4278
+ * @returns {object} an list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
4279
+ */
4280
+ if (symbol === undefined) {
4281
+ throw new errors.ArgumentsRequired(this.id + ' cancelOrders() requires a symbol argument');
4282
+ }
4283
+ await this.loadMarkets();
4284
+ const market = this.market(symbol);
4285
+ let category = undefined;
4286
+ [category, params] = this.getBybitType('cancelOrders', market, params);
4287
+ if (category === 'inverse') {
4288
+ throw new errors.NotSupported(this.id + ' cancelOrders does not allow inverse orders');
4289
+ }
4290
+ const ordersRequests = [];
4291
+ const clientOrderIds = this.safeList2(params, 'clientOrderIds', 'clientOids', []);
4292
+ params = this.omit(params, ['clientOrderIds', 'clientOids']);
4293
+ for (let i = 0; i < clientOrderIds.length; i++) {
4294
+ ordersRequests.push({
4295
+ 'symbol': market['id'],
4296
+ 'orderLinkId': this.safeString(clientOrderIds, i),
4297
+ });
4298
+ }
4299
+ for (let i = 0; i < ids.length; i++) {
4300
+ ordersRequests.push({
4301
+ 'symbol': market['id'],
4302
+ 'orderId': this.safeString(ids, i),
4303
+ });
4304
+ }
4305
+ const request = {
4306
+ 'category': category,
4307
+ 'request': ordersRequests,
4308
+ };
4309
+ const response = await this.privatePostV5OrderCancelBatch(this.extend(request, params));
4310
+ //
4311
+ // {
4312
+ // "retCode": "0",
4313
+ // "retMsg": "OK",
4314
+ // "result": {
4315
+ // "list": [
4316
+ // {
4317
+ // "category": "spot",
4318
+ // "symbol": "BTCUSDT",
4319
+ // "orderId": "1636282505818800896",
4320
+ // "orderLinkId": "1636282505818800897"
4321
+ // },
4322
+ // {
4323
+ // "category": "spot",
4324
+ // "symbol": "BTCUSDT",
4325
+ // "orderId": "1636282505818800898",
4326
+ // "orderLinkId": "1636282505818800899"
4327
+ // }
4328
+ // ]
4329
+ // },
4330
+ // "retExtInfo": {
4331
+ // "list": [
4332
+ // {
4333
+ // "code": "0",
4334
+ // "msg": "OK"
4335
+ // },
4336
+ // {
4337
+ // "code": "0",
4338
+ // "msg": "OK"
4339
+ // }
4340
+ // ]
4341
+ // },
4342
+ // "time": "1709796158501"
4343
+ // }
4344
+ //
4345
+ const result = this.safeDict(response, 'result', {});
4346
+ const row = this.safeList(result, 'list', []);
4347
+ return this.parseOrders(row, market);
4348
+ }
4268
4349
  async cancelAllUsdcOrders(symbol = undefined, params = {}) {
4269
4350
  if (symbol === undefined) {
4270
4351
  throw new errors.ArgumentsRequired(this.id + ' cancelAllUsdcOrders() requires a symbol argument');
@@ -7223,7 +7304,8 @@ class bybit extends bybit$1 {
7223
7304
  // }
7224
7305
  //
7225
7306
  const marketId = this.safeString(fee, 'symbol');
7226
- const symbol = this.safeSymbol(marketId, undefined, undefined, 'contract');
7307
+ const defaultType = (market !== undefined) ? market['type'] : 'contract';
7308
+ const symbol = this.safeSymbol(marketId, market, undefined, defaultType);
7227
7309
  return {
7228
7310
  'info': fee,
7229
7311
  'symbol': symbol,
@@ -7243,12 +7325,23 @@ class bybit extends bybit$1 {
7243
7325
  */
7244
7326
  await this.loadMarkets();
7245
7327
  const market = this.market(symbol);
7246
- if (market['spot']) {
7247
- throw new errors.NotSupported(this.id + ' fetchTradingFee() is not supported for spot market');
7248
- }
7249
7328
  const request = {
7250
7329
  'symbol': market['id'],
7251
7330
  };
7331
+ let category = undefined;
7332
+ if (market['linear']) {
7333
+ category = 'linear';
7334
+ }
7335
+ else if (market['inverse']) {
7336
+ category = 'inverse';
7337
+ }
7338
+ else if (market['spot']) {
7339
+ category = 'spot';
7340
+ }
7341
+ else {
7342
+ category = 'option';
7343
+ }
7344
+ request['category'] = category;
7252
7345
  const response = await this.privateGetV5AccountFeeRate(this.extend(request, params));
7253
7346
  //
7254
7347
  // {
@@ -7270,7 +7363,7 @@ class bybit extends bybit$1 {
7270
7363
  const result = this.safeValue(response, 'result', {});
7271
7364
  const fees = this.safeValue(result, 'list', []);
7272
7365
  const first = this.safeValue(fees, 0, {});
7273
- return this.parseTradingFee(first);
7366
+ return this.parseTradingFee(first, market);
7274
7367
  }
7275
7368
  async fetchTradingFees(params = {}) {
7276
7369
  /**
@@ -262,12 +262,12 @@ class gemini extends gemini$1 {
262
262
  'webApiEnable': true,
263
263
  'webApiRetries': 10,
264
264
  },
265
+ 'fetchUsdtMarkets': ['btcusdt', 'ethusdt'],
265
266
  'fetchCurrencies': {
266
267
  'webApiEnable': true,
267
268
  'webApiRetries': 5,
268
269
  'webApiMuteFailure': true,
269
270
  },
270
- 'fetchUsdtMarkets': ['btcusdt', 'ethusdt'],
271
271
  'fetchTickerMethod': 'fetchTickerV1',
272
272
  'networks': {
273
273
  'BTC': 'bitcoin',
@@ -406,9 +406,11 @@ class gemini extends gemini$1 {
406
406
  */
407
407
  const method = this.safeValue(this.options, 'fetchMarketsMethod', 'fetch_markets_from_api');
408
408
  if (method === 'fetch_markets_from_web') {
409
- const usdMarkets = await this.fetchMarketsFromWeb(params); // get usd markets
410
- const usdtMarkets = await this.fetchUSDTMarkets(params); // get usdt markets
411
- return this.arrayConcat(usdMarkets, usdtMarkets);
409
+ const promises = [];
410
+ promises.push(this.fetchMarketsFromWeb(params)); // get usd markets
411
+ promises.push(this.fetchUSDTMarkets(params)); // get usdt markets
412
+ const promisesResult = await Promise.all(promises);
413
+ return this.arrayConcat(promisesResult[0], promisesResult[1]);
412
414
  }
413
415
  return await this.fetchMarketsFromAPI(params);
414
416
  }
@@ -516,6 +518,9 @@ class gemini extends gemini$1 {
516
518
  'post_only': true,
517
519
  'limit_only': true,
518
520
  };
521
+ if (status === undefined) {
522
+ return true; // as defaulted below
523
+ }
519
524
  return this.safeBool(statuses, status, true);
520
525
  }
521
526
  async fetchUSDTMarkets(params = {}) {
@@ -2517,7 +2517,7 @@ class hitbtc extends hitbtc$1 {
2517
2517
  * @see https://api.hitbtc.com/#get-futures-position-parameters
2518
2518
  * @param {string} symbol unified symbol of the market the order was made in
2519
2519
  * @param {object} [params] extra parameters specific to the exchange API endpoint
2520
- * @returns {object} Struct of MarginMode
2520
+ * @returns {object} a list of [margin mode structures]{@link https://docs.ccxt.com/#/?id=margin-mode-structure}
2521
2521
  */
2522
2522
  await this.loadMarkets();
2523
2523
  let market = undefined;
@@ -146,6 +146,7 @@ class krakenfutures extends krakenfutures$1 {
146
146
  'executions',
147
147
  'triggers',
148
148
  'accountlogcsv',
149
+ 'account-log',
149
150
  'market/{symbol}/orders',
150
151
  'market/{symbol}/executions',
151
152
  ],
@@ -229,7 +229,8 @@ class kucoin extends kucoin$1 {
229
229
  'project/list': 10,
230
230
  'project/marketInterestRate': 7.5,
231
231
  'redeem/orders': 10,
232
- 'purchase/orders': 10, // 10SW
232
+ 'purchase/orders': 10,
233
+ 'broker/api/rebase/download': 3,
233
234
  },
234
235
  'post': {
235
236
  // account
@@ -1291,7 +1291,7 @@ class bitget extends bitget$1 {
1291
1291
  if (feeAmount !== undefined) {
1292
1292
  const feeCurrency = this.safeString(fee, 'feeCoin');
1293
1293
  feeObject = {
1294
- 'cost': Precise["default"].stringAbs(feeAmount),
1294
+ 'cost': this.parseNumber(Precise["default"].stringAbs(feeAmount)),
1295
1295
  'currency': this.safeCurrencyCode(feeCurrency),
1296
1296
  };
1297
1297
  }
@@ -1304,10 +1304,10 @@ class bitget extends bitget$1 {
1304
1304
  if (side === 'buy' && market['spot'] && (type === 'market')) {
1305
1305
  cost = this.safeString(order, 'newSize', cost);
1306
1306
  }
1307
- let filled = this.safeString2(order, 'accBaseVolume', 'baseVolume');
1308
- if (market['spot'] && (rawStatus !== 'live')) {
1309
- filled = Precise["default"].stringDiv(cost, avgPrice);
1310
- }
1307
+ const filled = this.safeString2(order, 'accBaseVolume', 'baseVolume');
1308
+ // if (market['spot'] && (rawStatus !== 'live')) {
1309
+ // filled = Precise.stringDiv (cost, avgPrice);
1310
+ // }
1311
1311
  let amount = this.safeString(order, 'baseVolume');
1312
1312
  if (!market['spot'] || !(side === 'buy' && type === 'market')) {
1313
1313
  amount = this.safeString(order, 'newSize', amount);
@@ -1046,7 +1046,7 @@ class coinex extends coinex$1 {
1046
1046
  const messageHash = 'authenticated:spot';
1047
1047
  let future = this.safeValue(client.subscriptions, messageHash);
1048
1048
  if (future !== undefined) {
1049
- return future;
1049
+ return await future;
1050
1050
  }
1051
1051
  const requestId = this.requestId();
1052
1052
  const subscribe = {
@@ -1066,13 +1066,13 @@ class coinex extends coinex$1 {
1066
1066
  };
1067
1067
  future = this.watch(url, messageHash, request, requestId, subscribe);
1068
1068
  client.subscriptions[messageHash] = future;
1069
- return future;
1069
+ return await future;
1070
1070
  }
1071
1071
  else {
1072
1072
  const messageHash = 'authenticated:swap';
1073
1073
  let future = this.safeValue(client.subscriptions, messageHash);
1074
1074
  if (future !== undefined) {
1075
- return future;
1075
+ return await future;
1076
1076
  }
1077
1077
  const requestId = this.requestId();
1078
1078
  const subscribe = {
@@ -1092,7 +1092,7 @@ class coinex extends coinex$1 {
1092
1092
  };
1093
1093
  future = this.watch(url, messageHash, request, requestId, subscribe);
1094
1094
  client.subscriptions[messageHash] = future;
1095
- return future;
1095
+ return await future;
1096
1096
  }
1097
1097
  }
1098
1098
  }
@@ -172,7 +172,7 @@ class lbank extends lbank$1 {
172
172
  // },
173
173
  // type: 'kbar',
174
174
  // pair: 'btc_usdt',
175
- // TS: '2022-10-02T12:44:15.864'
175
+ // TS: '2022-10-02T12:44:15.865'
176
176
  // }
177
177
  //
178
178
  const marketId = this.safeString(message, 'pair');
@@ -281,15 +281,15 @@ class yobit extends yobit$1 {
281
281
  });
282
282
  }
283
283
  parseBalance(response) {
284
- const balances = this.safeValue(response, 'return', {});
284
+ const balances = this.safeDict(response, 'return', {});
285
285
  const timestamp = this.safeInteger(balances, 'server_time');
286
286
  const result = {
287
287
  'info': response,
288
288
  'timestamp': timestamp,
289
289
  'datetime': this.iso8601(timestamp),
290
290
  };
291
- const free = this.safeValue(balances, 'funds', {});
292
- const total = this.safeValue(balances, 'funds_incl_orders', {});
291
+ const free = this.safeDict(balances, 'funds', {});
292
+ const total = this.safeDict(balances, 'funds_incl_orders', {});
293
293
  const currencyIds = Object.keys(this.extend(free, total));
294
294
  for (let i = 0; i < currencyIds.length; i++) {
295
295
  const currencyId = currencyIds[i];
@@ -367,7 +367,7 @@ class yobit extends yobit$1 {
367
367
  // },
368
368
  // }
369
369
  //
370
- const markets = this.safeValue(response, 'pairs', {});
370
+ const markets = this.safeDict(response, 'pairs', {});
371
371
  const keys = Object.keys(markets);
372
372
  const result = [];
373
373
  for (let i = 0; i < keys.length; i++) {
@@ -655,7 +655,7 @@ class yobit extends yobit$1 {
655
655
  'currency': feeCurrencyCode,
656
656
  };
657
657
  }
658
- const isYourOrder = this.safeValue(trade, 'is_your_order');
658
+ const isYourOrder = this.safeString(trade, 'is_your_order');
659
659
  if (isYourOrder !== undefined) {
660
660
  if (fee === undefined) {
661
661
  const feeInNumbers = this.calculateFee(symbol, type, side, amount, price, 'taker');
@@ -722,7 +722,7 @@ class yobit extends yobit$1 {
722
722
  return [];
723
723
  }
724
724
  }
725
- const result = this.safeValue(response, market['id'], []);
725
+ const result = this.safeList(response, market['id'], []);
726
726
  return this.parseTrades(result, market, since, limit);
727
727
  }
728
728
  async fetchTradingFees(params = {}) {
@@ -755,12 +755,12 @@ class yobit extends yobit$1 {
755
755
  // },
756
756
  // }
757
757
  //
758
- const pairs = this.safeValue(response, 'pairs', {});
758
+ const pairs = this.safeDict(response, 'pairs', {});
759
759
  const marketIds = Object.keys(pairs);
760
760
  const result = {};
761
761
  for (let i = 0; i < marketIds.length; i++) {
762
762
  const marketId = marketIds[i];
763
- const pair = this.safeValue(pairs, marketId, {});
763
+ const pair = this.safeDict(pairs, marketId, {});
764
764
  const symbol = this.safeSymbol(marketId, undefined, '_');
765
765
  const takerString = this.safeString(pair, 'fee_buyer');
766
766
  const makerString = this.safeString(pair, 'fee_seller');
@@ -824,7 +824,7 @@ class yobit extends yobit$1 {
824
824
  // }
825
825
  // }
826
826
  //
827
- const result = this.safeValue(response, 'return');
827
+ const result = this.safeDict(response, 'return');
828
828
  return this.parseOrder(result, market);
829
829
  }
830
830
  async cancelOrder(id, symbol = undefined, params = {}) {
@@ -862,7 +862,7 @@ class yobit extends yobit$1 {
862
862
  // }
863
863
  // }
864
864
  //
865
- const result = this.safeValue(response, 'return', {});
865
+ const result = this.safeDict(response, 'return', {});
866
866
  return this.parseOrder(result);
867
867
  }
868
868
  parseOrderStatus(status) {
@@ -993,7 +993,7 @@ class yobit extends yobit$1 {
993
993
  };
994
994
  const response = await this.privatePostOrderInfo(this.extend(request, params));
995
995
  id = id.toString();
996
- const orders = this.safeValue(response, 'return', {});
996
+ const orders = this.safeDict(response, 'return', {});
997
997
  //
998
998
  // {
999
999
  // "success":1,
@@ -1058,7 +1058,7 @@ class yobit extends yobit$1 {
1058
1058
  // }
1059
1059
  // }
1060
1060
  //
1061
- const result = this.safeValue(response, 'return', {});
1061
+ const result = this.safeDict(response, 'return', {});
1062
1062
  return this.parseOrders(result, market, since, limit);
1063
1063
  }
1064
1064
  async fetchMyTrades(symbol = undefined, since = undefined, limit = undefined, params = {}) {
@@ -1112,7 +1112,7 @@ class yobit extends yobit$1 {
1112
1112
  // }
1113
1113
  // }
1114
1114
  //
1115
- const trades = this.safeValue(response, 'return', {});
1115
+ const trades = this.safeDict(response, 'return', {});
1116
1116
  const ids = Object.keys(trades);
1117
1117
  const result = [];
1118
1118
  for (let i = 0; i < ids.length; i++) {
@@ -1160,7 +1160,7 @@ class yobit extends yobit$1 {
1160
1160
  await this.loadMarkets();
1161
1161
  const currency = this.currency(code);
1162
1162
  let currencyId = currency['id'];
1163
- const networks = this.safeValue(this.options, 'networks', {});
1163
+ const networks = this.safeDict(this.options, 'networks', {});
1164
1164
  let network = this.safeStringUpper(params, 'network'); // this line allows the user to specify either ERC20 or ETH
1165
1165
  network = this.safeString(networks, network, network); // handle ERC20>ETH alias
1166
1166
  if (network !== undefined) {
@@ -1327,7 +1327,7 @@ class yobit extends yobit$1 {
1327
1327
  //
1328
1328
  // To cover points 1, 2, 3 and 4 combined this handler should work like this:
1329
1329
  //
1330
- let success = this.safeBool(response, 'success', false);
1330
+ let success = this.safeValue(response, 'success'); // don't replace with safeBool here
1331
1331
  if (typeof success === 'string') {
1332
1332
  if ((success === 'true') || (success === '1')) {
1333
1333
  success = true;
package/js/ccxt.d.ts CHANGED
@@ -4,7 +4,7 @@ import * as functions from './src/base/functions.js';
4
4
  import * as errors from './src/base/errors.js';
5
5
  import type { Market, Trade, Fee, Ticker, OrderBook, Order, Transaction, Tickers, Currency, Balance, DepositAddress, WithdrawalResponse, DepositAddressResponse, OHLCV, Balances, PartialBalances, Dictionary, MinMax, Position, FundingRateHistory, Liquidation, FundingHistory, MarginMode, Greeks, Leverage, Leverages } from './src/base/types.js';
6
6
  import { BaseError, ExchangeError, PermissionDenied, AccountNotEnabled, AccountSuspended, ArgumentsRequired, BadRequest, BadSymbol, MarginModeAlreadySet, BadResponse, NullResponse, InsufficientFunds, InvalidAddress, InvalidOrder, OrderNotFound, OrderNotCached, CancelPending, OrderImmediatelyFillable, OrderNotFillable, DuplicateOrderId, NotSupported, NetworkError, DDoSProtection, RateLimitExceeded, ExchangeNotAvailable, OnMaintenance, InvalidNonce, RequestTimeout, AuthenticationError, AddressPending, NoChange } from './src/base/errors.js';
7
- declare const version = "4.2.61";
7
+ declare const version = "4.2.63";
8
8
  import ace from './src/ace.js';
9
9
  import alpaca from './src/alpaca.js';
10
10
  import ascendex from './src/ascendex.js';
package/js/ccxt.js CHANGED
@@ -38,7 +38,7 @@ import * as errors from './src/base/errors.js';
38
38
  import { BaseError, ExchangeError, PermissionDenied, AccountNotEnabled, AccountSuspended, ArgumentsRequired, BadRequest, BadSymbol, MarginModeAlreadySet, BadResponse, NullResponse, InsufficientFunds, InvalidAddress, InvalidOrder, OrderNotFound, OrderNotCached, CancelPending, OrderImmediatelyFillable, OrderNotFillable, DuplicateOrderId, NotSupported, NetworkError, DDoSProtection, RateLimitExceeded, ExchangeNotAvailable, OnMaintenance, InvalidNonce, RequestTimeout, AuthenticationError, AddressPending, NoChange } from './src/base/errors.js';
39
39
  //-----------------------------------------------------------------------------
40
40
  // this is updated by vss.js when building
41
- const version = '4.2.62';
41
+ const version = '4.2.64';
42
42
  Exchange.ccxtVersion = version;
43
43
  //-----------------------------------------------------------------------------
44
44
  import ace from './src/ace.js';
@@ -32,6 +32,7 @@ interface Exchange {
32
32
  historyGetExecutions(params?: {}): Promise<implicitReturnType>;
33
33
  historyGetTriggers(params?: {}): Promise<implicitReturnType>;
34
34
  historyGetAccountlogcsv(params?: {}): Promise<implicitReturnType>;
35
+ historyGetAccountLog(params?: {}): Promise<implicitReturnType>;
35
36
  historyGetMarketSymbolOrders(params?: {}): Promise<implicitReturnType>;
36
37
  historyGetMarketSymbolExecutions(params?: {}): Promise<implicitReturnType>;
37
38
  }
@@ -82,6 +82,7 @@ interface Exchange {
82
82
  privateGetProjectMarketInterestRate(params?: {}): Promise<implicitReturnType>;
83
83
  privateGetRedeemOrders(params?: {}): Promise<implicitReturnType>;
84
84
  privateGetPurchaseOrders(params?: {}): Promise<implicitReturnType>;
85
+ privateGetBrokerApiRebaseDownload(params?: {}): Promise<implicitReturnType>;
85
86
  privatePostSubUserCreated(params?: {}): Promise<implicitReturnType>;
86
87
  privatePostSubApiKey(params?: {}): Promise<implicitReturnType>;
87
88
  privatePostSubApiKeyUpdate(params?: {}): Promise<implicitReturnType>;
@@ -82,6 +82,7 @@ interface kucoin {
82
82
  privateGetProjectMarketInterestRate(params?: {}): Promise<implicitReturnType>;
83
83
  privateGetRedeemOrders(params?: {}): Promise<implicitReturnType>;
84
84
  privateGetPurchaseOrders(params?: {}): Promise<implicitReturnType>;
85
+ privateGetBrokerApiRebaseDownload(params?: {}): Promise<implicitReturnType>;
85
86
  privatePostSubUserCreated(params?: {}): Promise<implicitReturnType>;
86
87
  privatePostSubApiKey(params?: {}): Promise<implicitReturnType>;
87
88
  privatePostSubApiKeyUpdate(params?: {}): Promise<implicitReturnType>;
package/js/src/binance.js CHANGED
@@ -2788,14 +2788,12 @@ export default class binance extends Exchange {
2788
2788
  }
2789
2789
  }
2790
2790
  const promises = await Promise.all(promisesRaw);
2791
- const spotMarkets = this.safeValue(this.safeValue(promises, 0), 'symbols', []);
2792
- const futureMarkets = this.safeValue(this.safeValue(promises, 1), 'symbols', []);
2793
- const deliveryMarkets = this.safeValue(this.safeValue(promises, 2), 'symbols', []);
2794
- const optionMarkets = this.safeValue(this.safeValue(promises, 3), 'optionSymbols', []);
2795
- let markets = spotMarkets;
2796
- markets = this.arrayConcat(markets, futureMarkets);
2797
- markets = this.arrayConcat(markets, deliveryMarkets);
2798
- markets = this.arrayConcat(markets, optionMarkets);
2791
+ let markets = [];
2792
+ for (let i = 0; i < fetchMarkets.length; i++) {
2793
+ const promise = this.safeDict(promises, i);
2794
+ const promiseMarkets = this.safeList2(promise, 'symbols', 'optionSymbols', []);
2795
+ markets = this.arrayConcat(markets, promiseMarkets);
2796
+ }
2799
2797
  //
2800
2798
  // spot / margin
2801
2799
  //
@@ -12184,7 +12182,7 @@ export default class binance extends Exchange {
12184
12182
  * @see https://binance-docs.github.io/apidocs/futures/en/#account-information-v2-user_data
12185
12183
  * @param {string} symbol unified symbol of the market the order was made in
12186
12184
  * @param {object} [params] extra parameters specific to the exchange API endpoint
12187
- * @returns {object} struct of marginMode
12185
+ * @returns {object} a list of [margin mode structures]{@link https://docs.ccxt.com/#/?id=margin-mode-structure}
12188
12186
  */
12189
12187
  await this.loadMarkets();
12190
12188
  let market = undefined;