ccxt 4.4.74 → 4.4.77

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.
Files changed (65) hide show
  1. package/README.md +3 -3
  2. package/dist/ccxt.browser.min.js +3 -3
  3. package/dist/cjs/ccxt.js +1 -1
  4. package/dist/cjs/src/base/Exchange.js +16 -9
  5. package/dist/cjs/src/binance.js +43 -219
  6. package/dist/cjs/src/bitget.js +1 -1
  7. package/dist/cjs/src/bitopro.js +37 -0
  8. package/dist/cjs/src/bitrue.js +48 -0
  9. package/dist/cjs/src/coinex.js +3 -0
  10. package/dist/cjs/src/coinlist.js +90 -1
  11. package/dist/cjs/src/okx.js +47 -33
  12. package/dist/cjs/src/paradex.js +3 -12
  13. package/dist/cjs/src/pro/hyperliquid.js +1 -1
  14. package/dist/cjs/src/upbit.js +64 -46
  15. package/dist/cjs/src/xt.js +122 -4
  16. package/js/ccxt.d.ts +1 -1
  17. package/js/ccxt.js +1 -1
  18. package/js/src/abstract/coinlist.d.ts +3 -0
  19. package/js/src/abstract/myokx.d.ts +4 -0
  20. package/js/src/abstract/okx.d.ts +4 -0
  21. package/js/src/abstract/upbit.d.ts +15 -1
  22. package/js/src/abstract/xt.d.ts +3 -0
  23. package/js/src/base/Exchange.d.ts +1 -0
  24. package/js/src/base/Exchange.js +16 -9
  25. package/js/src/binance.d.ts +2 -0
  26. package/js/src/binance.js +43 -219
  27. package/js/src/bitget.js +1 -1
  28. package/js/src/bitopro.js +37 -0
  29. package/js/src/bitrue.js +48 -0
  30. package/js/src/coinex.js +3 -0
  31. package/js/src/coinlist.d.ts +12 -1
  32. package/js/src/coinlist.js +90 -1
  33. package/js/src/okx.js +47 -33
  34. package/js/src/paradex.js +3 -12
  35. package/js/src/pro/hyperliquid.js +1 -1
  36. package/js/src/upbit.js +64 -46
  37. package/js/src/xt.d.ts +19 -0
  38. package/js/src/xt.js +122 -4
  39. package/package.json +1 -1
  40. package/js/src/abstract/bitcoincom.d.ts +0 -118
  41. package/js/src/abstract/bitcoincom.js +0 -11
  42. package/js/src/abstract/bitfinex1.d.ts +0 -72
  43. package/js/src/abstract/bitfinex1.js +0 -11
  44. package/js/src/abstract/bitpanda.d.ts +0 -26
  45. package/js/src/abstract/bitpanda.js +0 -5
  46. package/js/src/abstract/poloniexfutures.d.ts +0 -51
  47. package/js/src/abstract/poloniexfutures.js +0 -11
  48. package/js/src/abstract/wazirx.d.ts +0 -33
  49. package/js/src/abstract/wazirx.js +0 -11
  50. package/js/src/bitcoincom.d.ts +0 -4
  51. package/js/src/bitcoincom.js +0 -18
  52. package/js/src/bitpanda.d.ts +0 -4
  53. package/js/src/bitpanda.js +0 -17
  54. package/js/src/poloniexfutures.d.ts +0 -321
  55. package/js/src/poloniexfutures.js +0 -1941
  56. package/js/src/pro/bitcoincom.d.ts +0 -4
  57. package/js/src/pro/bitcoincom.js +0 -34
  58. package/js/src/pro/bitpanda.d.ts +0 -4
  59. package/js/src/pro/bitpanda.js +0 -17
  60. package/js/src/pro/poloniexfutures.d.ts +0 -108
  61. package/js/src/pro/poloniexfutures.js +0 -1042
  62. package/js/src/pro/wazirx.d.ts +0 -102
  63. package/js/src/pro/wazirx.js +0 -784
  64. package/js/src/static_dependencies/starknet/utils/json.d.ts +0 -24
  65. package/js/src/static_dependencies/starknet/utils/json.js +0 -43
package/dist/cjs/ccxt.js CHANGED
@@ -192,7 +192,7 @@ var xt$1 = require('./src/pro/xt.js');
192
192
 
193
193
  //-----------------------------------------------------------------------------
194
194
  // this is updated by vss.js when building
195
- const version = '4.4.74';
195
+ const version = '4.4.77';
196
196
  Exchange["default"].ccxtVersion = version;
197
197
  const exchanges = {
198
198
  'ace': ace,
@@ -572,7 +572,7 @@ class Exchange {
572
572
  httpProxyAgent = this.httpAgent;
573
573
  }
574
574
  }
575
- url = proxyUrl + url;
575
+ url = proxyUrl + this.urlEncoderForProxyUrl(url);
576
576
  }
577
577
  // proxy agents
578
578
  const [httpProxy, httpsProxy, socksProxy] = this.checkProxySettings(url, method, headers, body);
@@ -1774,6 +1774,12 @@ class Exchange {
1774
1774
  }
1775
1775
  return proxyUrl;
1776
1776
  }
1777
+ urlEncoderForProxyUrl(targetUrl) {
1778
+ // to be overriden
1779
+ const includesQuery = targetUrl.indexOf('?') >= 0;
1780
+ const finalUrl = includesQuery ? this.encodeURIComponent(targetUrl) : targetUrl;
1781
+ return finalUrl;
1782
+ }
1777
1783
  checkProxySettings(url = undefined, method = undefined, headers = undefined, body = undefined) {
1778
1784
  const usedProxies = [];
1779
1785
  let httpProxy = undefined;
@@ -2522,9 +2528,6 @@ class Exchange {
2522
2528
  }
2523
2529
  safeCurrencyStructure(currency) {
2524
2530
  // derive data from networks: deposit, withdraw, active, fee, limits, precision
2525
- const currencyDeposit = this.safeBool(currency, 'deposit');
2526
- const currencyWithdraw = this.safeBool(currency, 'withdraw');
2527
- const currencyActive = this.safeBool(currency, 'active');
2528
2531
  const networks = this.safeDict(currency, 'networks', {});
2529
2532
  const keys = Object.keys(networks);
2530
2533
  const length = keys.length;
@@ -2533,19 +2536,18 @@ class Exchange {
2533
2536
  const key = keys[i];
2534
2537
  const network = networks[key];
2535
2538
  const deposit = this.safeBool(network, 'deposit');
2539
+ const currencyDeposit = this.safeBool(currency, 'deposit');
2536
2540
  if (currencyDeposit === undefined || deposit) {
2537
2541
  currency['deposit'] = deposit;
2538
2542
  }
2539
2543
  const withdraw = this.safeBool(network, 'withdraw');
2544
+ const currencyWithdraw = this.safeBool(currency, 'withdraw');
2540
2545
  if (currencyWithdraw === undefined || withdraw) {
2541
2546
  currency['withdraw'] = withdraw;
2542
2547
  }
2543
- const active = this.safeBool(network, 'active');
2544
- if (currencyActive === undefined || active) {
2545
- currency['active'] = active;
2546
- }
2547
2548
  // set network 'active' to false if D or W is disabled
2548
- if (this.safeBool(network, 'active') === undefined) {
2549
+ let active = this.safeBool(network, 'active');
2550
+ if (active === undefined) {
2549
2551
  if (deposit && withdraw) {
2550
2552
  currency['networks'][key]['active'] = true;
2551
2553
  }
@@ -2553,6 +2555,11 @@ class Exchange {
2553
2555
  currency['networks'][key]['active'] = false;
2554
2556
  }
2555
2557
  }
2558
+ active = this.safeBool(network, 'active');
2559
+ const currencyActive = this.safeBool(currency, 'active');
2560
+ if (currencyActive === undefined || active) {
2561
+ currency['active'] = active;
2562
+ }
2556
2563
  // find lowest fee (which is more desired)
2557
2564
  const fee = this.safeString(network, 'fee');
2558
2565
  const feeMain = this.safeString(currency, 'fee');
@@ -1333,195 +1333,8 @@ class binance extends binance$1 {
1333
1333
  'SPL': 'SOL',
1334
1334
  'SOL': 'SOL', // we shouldn't rename SOL
1335
1335
  },
1336
- // keeping this object for backward-compatibility
1337
- 'reverseNetworks': {
1338
- 'tronscan.org': 'TRC20',
1339
- 'etherscan.io': 'ERC20',
1340
- 'bscscan.com': 'BSC',
1341
- 'explorer.binance.org': 'BEP2',
1342
- 'bithomp.com': 'XRP',
1343
- 'bloks.io': 'EOS',
1344
- 'stellar.expert': 'XLM',
1345
- 'blockchair.com/bitcoin': 'BTC',
1346
- 'blockchair.com/bitcoin-cash': 'BCH',
1347
- 'blockchair.com/ecash': 'XEC',
1348
- 'explorer.litecoin.net': 'LTC',
1349
- 'explorer.avax.network': 'AVAX',
1350
- 'solscan.io': 'SOL',
1351
- 'polkadot.subscan.io': 'DOT',
1352
- 'dashboard.internetcomputer.org': 'ICP',
1353
- 'explorer.chiliz.com': 'CHZ',
1354
- 'cardanoscan.io': 'ADA',
1355
- 'mainnet.theoan.com': 'AION',
1356
- 'algoexplorer.io': 'ALGO',
1357
- 'explorer.ambrosus.com': 'AMB',
1358
- 'viewblock.io/zilliqa': 'ZIL',
1359
- 'viewblock.io/arweave': 'AR',
1360
- 'explorer.ark.io': 'ARK',
1361
- 'atomscan.com': 'ATOM',
1362
- 'www.mintscan.io': 'CTK',
1363
- 'explorer.bitcoindiamond.org': 'BCD',
1364
- 'btgexplorer.com': 'BTG',
1365
- 'bts.ai': 'BTS',
1366
- 'explorer.celo.org': 'CELO',
1367
- 'explorer.nervos.org': 'CKB',
1368
- 'cerebro.cortexlabs.ai': 'CTXC',
1369
- 'chainz.cryptoid.info': 'VIA',
1370
- 'explorer.dcrdata.org': 'DCR',
1371
- 'digiexplorer.info': 'DGB',
1372
- 'dock.subscan.io': 'DOCK',
1373
- 'dogechain.info': 'DOGE',
1374
- 'explorer.elrond.com': 'EGLD',
1375
- 'blockscout.com': 'ETC',
1376
- 'explore-fetchhub.fetch.ai': 'FET',
1377
- 'filfox.info': 'FIL',
1378
- 'fio.bloks.io': 'FIO',
1379
- 'explorer.firo.org': 'FIRO',
1380
- 'neoscan.io': 'NEO',
1381
- 'ftmscan.com': 'FTM',
1382
- 'explorer.gochain.io': 'GO',
1383
- 'block.gxb.io': 'GXS',
1384
- 'hash-hash.info': 'HBAR',
1385
- 'www.hiveblockexplorer.com': 'HIVE',
1386
- 'explorer.helium.com': 'HNT',
1387
- 'tracker.icon.foundation': 'ICX',
1388
- 'www.iostabc.com': 'IOST',
1389
- 'explorer.iota.org': 'IOTA',
1390
- 'iotexscan.io': 'IOTX',
1391
- 'irishub.iobscan.io': 'IRIS',
1392
- 'kava.mintscan.io': 'KAVA',
1393
- 'scope.klaytn.com': 'KLAY',
1394
- 'kmdexplorer.io': 'KMD',
1395
- 'kusama.subscan.io': 'KSM',
1396
- 'explorer.lto.network': 'LTO',
1397
- 'polygonscan.com': 'POLYGON',
1398
- 'explorer.ont.io': 'ONT',
1399
- 'minaexplorer.com': 'MINA',
1400
- 'nanolooker.com': 'NANO',
1401
- 'explorer.nebulas.io': 'NAS',
1402
- 'explorer.nbs.plus': 'NBS',
1403
- 'explorer.nebl.io': 'NEBL',
1404
- 'nulscan.io': 'NULS',
1405
- 'nxscan.com': 'NXS',
1406
- 'explorer.harmony.one': 'ONE',
1407
- 'explorer.poa.network': 'POA',
1408
- 'qtum.info': 'QTUM',
1409
- 'explorer.rsk.co': 'RSK',
1410
- 'www.oasisscan.com': 'ROSE',
1411
- 'ravencoin.network': 'RVN',
1412
- 'sc.tokenview.com': 'SC',
1413
- 'secretnodes.com': 'SCRT',
1414
- 'explorer.skycoin.com': 'SKY',
1415
- 'steemscan.com': 'STEEM',
1416
- 'explorer.stacks.co': 'STX',
1417
- 'www.thetascan.io': 'THETA',
1418
- 'scan.tomochain.com': 'TOMO',
1419
- 'explore.vechain.org': 'VET',
1420
- 'explorer.vite.net': 'VITE',
1421
- 'www.wanscan.org': 'WAN',
1422
- 'wavesexplorer.com': 'WAVES',
1423
- 'wax.eosx.io': 'WAXP',
1424
- 'waltonchain.pro': 'WTC',
1425
- 'chain.nem.ninja': 'XEM',
1426
- 'verge-blockchain.info': 'XVG',
1427
- 'explorer.yoyow.org': 'YOYOW',
1428
- 'explorer.zcha.in': 'ZEC',
1429
- 'explorer.zensystem.io': 'ZEN',
1430
- },
1431
1336
  'networksById': {
1432
- 'SOL': 'SOL',
1433
- 'tronscan.org': 'TRC20',
1434
- 'etherscan.io': 'ERC20',
1435
- 'bscscan.com': 'BSC',
1436
- 'explorer.binance.org': 'BEP2',
1437
- 'bithomp.com': 'XRP',
1438
- 'bloks.io': 'EOS',
1439
- 'stellar.expert': 'XLM',
1440
- 'blockchair.com/bitcoin': 'BTC',
1441
- 'blockchair.com/bitcoin-cash': 'BCH',
1442
- 'blockchair.com/ecash': 'XEC',
1443
- 'explorer.litecoin.net': 'LTC',
1444
- 'explorer.avax.network': 'AVAX',
1445
- 'solscan.io': 'SOL',
1446
- 'polkadot.subscan.io': 'DOT',
1447
- 'dashboard.internetcomputer.org': 'ICP',
1448
- 'explorer.chiliz.com': 'CHZ',
1449
- 'cardanoscan.io': 'ADA',
1450
- 'mainnet.theoan.com': 'AION',
1451
- 'algoexplorer.io': 'ALGO',
1452
- 'explorer.ambrosus.com': 'AMB',
1453
- 'viewblock.io/zilliqa': 'ZIL',
1454
- 'viewblock.io/arweave': 'AR',
1455
- 'explorer.ark.io': 'ARK',
1456
- 'atomscan.com': 'ATOM',
1457
- 'www.mintscan.io': 'CTK',
1458
- 'explorer.bitcoindiamond.org': 'BCD',
1459
- 'btgexplorer.com': 'BTG',
1460
- 'bts.ai': 'BTS',
1461
- 'explorer.celo.org': 'CELO',
1462
- 'explorer.nervos.org': 'CKB',
1463
- 'cerebro.cortexlabs.ai': 'CTXC',
1464
- 'chainz.cryptoid.info': 'VIA',
1465
- 'explorer.dcrdata.org': 'DCR',
1466
- 'digiexplorer.info': 'DGB',
1467
- 'dock.subscan.io': 'DOCK',
1468
- 'dogechain.info': 'DOGE',
1469
- 'explorer.elrond.com': 'EGLD',
1470
- 'blockscout.com': 'ETC',
1471
- 'explore-fetchhub.fetch.ai': 'FET',
1472
- 'filfox.info': 'FIL',
1473
- 'fio.bloks.io': 'FIO',
1474
- 'explorer.firo.org': 'FIRO',
1475
- 'neoscan.io': 'NEO',
1476
- 'ftmscan.com': 'FTM',
1477
- 'explorer.gochain.io': 'GO',
1478
- 'block.gxb.io': 'GXS',
1479
- 'hash-hash.info': 'HBAR',
1480
- 'www.hiveblockexplorer.com': 'HIVE',
1481
- 'explorer.helium.com': 'HNT',
1482
- 'tracker.icon.foundation': 'ICX',
1483
- 'www.iostabc.com': 'IOST',
1484
- 'explorer.iota.org': 'IOTA',
1485
- 'iotexscan.io': 'IOTX',
1486
- 'irishub.iobscan.io': 'IRIS',
1487
- 'kava.mintscan.io': 'KAVA',
1488
- 'scope.klaytn.com': 'KLAY',
1489
- 'kmdexplorer.io': 'KMD',
1490
- 'kusama.subscan.io': 'KSM',
1491
- 'explorer.lto.network': 'LTO',
1492
- 'polygonscan.com': 'POLYGON',
1493
- 'explorer.ont.io': 'ONT',
1494
- 'minaexplorer.com': 'MINA',
1495
- 'nanolooker.com': 'NANO',
1496
- 'explorer.nebulas.io': 'NAS',
1497
- 'explorer.nbs.plus': 'NBS',
1498
- 'explorer.nebl.io': 'NEBL',
1499
- 'nulscan.io': 'NULS',
1500
- 'nxscan.com': 'NXS',
1501
- 'explorer.harmony.one': 'ONE',
1502
- 'explorer.poa.network': 'POA',
1503
- 'qtum.info': 'QTUM',
1504
- 'explorer.rsk.co': 'RSK',
1505
- 'www.oasisscan.com': 'ROSE',
1506
- 'ravencoin.network': 'RVN',
1507
- 'sc.tokenview.com': 'SC',
1508
- 'secretnodes.com': 'SCRT',
1509
- 'explorer.skycoin.com': 'SKY',
1510
- 'steemscan.com': 'STEEM',
1511
- 'explorer.stacks.co': 'STX',
1512
- 'www.thetascan.io': 'THETA',
1513
- 'scan.tomochain.com': 'TOMO',
1514
- 'explore.vechain.org': 'VET',
1515
- 'explorer.vite.net': 'VITE',
1516
- 'www.wanscan.org': 'WAN',
1517
- 'wavesexplorer.com': 'WAVES',
1518
- 'wax.eosx.io': 'WAXP',
1519
- 'waltonchain.pro': 'WTC',
1520
- 'chain.nem.ninja': 'XEM',
1521
- 'verge-blockchain.info': 'XVG',
1522
- 'explorer.yoyow.org': 'YOYOW',
1523
- 'explorer.zcha.in': 'ZEC',
1524
- 'explorer.zensystem.io': 'ZEN',
1337
+ 'SOL': 'SOL', // temporary fix for SPL definition
1525
1338
  },
1526
1339
  'impliedNetworks': {
1527
1340
  'ETH': { 'ERC20': 'ETH' },
@@ -9261,43 +9074,19 @@ class binance extends binance$1 {
9261
9074
  parseDepositAddress(response, currency = undefined) {
9262
9075
  //
9263
9076
  // {
9264
- // "currency": "XRP",
9077
+ // "coin": "XRP",
9265
9078
  // "address": "rEb8TK3gBgk5auZkwc6sHnwrGVJH8DuaLh",
9266
9079
  // "tag": "108618262",
9267
- // "info": {
9268
- // "coin": "XRP",
9269
- // "address": "rEb8TK3gBgk5auZkwc6sHnwrGVJH8DuaLh",
9270
- // "tag": "108618262",
9271
- // "url": "https://bithomp.com/explorer/rEb8TK3gBgk5auZkwc6sHnwrGVJH8DuaLh"
9272
- // }
9080
+ // "url": "https://bithomp.com/explorer/rEb8TK3gBgk5auZkwc6sHnwrGVJH8DuaLh"
9273
9081
  // }
9274
9082
  //
9275
- const info = this.safeDict(response, 'info', {});
9276
- const url = this.safeString(info, 'url');
9083
+ const url = this.safeString(response, 'url');
9277
9084
  const address = this.safeString(response, 'address');
9278
9085
  const currencyId = this.safeString(response, 'currency');
9279
9086
  const code = this.safeCurrencyCode(currencyId, currency);
9280
- let impliedNetwork = undefined;
9281
- if (url !== undefined) {
9282
- const reverseNetworks = this.safeDict(this.options, 'reverseNetworks', {});
9283
- const parts = url.split('/');
9284
- let topLevel = this.safeString(parts, 2);
9285
- if ((topLevel === 'blockchair.com') || (topLevel === 'viewblock.io')) {
9286
- const subLevel = this.safeString(parts, 3);
9287
- if (subLevel !== undefined) {
9288
- topLevel = topLevel + '/' + subLevel;
9289
- }
9290
- }
9291
- impliedNetwork = this.safeString(reverseNetworks, topLevel);
9292
- const impliedNetworks = this.safeDict(this.options, 'impliedNetworks', {
9293
- 'ETH': { 'ERC20': 'ETH' },
9294
- 'TRX': { 'TRC20': 'TRX' },
9295
- });
9296
- if (code in impliedNetworks) {
9297
- const conversion = this.safeDict(impliedNetworks, code, {});
9298
- impliedNetwork = this.safeString(conversion, impliedNetwork, impliedNetwork);
9299
- }
9300
- }
9087
+ // deposit-address endpoint provides only network url (not network ID/CODE)
9088
+ // so we should map the url to network (their data is inside currencies)
9089
+ const networkCode = this.getNetworkCodeByNetworkUrl(code, url);
9301
9090
  let tag = this.safeString(response, 'tag', '');
9302
9091
  if (tag.length === 0) {
9303
9092
  tag = undefined;
@@ -9306,7 +9095,7 @@ class binance extends binance$1 {
9306
9095
  return {
9307
9096
  'info': response,
9308
9097
  'currency': code,
9309
- 'network': impliedNetwork,
9098
+ 'network': networkCode,
9310
9099
  'address': address,
9311
9100
  'tag': tag,
9312
9101
  };
@@ -12076,6 +11865,41 @@ class binance extends binance$1 {
12076
11865
  };
12077
11866
  return this.safeString(ledgerType, type, type);
12078
11867
  }
11868
+ getNetworkCodeByNetworkUrl(currencyCode, depositUrl = undefined) {
11869
+ // depositUrl is like : https://bscscan.com/address/0xEF238AB229342849..
11870
+ if (depositUrl === undefined) {
11871
+ return undefined;
11872
+ }
11873
+ let networkCode = undefined;
11874
+ const currency = this.currency(currencyCode);
11875
+ const networks = this.safeDict(currency, 'networks', {});
11876
+ const networkCodes = Object.keys(networks);
11877
+ for (let i = 0; i < networkCodes.length; i++) {
11878
+ const currentNetworkCode = networkCodes[i];
11879
+ const info = this.safeDict(networks[currentNetworkCode], 'info', {});
11880
+ const siteUrl = this.safeString(info, 'contractAddressUrl');
11881
+ // check if url matches the field's value
11882
+ if (siteUrl !== undefined && depositUrl.startsWith(this.getBaseDomainFromUrl(siteUrl))) {
11883
+ networkCode = currentNetworkCode;
11884
+ }
11885
+ }
11886
+ return networkCode;
11887
+ }
11888
+ getBaseDomainFromUrl(url) {
11889
+ if (url === undefined) {
11890
+ return undefined;
11891
+ }
11892
+ const urlParts = url.split('/');
11893
+ const scheme = this.safeString(urlParts, 0);
11894
+ if (scheme === undefined) {
11895
+ return undefined;
11896
+ }
11897
+ const domain = this.safeString(urlParts, 2);
11898
+ if (domain === undefined) {
11899
+ return undefined;
11900
+ }
11901
+ return scheme + '//' + domain + '/';
11902
+ }
12079
11903
  sign(path, api = 'public', method = 'GET', params = {}, headers = undefined, body = undefined) {
12080
11904
  const urls = this.urls;
12081
11905
  if (!(api in urls['api'])) {
@@ -3284,7 +3284,7 @@ class bitget extends bitget$1 {
3284
3284
  }
3285
3285
  }
3286
3286
  else {
3287
- request['businessType'] = 'contract';
3287
+ request['businessType'] = 'mix';
3288
3288
  }
3289
3289
  const response = await this.privateCommonGetV2CommonTradeRate(this.extend(request, params));
3290
3290
  //
@@ -28,19 +28,29 @@ class bitopro extends bitopro$1 {
28
28
  'swap': false,
29
29
  'future': false,
30
30
  'option': false,
31
+ 'addMargin': false,
32
+ 'borrowCrossMargin': false,
33
+ 'borrowIsolatedMargin': false,
34
+ 'borrowMargin': false,
31
35
  'cancelAllOrders': true,
32
36
  'cancelOrder': true,
33
37
  'cancelOrders': true,
34
38
  'closeAllPositions': false,
35
39
  'closePosition': false,
36
40
  'createOrder': true,
41
+ 'createOrderWithTakeProfitAndStopLoss': false,
42
+ 'createOrderWithTakeProfitAndStopLossWs': false,
37
43
  'createReduceOnlyOrder': false,
38
44
  'createStopOrder': true,
39
45
  'createTriggerOrder': true,
40
46
  'editOrder': false,
41
47
  'fetchBalance': true,
48
+ 'fetchBorrowInterest': false,
49
+ 'fetchBorrowRate': false,
42
50
  'fetchBorrowRateHistories': false,
43
51
  'fetchBorrowRateHistory': false,
52
+ 'fetchBorrowRates': false,
53
+ 'fetchBorrowRatesPerSymbol': false,
44
54
  'fetchClosedOrders': true,
45
55
  'fetchCrossBorrowRate': false,
46
56
  'fetchCrossBorrowRates': false,
@@ -51,19 +61,39 @@ class bitopro extends bitopro$1 {
51
61
  'fetchDepositWithdrawFee': 'emulated',
52
62
  'fetchDepositWithdrawFees': true,
53
63
  'fetchFundingHistory': false,
64
+ 'fetchFundingInterval': false,
65
+ 'fetchFundingIntervals': false,
54
66
  'fetchFundingRate': false,
55
67
  'fetchFundingRateHistory': false,
56
68
  'fetchFundingRates': false,
69
+ 'fetchGreeks': false,
57
70
  'fetchIndexOHLCV': false,
58
71
  'fetchIsolatedBorrowRate': false,
59
72
  'fetchIsolatedBorrowRates': false,
73
+ 'fetchIsolatedPositions': false,
74
+ 'fetchLeverage': false,
75
+ 'fetchLeverages': false,
76
+ 'fetchLeverageTiers': false,
77
+ 'fetchLiquidations': false,
78
+ 'fetchLongShortRatio': false,
79
+ 'fetchLongShortRatioHistory': false,
80
+ 'fetchMarginAdjustmentHistory': false,
60
81
  'fetchMarginMode': false,
82
+ 'fetchMarginModes': false,
83
+ 'fetchMarketLeverageTiers': false,
61
84
  'fetchMarkets': true,
62
85
  'fetchMarkOHLCV': false,
86
+ 'fetchMarkPrices': false,
87
+ 'fetchMyLiquidations': false,
88
+ 'fetchMySettlementHistory': false,
63
89
  'fetchMyTrades': true,
64
90
  'fetchOHLCV': true,
91
+ 'fetchOpenInterest': false,
65
92
  'fetchOpenInterestHistory': false,
93
+ 'fetchOpenInterests': false,
66
94
  'fetchOpenOrders': true,
95
+ 'fetchOption': false,
96
+ 'fetchOptionChain': false,
67
97
  'fetchOrder': true,
68
98
  'fetchOrderBook': true,
69
99
  'fetchOrders': false,
@@ -76,6 +106,7 @@ class bitopro extends bitopro$1 {
76
106
  'fetchPositionsHistory': false,
77
107
  'fetchPositionsRisk': false,
78
108
  'fetchPremiumIndexOHLCV': false,
109
+ 'fetchSettlementHistory': false,
79
110
  'fetchTicker': true,
80
111
  'fetchTickers': true,
81
112
  'fetchTime': false,
@@ -86,10 +117,16 @@ class bitopro extends bitopro$1 {
86
117
  'fetchTransactions': false,
87
118
  'fetchTransfer': false,
88
119
  'fetchTransfers': false,
120
+ 'fetchVolatilityHistory': false,
89
121
  'fetchWithdrawal': true,
90
122
  'fetchWithdrawals': true,
123
+ 'reduceMargin': false,
124
+ 'repayCrossMargin': false,
125
+ 'repayIsolatedMargin': false,
91
126
  'setLeverage': false,
127
+ 'setMargin': false,
92
128
  'setMarginMode': false,
129
+ 'setPositionMode': false,
93
130
  'transfer': false,
94
131
  'withdraw': true,
95
132
  },
@@ -30,20 +30,32 @@ class bitrue extends bitrue$1 {
30
30
  'swap': true,
31
31
  'future': false,
32
32
  'option': false,
33
+ 'addMargin': false,
34
+ 'borrowCrossMargin': false,
35
+ 'borrowIsolatedMargin': false,
36
+ 'borrowMargin': false,
33
37
  'cancelAllOrders': true,
34
38
  'cancelOrder': true,
39
+ 'closeAllPositions': false,
40
+ 'closePosition': false,
35
41
  'createMarketBuyOrderWithCost': true,
36
42
  'createMarketOrderWithCost': false,
37
43
  'createMarketSellOrderWithCost': false,
38
44
  'createOrder': true,
45
+ 'createOrderWithTakeProfitAndStopLoss': false,
46
+ 'createOrderWithTakeProfitAndStopLossWs': false,
39
47
  'createReduceOnlyOrder': true,
40
48
  'createStopLimitOrder': true,
41
49
  'createStopMarketOrder': true,
42
50
  'createStopOrder': true,
43
51
  'fetchBalance': true,
44
52
  'fetchBidsAsks': true,
53
+ 'fetchBorrowInterest': false,
54
+ 'fetchBorrowRate': false,
45
55
  'fetchBorrowRateHistories': false,
46
56
  'fetchBorrowRateHistory': false,
57
+ 'fetchBorrowRates': false,
58
+ 'fetchBorrowRatesPerSymbol': false,
47
59
  'fetchClosedOrders': true,
48
60
  'fetchCrossBorrowRate': false,
49
61
  'fetchCrossBorrowRates': false,
@@ -54,20 +66,50 @@ class bitrue extends bitrue$1 {
54
66
  'fetchDepositWithdrawFee': 'emulated',
55
67
  'fetchDepositWithdrawFees': true,
56
68
  'fetchFundingHistory': false,
69
+ 'fetchFundingInterval': false,
70
+ 'fetchFundingIntervals': false,
57
71
  'fetchFundingRate': false,
58
72
  'fetchFundingRateHistory': false,
59
73
  'fetchFundingRates': false,
74
+ 'fetchGreeks': false,
75
+ 'fetchIndexOHLCV': false,
60
76
  'fetchIsolatedBorrowRate': false,
61
77
  'fetchIsolatedBorrowRates': false,
78
+ 'fetchIsolatedPositions': false,
79
+ 'fetchLeverage': false,
80
+ 'fetchLeverages': false,
81
+ 'fetchLeverageTiers': false,
82
+ 'fetchLiquidations': false,
83
+ 'fetchLongShortRatio': false,
84
+ 'fetchLongShortRatioHistory': false,
85
+ 'fetchMarginAdjustmentHistory': false,
62
86
  'fetchMarginMode': false,
87
+ 'fetchMarginModes': false,
88
+ 'fetchMarketLeverageTiers': false,
63
89
  'fetchMarkets': true,
90
+ 'fetchMarkOHLCV': false,
91
+ 'fetchMarkPrices': false,
92
+ 'fetchMyLiquidations': false,
93
+ 'fetchMySettlementHistory': false,
64
94
  'fetchMyTrades': true,
65
95
  'fetchOHLCV': true,
96
+ 'fetchOpenInterest': false,
97
+ 'fetchOpenInterestHistory': false,
98
+ 'fetchOpenInterests': false,
66
99
  'fetchOpenOrders': true,
100
+ 'fetchOption': false,
101
+ 'fetchOptionChain': false,
67
102
  'fetchOrder': true,
68
103
  'fetchOrderBook': true,
69
104
  'fetchOrders': false,
105
+ 'fetchPosition': false,
106
+ 'fetchPositionHistory': false,
70
107
  'fetchPositionMode': false,
108
+ 'fetchPositions': false,
109
+ 'fetchPositionsHistory': false,
110
+ 'fetchPositionsRisk': false,
111
+ 'fetchPremiumIndexOHLCV': false,
112
+ 'fetchSettlementHistory': false,
71
113
  'fetchStatus': true,
72
114
  'fetchTicker': true,
73
115
  'fetchTickers': true,
@@ -78,9 +120,15 @@ class bitrue extends bitrue$1 {
78
120
  'fetchTransactionFees': false,
79
121
  'fetchTransactions': false,
80
122
  'fetchTransfers': true,
123
+ 'fetchVolatilityHistory': false,
81
124
  'fetchWithdrawals': true,
125
+ 'reduceMargin': false,
126
+ 'repayCrossMargin': false,
127
+ 'repayIsolatedMargin': false,
82
128
  'setLeverage': true,
83
129
  'setMargin': true,
130
+ 'setMarginMode': false,
131
+ 'setPositionMode': false,
84
132
  'transfer': true,
85
133
  'withdraw': true,
86
134
  },
@@ -750,6 +750,9 @@ class coinex extends coinex$1 {
750
750
  for (let j = 0; j < chains.length; j++) {
751
751
  const chain = chains[j];
752
752
  const networkId = this.safeString(chain, 'chain');
753
+ if (networkId === undefined) {
754
+ continue;
755
+ }
753
756
  const precisionString = this.parsePrecision(this.safeString(chain, 'withdrawal_precision'));
754
757
  const feeString = this.safeString(chain, 'withdrawal_fee');
755
758
  const minNetworkDepositString = this.safeString(chain, 'min_deposit_amount');