ccxt 4.1.65 → 4.1.67

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -211,13 +211,13 @@ console.log(version, Object.keys(exchanges));
211
211
 
212
212
  All-in-one browser bundle (dependencies included), served from a CDN of your choice:
213
213
 
214
- * jsDelivr: https://cdn.jsdelivr.net/npm/ccxt@4.1.65/dist/ccxt.browser.js
215
- * unpkg: https://unpkg.com/ccxt@4.1.65/dist/ccxt.browser.js
214
+ * jsDelivr: https://cdn.jsdelivr.net/npm/ccxt@4.1.67/dist/ccxt.browser.js
215
+ * unpkg: https://unpkg.com/ccxt@4.1.67/dist/ccxt.browser.js
216
216
 
217
217
  CDNs are not updated in real-time and may have delays. Defaulting to the most recent version without specifying the version number is not recommended. Please, keep in mind that we are not responsible for the correct operation of those CDN servers.
218
218
 
219
219
  ```HTML
220
- <script type="text/javascript" src="https://cdn.jsdelivr.net/npm/ccxt@4.1.65/dist/ccxt.browser.js"></script>
220
+ <script type="text/javascript" src="https://cdn.jsdelivr.net/npm/ccxt@4.1.67/dist/ccxt.browser.js"></script>
221
221
  ```
222
222
 
223
223
  Creates a global `ccxt` object:
@@ -7032,6 +7032,9 @@ class Exchange {
7032
7032
  this.origin = '*'; // CORS origin
7033
7033
  //
7034
7034
  this.agent = undefined; // maintained for backwards compatibility
7035
+ this.nodeHttpModuleLoaded = false;
7036
+ this.httpAgent = undefined;
7037
+ this.httpsAgent = undefined;
7035
7038
  this.minFundingAddressLength = 1; // used in checkAddress
7036
7039
  this.substituteCommonCurrencyCodes = true; // reserved
7037
7040
  this.quoteJsonNumbers = true; // treat numbers in json as quoted precise strings
@@ -7193,6 +7196,12 @@ class Exchange {
7193
7196
  this.ymd = ymd;
7194
7197
  this.base64ToString = base64ToString;
7195
7198
  this.crc32 = crc32;
7199
+ this.httpProxyAgentModule = undefined;
7200
+ this.httpsProxyAgentModule = undefined;
7201
+ this.socksProxyAgentModule = undefined;
7202
+ this.socksProxyAgentModuleChecked = false;
7203
+ this.proxyDictionaries = {};
7204
+ this.proxyModulesLoaded = false;
7196
7205
  Object.assign(this, _functions_js__WEBPACK_IMPORTED_MODULE_0__);
7197
7206
  //
7198
7207
  // if (isNode) {
@@ -7631,39 +7640,89 @@ class Exchange {
7631
7640
  log(...args) {
7632
7641
  console.log(...args);
7633
7642
  }
7643
+ async loadProxyModules() {
7644
+ this.proxyModulesLoaded = true;
7645
+ // todo: possible sync alternatives: https://stackoverflow.com/questions/51069002/convert-import-to-synchronous
7646
+ this.httpProxyAgentModule = await import(/* webpackIgnore: true */ '../static_dependencies/proxies/http-proxy-agent/index.js');
7647
+ this.httpsProxyAgentModule = await import(/* webpackIgnore: true */ '../static_dependencies/proxies/https-proxy-agent/index.js');
7648
+ if (this.socksProxyAgentModuleChecked === false) {
7649
+ this.socksProxyAgentModuleChecked = true;
7650
+ try {
7651
+ // @ts-ignore
7652
+ this.socksProxyAgentModule = await import(/* webpackIgnore: true */ 'socks-proxy-agent');
7653
+ }
7654
+ catch (e) { }
7655
+ }
7656
+ }
7657
+ setProxyAgents(httpProxy, httpsProxy, socksProxy) {
7658
+ let chosenAgent = undefined;
7659
+ if (httpProxy) {
7660
+ if (this.httpProxyAgentModule === undefined) {
7661
+ throw new _errors_js__WEBPACK_IMPORTED_MODULE_3__.NotSupported(this.id + ' you need to load JS proxy modules with `.loadProxyModules()` method at first to use proxies');
7662
+ }
7663
+ if (!(httpProxy in this.proxyDictionaries)) {
7664
+ this.proxyDictionaries[httpProxy] = new this.httpProxyAgentModule.HttpProxyAgent(httpProxy);
7665
+ }
7666
+ chosenAgent = this.proxyDictionaries[httpProxy];
7667
+ }
7668
+ else if (httpsProxy) {
7669
+ if (this.httpsProxyAgentModule === undefined) {
7670
+ throw new _errors_js__WEBPACK_IMPORTED_MODULE_3__.NotSupported(this.id + ' you need to load JS proxy modules with `.loadProxyModules()` method at first to use proxies');
7671
+ }
7672
+ if (!(httpsProxy in this.proxyDictionaries)) {
7673
+ this.proxyDictionaries[httpsProxy] = new this.httpsProxyAgentModule.HttpsProxyAgent(httpsProxy);
7674
+ }
7675
+ chosenAgent = this.proxyDictionaries[httpsProxy];
7676
+ chosenAgent.keepAlive = true;
7677
+ }
7678
+ else if (socksProxy) {
7679
+ if (this.socksProxyAgentModule === undefined) {
7680
+ throw new _errors_js__WEBPACK_IMPORTED_MODULE_3__.NotSupported(this.id + ' - to use SOCKS proxy with ccxt, at first you need install module "npm i socks-proxy-agent" and then initialize proxies with `.loadProxyModules()` method');
7681
+ }
7682
+ if (!(socksProxy in this.proxyDictionaries)) {
7683
+ this.proxyDictionaries[socksProxy] = new this.socksProxyAgentModule.SocksProxyAgent(socksProxy);
7684
+ }
7685
+ chosenAgent = this.proxyDictionaries[socksProxy];
7686
+ }
7687
+ return chosenAgent;
7688
+ }
7634
7689
  async fetch(url, method = 'GET', headers = undefined, body = undefined) {
7690
+ // load node-http(s) modules only on first call
7691
+ if (isNode) {
7692
+ if (!this.nodeHttpModuleLoaded) {
7693
+ this.nodeHttpModuleLoaded = true;
7694
+ const httpsModule = await import(/* webpackIgnore: true */ 'node:https');
7695
+ this.httpsAgent = new httpsModule.Agent({ keepAlive: true });
7696
+ }
7697
+ }
7635
7698
  // ##### PROXY & HEADERS #####
7636
7699
  headers = this.extend(this.headers, headers);
7637
- const [proxyUrl, httpProxy, httpsProxy, socksProxy] = this.checkProxySettings(url, method, headers, body);
7700
+ // proxy-url
7701
+ const proxyUrl = this.checkProxyUrlSettings(url, method, headers, body);
7702
+ let isHttpAgentNeeded = false;
7638
7703
  if (proxyUrl !== undefined) {
7639
7704
  // in node we need to set header to *
7640
7705
  if (isNode) {
7641
7706
  headers = this.extend({ 'Origin': this.origin }, headers);
7707
+ if (proxyUrl.substring(0, 5) !== 'https') {
7708
+ // for `http://` protocol proxy-urls, we need to load `http` module only on first call
7709
+ if (!this.httpAgent) {
7710
+ const httpModule = await import(/* webpackIgnore: true */ 'node:http');
7711
+ this.httpAgent = new httpModule.Agent();
7712
+ }
7713
+ isHttpAgentNeeded = true;
7714
+ }
7642
7715
  }
7643
7716
  url = proxyUrl + url;
7644
7717
  }
7645
- else if (httpProxy !== undefined) {
7646
- const module = await import(/* webpackIgnore: true */ '../static_dependencies/proxies/http-proxy-agent/index.js');
7647
- const proxyAgent = new module.HttpProxyAgent(httpProxy);
7648
- this.agent = proxyAgent;
7649
- }
7650
- else if (httpsProxy !== undefined) {
7651
- const module = await import(/* webpackIgnore: true */ '../static_dependencies/proxies/https-proxy-agent/index.js');
7652
- const proxyAgent = new module.HttpsProxyAgent(httpsProxy);
7653
- proxyAgent.keepAlive = true;
7654
- this.agent = proxyAgent;
7655
- }
7656
- else if (socksProxy !== undefined) {
7657
- let module = undefined;
7658
- try {
7659
- // @ts-ignore
7660
- module = await import(/* webpackIgnore: true */ 'socks-proxy-agent');
7661
- }
7662
- catch (e) {
7663
- throw new _errors_js__WEBPACK_IMPORTED_MODULE_3__.NotSupported(this.id + ' - to use SOCKS proxy with ccxt, at first you need install module "npm i socks-proxy-agent" ');
7664
- }
7665
- this.agent = new module.SocksProxyAgent(socksProxy);
7718
+ // proxy agents
7719
+ const [httpProxy, httpsProxy, socksProxy] = this.checkProxySettings(url, method, headers, body);
7720
+ this.checkConflictingProxies(httpProxy || httpsProxy || socksProxy, proxyUrl);
7721
+ if (!this.proxyModulesLoaded) {
7722
+ await this.loadProxyModules(); // this is needed in JS, independently whether proxy properties were set or not, we have to load them because of necessity in WS, which would happen beyond 'fetch' method (WS/etc)
7666
7723
  }
7724
+ const chosenAgent = this.setProxyAgents(httpProxy, httpsProxy, socksProxy);
7725
+ // user-agent
7667
7726
  const userAgent = (this.userAgent !== undefined) ? this.userAgent : this.user_agent;
7668
7727
  if (userAgent && isNode) {
7669
7728
  if (typeof userAgent === 'string') {
@@ -7673,17 +7732,18 @@ class Exchange {
7673
7732
  headers = this.extend(userAgent, headers);
7674
7733
  }
7675
7734
  }
7735
+ // set final headers
7676
7736
  headers = this.setHeaders(headers);
7677
- // ######## end of proxies ########
7737
+ // log
7678
7738
  if (this.verbose) {
7679
7739
  this.log("fetch Request:\n", this.id, method, url, "\nRequestHeaders:\n", headers, "\nRequestBody:\n", body, "\n");
7680
7740
  }
7741
+ // end of proxies & headers
7681
7742
  if (this.fetchImplementation === undefined) {
7682
7743
  if (isNode) {
7683
7744
  const module = await import(/* webpackIgnore: true */ '../static_dependencies/node-fetch/index.js');
7684
7745
  if (this.agent === undefined) {
7685
- const { Agent } = await import(/* webpackIgnore: true */ 'node:https');
7686
- this.agent = new Agent({ keepAlive: true });
7746
+ this.agent = this.httpsAgent;
7687
7747
  }
7688
7748
  this.AbortError = module.AbortError;
7689
7749
  this.fetchImplementation = module.default;
@@ -7702,6 +7762,15 @@ class Exchange {
7702
7762
  if (this.agent) {
7703
7763
  params['agent'] = this.agent;
7704
7764
  }
7765
+ // override agent, if needed
7766
+ if (isHttpAgentNeeded) {
7767
+ // if proxyUrl is being used, so we don't overwrite `this.agent` itself
7768
+ params['agent'] = this.httpAgent;
7769
+ }
7770
+ else if (chosenAgent) {
7771
+ // if http(s)Proxy is being used
7772
+ params['agent'] = chosenAgent;
7773
+ }
7705
7774
  const controller = new AbortController();
7706
7775
  params['signal'] = controller.signal;
7707
7776
  const timeout = setTimeout(() => {
@@ -7902,6 +7971,11 @@ class Exchange {
7902
7971
  const onConnected = this.onConnected.bind(this);
7903
7972
  // decide client type here: ws / signalr / socketio
7904
7973
  const wsOptions = this.safeValue(this.options, 'ws', {});
7974
+ // proxy agents
7975
+ const [httpProxy, httpsProxy, socksProxy] = this.checkWsProxySettings();
7976
+ const chosenAgent = this.setProxyAgents(httpProxy, httpsProxy, socksProxy);
7977
+ const finalAgent = chosenAgent ? chosenAgent : this.agent;
7978
+ //
7905
7979
  const options = this.deepExtend(this.streaming, {
7906
7980
  'log': this.log ? this.log.bind(this) : this.log,
7907
7981
  'ping': this.ping ? this.ping.bind(this) : this.ping,
@@ -7909,7 +7983,7 @@ class Exchange {
7909
7983
  'throttler': new Throttler(this.tokenBucket),
7910
7984
  // add support for proxies
7911
7985
  'options': {
7912
- 'agent': this.agent,
7986
+ 'agent': finalAgent,
7913
7987
  }
7914
7988
  }, wsOptions);
7915
7989
  this.clients[url] = new _ws_WsClient_js__WEBPACK_IMPORTED_MODULE_6__/* ["default"] */ .Z(url, onMessage, onError, onClose, onConnected, options);
@@ -8075,6 +8149,9 @@ class Exchange {
8075
8149
  getProperty(obj, property, defaultValue = undefined) {
8076
8150
  return (property in obj ? obj[property] : defaultValue);
8077
8151
  }
8152
+ setProperty(obj, property, defaultValue = undefined) {
8153
+ obj[property] = defaultValue;
8154
+ }
8078
8155
  axolotl(payload, hexKey, ed25519) {
8079
8156
  return (0,_functions_crypto_js__WEBPACK_IMPORTED_MODULE_7__/* .axolotl */ .gC)(payload, hexKey, ed25519);
8080
8157
  }
@@ -8143,14 +8220,28 @@ class Exchange {
8143
8220
  }
8144
8221
  return undefined;
8145
8222
  }
8146
- checkProxySettings(url, method, headers, body) {
8147
- let proxyUrl = (this.proxyUrl !== undefined) ? this.proxyUrl : this.proxy_url;
8148
- const proxyUrlCallback = (this.proxyUrlCallback !== undefined) ? this.proxyUrlCallback : this.proxy_url_callback;
8149
- if (proxyUrlCallback !== undefined) {
8150
- proxyUrl = proxyUrlCallback(url, method, headers, body);
8223
+ checkProxyUrlSettings(url = undefined, method = undefined, headers = undefined, body = undefined) {
8224
+ const usedProxies = [];
8225
+ let proxyUrl = undefined;
8226
+ if (this.proxyUrl !== undefined) {
8227
+ usedProxies.push('proxyUrl');
8228
+ proxyUrl = this.proxyUrl;
8229
+ }
8230
+ if (this.proxy_url !== undefined) {
8231
+ usedProxies.push('proxy_url');
8232
+ proxyUrl = this.proxy_url;
8233
+ }
8234
+ if (this.proxyUrlCallback !== undefined) {
8235
+ usedProxies.push('proxyUrlCallback');
8236
+ proxyUrl = this.proxyUrlCallback(url, method, headers, body);
8237
+ }
8238
+ if (this.proxy_url_callback !== undefined) {
8239
+ usedProxies.push('proxy_url_callback');
8240
+ proxyUrl = this.proxy_url_callback(url, method, headers, body);
8151
8241
  }
8152
8242
  // backwards-compatibility
8153
8243
  if (this.proxy !== undefined) {
8244
+ usedProxies.push('proxy');
8154
8245
  if (typeof this.proxy === 'function') {
8155
8246
  proxyUrl = this.proxy(url, method, headers, body);
8156
8247
  }
@@ -8158,50 +8249,111 @@ class Exchange {
8158
8249
  proxyUrl = this.proxy;
8159
8250
  }
8160
8251
  }
8161
- let httpProxy = (this.httpProxy !== undefined) ? this.httpProxy : this.http_proxy;
8162
- const httpProxyCallback = (this.httpProxyCallback !== undefined) ? this.httpProxyCallback : this.http_proxy_callback;
8163
- if (httpProxyCallback !== undefined) {
8164
- httpProxy = httpProxyCallback(url, method, headers, body);
8165
- }
8166
- let httpsProxy = (this.httpsProxy !== undefined) ? this.httpsProxy : this.https_proxy;
8167
- const httpsProxyCallback = (this.httpsProxyCallback !== undefined) ? this.httpsProxyCallback : this.https_proxy_callback;
8168
- if (httpsProxyCallback !== undefined) {
8169
- httpsProxy = httpsProxyCallback(url, method, headers, body);
8170
- }
8171
- let socksProxy = (this.socksProxy !== undefined) ? this.socksProxy : this.socks_proxy;
8172
- const socksProxyCallback = (this.socksProxyCallback !== undefined) ? this.socksProxyCallback : this.socks_proxy_callback;
8173
- if (socksProxyCallback !== undefined) {
8174
- socksProxy = socksProxyCallback(url, method, headers, body);
8175
- }
8176
- let val = 0;
8177
- if (proxyUrl !== undefined) {
8178
- val = val + 1;
8179
- }
8180
- if (proxyUrlCallback !== undefined) {
8181
- val = val + 1;
8182
- }
8183
- if (httpProxy !== undefined) {
8184
- val = val + 1;
8185
- }
8186
- if (httpProxyCallback !== undefined) {
8187
- val = val + 1;
8188
- }
8189
- if (httpsProxy !== undefined) {
8190
- val = val + 1;
8191
- }
8192
- if (httpsProxyCallback !== undefined) {
8193
- val = val + 1;
8194
- }
8195
- if (socksProxy !== undefined) {
8196
- val = val + 1;
8197
- }
8198
- if (socksProxyCallback !== undefined) {
8199
- val = val + 1;
8252
+ const length = usedProxies.length;
8253
+ if (length > 1) {
8254
+ const joinedProxyNames = usedProxies.join(',');
8255
+ throw new _errors_js__WEBPACK_IMPORTED_MODULE_3__.ExchangeError(this.id + ' you have multiple conflicting proxy_url settings (' + joinedProxyNames + '), please use only one from : proxyUrl, proxy_url, proxyUrlCallback, proxy_url_callback');
8256
+ }
8257
+ return proxyUrl;
8258
+ }
8259
+ checkProxySettings(url = undefined, method = undefined, headers = undefined, body = undefined) {
8260
+ const usedProxies = [];
8261
+ let httpProxy = undefined;
8262
+ let httpsProxy = undefined;
8263
+ let socksProxy = undefined;
8264
+ // httpProxy
8265
+ if (this.httpProxy !== undefined) {
8266
+ usedProxies.push('httpProxy');
8267
+ httpProxy = this.httpProxy;
8268
+ }
8269
+ if (this.http_proxy !== undefined) {
8270
+ usedProxies.push('http_proxy');
8271
+ httpProxy = this.http_proxy;
8272
+ }
8273
+ if (this.httpProxyCallback !== undefined) {
8274
+ usedProxies.push('httpProxyCallback');
8275
+ httpProxy = this.httpProxyCallback(url, method, headers, body);
8276
+ }
8277
+ if (this.http_proxy_callback !== undefined) {
8278
+ usedProxies.push('http_proxy_callback');
8279
+ httpProxy = this.http_proxy_callback(url, method, headers, body);
8280
+ }
8281
+ // httpsProxy
8282
+ if (this.httpsProxy !== undefined) {
8283
+ usedProxies.push('httpsProxy');
8284
+ httpsProxy = this.httpsProxy;
8285
+ }
8286
+ if (this.https_proxy !== undefined) {
8287
+ usedProxies.push('https_proxy');
8288
+ httpsProxy = this.https_proxy;
8289
+ }
8290
+ if (this.httpsProxyCallback !== undefined) {
8291
+ usedProxies.push('httpsProxyCallback');
8292
+ httpsProxy = this.httpsProxyCallback(url, method, headers, body);
8293
+ }
8294
+ if (this.https_proxy_callback !== undefined) {
8295
+ usedProxies.push('https_proxy_callback');
8296
+ httpsProxy = this.https_proxy_callback(url, method, headers, body);
8297
+ }
8298
+ // socksProxy
8299
+ if (this.socksProxy !== undefined) {
8300
+ usedProxies.push('socksProxy');
8301
+ socksProxy = this.socksProxy;
8302
+ }
8303
+ if (this.socks_proxy !== undefined) {
8304
+ usedProxies.push('socks_proxy');
8305
+ socksProxy = this.socks_proxy;
8306
+ }
8307
+ if (this.socksProxyCallback !== undefined) {
8308
+ usedProxies.push('socksProxyCallback');
8309
+ socksProxy = this.socksProxyCallback(url, method, headers, body);
8310
+ }
8311
+ if (this.socks_proxy_callback !== undefined) {
8312
+ usedProxies.push('socks_proxy_callback');
8313
+ socksProxy = this.socks_proxy_callback(url, method, headers, body);
8314
+ }
8315
+ // check
8316
+ const length = usedProxies.length;
8317
+ if (length > 1) {
8318
+ const joinedProxyNames = usedProxies.join(',');
8319
+ throw new _errors_js__WEBPACK_IMPORTED_MODULE_3__.ExchangeError(this.id + ' you have multiple conflicting settings (' + joinedProxyNames + '), please use only one from: httpProxy, httpsProxy, httpProxyCallback, httpsProxyCallback, socksProxy, socksProxyCallback');
8320
+ }
8321
+ return [httpProxy, httpsProxy, socksProxy];
8322
+ }
8323
+ checkWsProxySettings() {
8324
+ const usedProxies = [];
8325
+ let wsProxy = undefined;
8326
+ let wssProxy = undefined;
8327
+ // wsProxy
8328
+ if (this.wsProxy !== undefined) {
8329
+ usedProxies.push('wsProxy');
8330
+ wsProxy = this.wsProxy;
8331
+ }
8332
+ if (this.ws_proxy !== undefined) {
8333
+ usedProxies.push('ws_proxy');
8334
+ wsProxy = this.ws_proxy;
8335
+ }
8336
+ // wsProxy
8337
+ if (this.wssProxy !== undefined) {
8338
+ usedProxies.push('wssProxy');
8339
+ wssProxy = this.wssProxy;
8340
+ }
8341
+ if (this.wss_proxy !== undefined) {
8342
+ usedProxies.push('wss_proxy');
8343
+ wssProxy = this.wss_proxy;
8344
+ }
8345
+ // check
8346
+ const length = usedProxies.length;
8347
+ if (length > 1) {
8348
+ const joinedProxyNames = usedProxies.join(',');
8349
+ throw new _errors_js__WEBPACK_IMPORTED_MODULE_3__.ExchangeError(this.id + ' you have multiple conflicting settings (' + joinedProxyNames + '), please use only one from: wsProxy, wssProxy');
8200
8350
  }
8201
- if (val > 1) {
8202
- throw new _errors_js__WEBPACK_IMPORTED_MODULE_3__.ExchangeError(this.id + ' you have multiple conflicting proxy settings, please use only one from : proxyUrl, httpProxy, httpsProxy, socksProxy, userAgent');
8351
+ return [wsProxy, wssProxy];
8352
+ }
8353
+ checkConflictingProxies(proxyAgentSet, proxyUrlSet) {
8354
+ if (proxyAgentSet && proxyUrlSet) {
8355
+ throw new _errors_js__WEBPACK_IMPORTED_MODULE_3__.ExchangeError(this.id + ' you have multiple conflicting proxy settings, please use only one from : proxyUrl, httpProxy, httpsProxy, socksProxy');
8203
8356
  }
8204
- return [proxyUrl, httpProxy, httpsProxy, socksProxy];
8205
8357
  }
8206
8358
  findMessageHashes(client, element) {
8207
8359
  const result = [];
@@ -8584,6 +8736,7 @@ class Exchange {
8584
8736
  'contract': undefined,
8585
8737
  'linear': undefined,
8586
8738
  'inverse': undefined,
8739
+ 'subType': undefined,
8587
8740
  'taker': undefined,
8588
8741
  'maker': undefined,
8589
8742
  'contractSize': undefined,
@@ -8661,6 +8814,15 @@ class Exchange {
8661
8814
  'precision': this.precision,
8662
8815
  'limits': this.limits,
8663
8816
  }, this.fees['trading'], value);
8817
+ if (market['linear']) {
8818
+ market['subType'] = 'linear';
8819
+ }
8820
+ else if (market['inverse']) {
8821
+ market['subType'] = 'inverse';
8822
+ }
8823
+ else {
8824
+ market['subType'] = undefined;
8825
+ }
8664
8826
  values.push(market);
8665
8827
  }
8666
8828
  this.markets = this.indexBy(values, 'symbol');
@@ -26729,6 +26891,7 @@ class bingx extends _abstract_bingx_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"
26729
26891
  'user': 'https://open-api.{hostname}/openApi',
26730
26892
  'subAccount': 'https://open-api.{hostname}/openApi',
26731
26893
  'account': 'https://open-api.{hostname}/openApi',
26894
+ 'copyTrading': 'https://open-api.{hostname}/openApi',
26732
26895
  },
26733
26896
  'www': 'https://bingx.com/',
26734
26897
  'doc': 'https://bingx-api.github.io/docs/',
@@ -86516,7 +86679,7 @@ class coinbase extends _abstract_coinbase_js__WEBPACK_IMPORTED_MODULE_0__/* ["de
86516
86679
  */
86517
86680
  await this.loadMarkets();
86518
86681
  const request = {
86519
- 'limit': 100,
86682
+ 'limit': 250,
86520
86683
  };
86521
86684
  let response = undefined;
86522
86685
  const isV3 = this.safeValue(params, 'v3', false);
@@ -122181,6 +122344,13 @@ class gate extends _abstract_gate_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"]
122181
122344
  }
122182
122345
  else if (symbol in this.markets_by_id) {
122183
122346
  const markets = this.markets_by_id[symbol];
122347
+ const defaultType = this.safeString2(this.options, 'defaultType', 'defaultSubType', 'spot');
122348
+ for (let i = 0; i < markets.length; i++) {
122349
+ const market = markets[i];
122350
+ if (market[defaultType]) {
122351
+ return market;
122352
+ }
122353
+ }
122184
122354
  return markets[0];
122185
122355
  }
122186
122356
  else if ((symbol.indexOf('-C') > -1) || (symbol.indexOf('-P') > -1)) {
@@ -287583,7 +287753,7 @@ SOFTWARE.
287583
287753
 
287584
287754
  //-----------------------------------------------------------------------------
287585
287755
  // this is updated by vss.js when building
287586
- const version = '4.1.65';
287756
+ const version = '4.1.67';
287587
287757
  _src_base_Exchange_js__WEBPACK_IMPORTED_MODULE_0__/* .Exchange */ .e.ccxtVersion = version;
287588
287758
  //-----------------------------------------------------------------------------
287589
287759