ccxt 4.4.26 → 4.4.28

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 (105) hide show
  1. package/README.md +133 -132
  2. package/dist/ccxt.browser.min.js +3 -3
  3. package/dist/cjs/ccxt.js +1 -1
  4. package/dist/cjs/src/ace.js +1 -1
  5. package/dist/cjs/src/alpaca.js +198 -5
  6. package/dist/cjs/src/ascendex.js +1 -1
  7. package/dist/cjs/src/base/Exchange.js +18 -0
  8. package/dist/cjs/src/bequant.js +1 -1
  9. package/dist/cjs/src/bigone.js +1 -1
  10. package/dist/cjs/src/binance.js +8 -1
  11. package/dist/cjs/src/binancecoinm.js +1 -1
  12. package/dist/cjs/src/binanceus.js +1 -1
  13. package/dist/cjs/src/binanceusdm.js +1 -1
  14. package/dist/cjs/src/bingx.js +25 -36
  15. package/dist/cjs/src/bit2c.js +1 -1
  16. package/dist/cjs/src/bitbank.js +1 -1
  17. package/dist/cjs/src/bitbns.js +1 -1
  18. package/dist/cjs/src/bitfinex.js +1 -1
  19. package/dist/cjs/src/bitfinex2.js +1 -1
  20. package/dist/cjs/src/bitflyer.js +1 -1
  21. package/dist/cjs/src/bitget.js +1 -1
  22. package/dist/cjs/src/bithumb.js +1 -1
  23. package/dist/cjs/src/bitmart.js +1 -1
  24. package/dist/cjs/src/bitmex.js +1 -1
  25. package/dist/cjs/src/bitopro.js +1 -1
  26. package/dist/cjs/src/bitrue.js +1 -1
  27. package/dist/cjs/src/bitso.js +1 -1
  28. package/dist/cjs/src/bitstamp.js +1 -1
  29. package/dist/cjs/src/bitteam.js +1 -1
  30. package/dist/cjs/src/bitvavo.js +1 -1
  31. package/dist/cjs/src/bl3p.js +1 -1
  32. package/dist/cjs/src/blockchaincom.js +1 -1
  33. package/dist/cjs/src/blofin.js +1 -1
  34. package/dist/cjs/src/btcalpha.js +1 -1
  35. package/dist/cjs/src/btcbox.js +1 -1
  36. package/dist/cjs/src/btcmarkets.js +1 -1
  37. package/dist/cjs/src/btcturk.js +1 -1
  38. package/dist/cjs/src/bybit.js +5 -1
  39. package/dist/cjs/src/coinbase.js +97 -11
  40. package/dist/cjs/src/coinex.js +1 -1
  41. package/dist/cjs/src/gate.js +22 -16
  42. package/dist/cjs/src/hyperliquid.js +21 -1
  43. package/dist/cjs/src/kraken.js +48 -35
  44. package/dist/cjs/src/lbank.js +100 -1
  45. package/dist/cjs/src/pro/binance.js +5 -7
  46. package/dist/cjs/src/pro/lbank.js +9 -4
  47. package/dist/cjs/src/wavesexchange.js +14 -2
  48. package/examples/js/cli.js +23 -3
  49. package/js/ccxt.d.ts +1 -1
  50. package/js/ccxt.js +1 -1
  51. package/js/src/abstract/alpaca.d.ts +2 -0
  52. package/js/src/abstract/binance.d.ts +7 -0
  53. package/js/src/abstract/binancecoinm.d.ts +7 -0
  54. package/js/src/abstract/binanceus.d.ts +7 -0
  55. package/js/src/abstract/binanceusdm.d.ts +7 -0
  56. package/js/src/ace.js +1 -1
  57. package/js/src/alpaca.d.ts +9 -1
  58. package/js/src/alpaca.js +198 -5
  59. package/js/src/ascendex.js +1 -1
  60. package/js/src/base/Exchange.d.ts +6 -0
  61. package/js/src/base/Exchange.js +18 -0
  62. package/js/src/bequant.js +1 -1
  63. package/js/src/bigone.js +1 -1
  64. package/js/src/binance.js +8 -1
  65. package/js/src/binancecoinm.js +1 -1
  66. package/js/src/binanceus.js +1 -1
  67. package/js/src/binanceusdm.js +1 -1
  68. package/js/src/bingx.js +25 -36
  69. package/js/src/bit2c.js +1 -1
  70. package/js/src/bitbank.js +1 -1
  71. package/js/src/bitbns.js +1 -1
  72. package/js/src/bitfinex.js +1 -1
  73. package/js/src/bitfinex2.js +1 -1
  74. package/js/src/bitflyer.js +1 -1
  75. package/js/src/bitget.js +1 -1
  76. package/js/src/bithumb.js +1 -1
  77. package/js/src/bitmart.js +1 -1
  78. package/js/src/bitmex.js +1 -1
  79. package/js/src/bitopro.js +1 -1
  80. package/js/src/bitrue.js +1 -1
  81. package/js/src/bitso.js +1 -1
  82. package/js/src/bitstamp.js +1 -1
  83. package/js/src/bitteam.js +1 -1
  84. package/js/src/bitvavo.js +1 -1
  85. package/js/src/bl3p.js +1 -1
  86. package/js/src/blockchaincom.js +1 -1
  87. package/js/src/blofin.js +1 -1
  88. package/js/src/btcalpha.js +1 -1
  89. package/js/src/btcbox.js +1 -1
  90. package/js/src/btcmarkets.js +1 -1
  91. package/js/src/btcturk.js +1 -1
  92. package/js/src/bybit.js +5 -1
  93. package/js/src/coinbase.d.ts +1 -0
  94. package/js/src/coinbase.js +97 -11
  95. package/js/src/coinex.js +1 -1
  96. package/js/src/gate.js +22 -16
  97. package/js/src/hyperliquid.d.ts +1 -0
  98. package/js/src/hyperliquid.js +21 -1
  99. package/js/src/kraken.js +48 -35
  100. package/js/src/lbank.d.ts +4 -1
  101. package/js/src/lbank.js +100 -1
  102. package/js/src/pro/binance.js +5 -7
  103. package/js/src/pro/lbank.js +9 -4
  104. package/js/src/wavesexchange.js +14 -2
  105. package/package.json +1 -1
package/dist/cjs/ccxt.js CHANGED
@@ -197,7 +197,7 @@ var xt$1 = require('./src/pro/xt.js');
197
197
 
198
198
  //-----------------------------------------------------------------------------
199
199
  // this is updated by vss.js when building
200
- const version = '4.4.26';
200
+ const version = '4.4.28';
201
201
  Exchange["default"].ccxtVersion = version;
202
202
  const exchanges = {
203
203
  'ace': ace,
@@ -103,7 +103,7 @@ class ace extends ace$1 {
103
103
  '1M': 31,
104
104
  },
105
105
  'urls': {
106
- 'logo': 'https://user-images.githubusercontent.com/1294454/216908003-fb314cf6-e66e-471c-b91d-1d86e4baaa90.jpg',
106
+ 'logo': 'https://github.com/user-attachments/assets/115f1e4a-0fd0-4b76-85d5-a49ebf64d1c8',
107
107
  'api': {
108
108
  'public': 'https://ace.io/polarisex',
109
109
  'private': 'https://ace.io/polarisex/open',
@@ -1,6 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  var alpaca$1 = require('./abstract/alpaca.js');
4
+ var Precise = require('./base/Precise.js');
4
5
  var errors = require('./base/errors.js');
5
6
  var number = require('./base/functions/number.js');
6
7
 
@@ -23,7 +24,7 @@ class alpaca extends alpaca$1 {
23
24
  'hostname': 'alpaca.markets',
24
25
  'pro': true,
25
26
  'urls': {
26
- 'logo': 'https://user-images.githubusercontent.com/1294454/187234005-b864db3d-f1e3-447a-aaf9-a9fc7b955d07.jpg',
27
+ 'logo': 'https://github.com/user-attachments/assets/e9476df8-a450-4c3e-ab9a-1a7794219e1b',
27
28
  'www': 'https://alpaca.markets',
28
29
  'api': {
29
30
  'broker': 'https://broker-api.{hostname}',
@@ -56,8 +57,8 @@ class alpaca extends alpaca$1 {
56
57
  'fetchCurrencies': false,
57
58
  'fetchDepositAddress': true,
58
59
  'fetchDepositAddressesByNetwork': false,
59
- 'fetchDeposits': false,
60
- 'fetchDepositsWithdrawals': false,
60
+ 'fetchDeposits': true,
61
+ 'fetchDepositsWithdrawals': true,
61
62
  'fetchFundingHistory': false,
62
63
  'fetchFundingRate': false,
63
64
  'fetchFundingRateHistory': false,
@@ -89,12 +90,12 @@ class alpaca extends alpaca$1 {
89
90
  'fetchTransactionFees': false,
90
91
  'fetchTransactions': false,
91
92
  'fetchTransfers': false,
92
- 'fetchWithdrawals': false,
93
+ 'fetchWithdrawals': true,
93
94
  'sandbox': true,
94
95
  'setLeverage': false,
95
96
  'setMarginMode': false,
96
97
  'transfer': false,
97
- 'withdraw': false,
98
+ 'withdraw': true,
98
99
  },
99
100
  'api': {
100
101
  'broker': {},
@@ -120,12 +121,14 @@ class alpaca extends alpaca$1 {
120
121
  'v2/corporate_actions/announcements/{id}',
121
122
  'v2/corporate_actions/announcements',
122
123
  'v2/wallets',
124
+ 'v2/wallets/transfers',
123
125
  ],
124
126
  'post': [
125
127
  'v2/orders',
126
128
  'v2/watchlists',
127
129
  'v2/watchlists/{watchlist_id}',
128
130
  'v2/watchlists:by_name',
131
+ 'v2/wallets/transfers',
129
132
  ],
130
133
  'put': [
131
134
  'v2/watchlists/{watchlist_id}',
@@ -1339,6 +1342,196 @@ class alpaca extends alpaca$1 {
1339
1342
  'tag': undefined,
1340
1343
  };
1341
1344
  }
1345
+ async withdraw(code, amount, address, tag = undefined, params = {}) {
1346
+ /**
1347
+ * @method
1348
+ * @name alpaca#withdraw
1349
+ * @description make a withdrawal
1350
+ * @see https://docs.alpaca.markets/reference/createcryptotransferforaccount
1351
+ * @param {string} code unified currency code
1352
+ * @param {float} amount the amount to withdraw
1353
+ * @param {string} address the address to withdraw to
1354
+ * @param {string} tag a memo for the transaction
1355
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
1356
+ * @returns {object} a [transaction structure]{@link https://docs.ccxt.com/#/?id=transaction-structure}
1357
+ */
1358
+ [tag, params] = this.handleWithdrawTagAndParams(tag, params);
1359
+ this.checkAddress(address);
1360
+ await this.loadMarkets();
1361
+ const currency = this.currency(code);
1362
+ if (tag) {
1363
+ address = address + ':' + tag;
1364
+ }
1365
+ const request = {
1366
+ 'asset': currency['id'],
1367
+ 'address': address,
1368
+ 'amount': this.numberToString(amount),
1369
+ };
1370
+ const response = await this.traderPrivatePostV2WalletsTransfers(this.extend(request, params));
1371
+ //
1372
+ // {
1373
+ // "id": "e27b70a6-5610-40d7-8468-a516a284b776",
1374
+ // "tx_hash": null,
1375
+ // "direction": "OUTGOING",
1376
+ // "amount": "20",
1377
+ // "usd_value": "19.99856",
1378
+ // "chain": "ETH",
1379
+ // "asset": "USDT",
1380
+ // "from_address": "0x123930E4dCA196E070d39B60c644C8Aae02f23",
1381
+ // "to_address": "0x1232c0925196e4dcf05945f67f690153190fbaab",
1382
+ // "status": "PROCESSING",
1383
+ // "created_at": "2024-11-07T02:39:01.775495Z",
1384
+ // "network_fee": "4",
1385
+ // "fees": "0.1"
1386
+ // }
1387
+ //
1388
+ return this.parseTransaction(response, currency);
1389
+ }
1390
+ async fetchTransactionsHelper(type, code, since, limit, params) {
1391
+ await this.loadMarkets();
1392
+ let currency = undefined;
1393
+ if (code !== undefined) {
1394
+ currency = this.currency(code);
1395
+ }
1396
+ const response = await this.traderPrivateGetV2WalletsTransfers(params);
1397
+ //
1398
+ // {
1399
+ // "id": "e27b70a6-5610-40d7-8468-a516a284b776",
1400
+ // "tx_hash": null,
1401
+ // "direction": "OUTGOING",
1402
+ // "amount": "20",
1403
+ // "usd_value": "19.99856",
1404
+ // "chain": "ETH",
1405
+ // "asset": "USDT",
1406
+ // "from_address": "0x123930E4dCA196E070d39B60c644C8Aae02f23",
1407
+ // "to_address": "0x1232c0925196e4dcf05945f67f690153190fbaab",
1408
+ // "status": "PROCESSING",
1409
+ // "created_at": "2024-11-07T02:39:01.775495Z",
1410
+ // "network_fee": "4",
1411
+ // "fees": "0.1"
1412
+ // }
1413
+ //
1414
+ const results = [];
1415
+ for (let i = 0; i < response.length; i++) {
1416
+ const entry = response[i];
1417
+ const direction = this.safeString(entry, 'direction');
1418
+ if (direction === type) {
1419
+ results.push(entry);
1420
+ }
1421
+ else if (type === 'BOTH') {
1422
+ results.push(entry);
1423
+ }
1424
+ }
1425
+ return this.parseTransactions(results, currency, since, limit, params);
1426
+ }
1427
+ async fetchDepositsWithdrawals(code = undefined, since = undefined, limit = undefined, params = {}) {
1428
+ /**
1429
+ * @method
1430
+ * @name alpaca#fetchDepositsWithdrawals
1431
+ * @description fetch history of deposits and withdrawals
1432
+ * @see https://docs.alpaca.markets/reference/listcryptofundingtransfers
1433
+ * @param {string} [code] unified currency code for the currency of the deposit/withdrawals, default is undefined
1434
+ * @param {int} [since] timestamp in ms of the earliest deposit/withdrawal, default is undefined
1435
+ * @param {int} [limit] max number of deposit/withdrawals to return, default is undefined
1436
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
1437
+ * @returns {object} a list of [transaction structure]{@link https://docs.ccxt.com/#/?id=transaction-structure}
1438
+ */
1439
+ return await this.fetchTransactionsHelper('BOTH', code, since, limit, params);
1440
+ }
1441
+ async fetchDeposits(code = undefined, since = undefined, limit = undefined, params = {}) {
1442
+ /**
1443
+ * @method
1444
+ * @name alpaca#fetchDeposits
1445
+ * @description fetch all deposits made to an account
1446
+ * @see https://docs.alpaca.markets/reference/listcryptofundingtransfers
1447
+ * @param {string} [code] unified currency code
1448
+ * @param {int} [since] the earliest time in ms to fetch deposits for
1449
+ * @param {int} [limit] the maximum number of deposit structures to retrieve
1450
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
1451
+ * @returns {object[]} a list of [transaction structures]{@link https://docs.ccxt.com/#/?id=transaction-structure}
1452
+ */
1453
+ return await this.fetchTransactionsHelper('INCOMING', code, since, limit, params);
1454
+ }
1455
+ async fetchWithdrawals(code = undefined, since = undefined, limit = undefined, params = {}) {
1456
+ /**
1457
+ * @method
1458
+ * @name alpaca#fetchWithdrawals
1459
+ * @description fetch all withdrawals made from an account
1460
+ * @see https://docs.alpaca.markets/reference/listcryptofundingtransfers
1461
+ * @param {string} [code] unified currency code
1462
+ * @param {int} [since] the earliest time in ms to fetch withdrawals for
1463
+ * @param {int} [limit] the maximum number of withdrawal structures to retrieve
1464
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
1465
+ * @returns {object[]} a list of [transaction structures]{@link https://docs.ccxt.com/#/?id=transaction-structure}
1466
+ */
1467
+ return await this.fetchTransactionsHelper('OUTGOING', code, since, limit, params);
1468
+ }
1469
+ parseTransaction(transaction, currency = undefined) {
1470
+ //
1471
+ // {
1472
+ // "id": "e27b70a6-5610-40d7-8468-a516a284b776",
1473
+ // "tx_hash": null,
1474
+ // "direction": "OUTGOING",
1475
+ // "amount": "20",
1476
+ // "usd_value": "19.99856",
1477
+ // "chain": "ETH",
1478
+ // "asset": "USDT",
1479
+ // "from_address": "0x123930E4dCA196E070d39B60c644C8Aae02f23",
1480
+ // "to_address": "0x1232c0925196e4dcf05945f67f690153190fbaab",
1481
+ // "status": "PROCESSING",
1482
+ // "created_at": "2024-11-07T02:39:01.775495Z",
1483
+ // "network_fee": "4",
1484
+ // "fees": "0.1"
1485
+ // }
1486
+ //
1487
+ const datetime = this.safeString(transaction, 'created_at');
1488
+ const currencyId = this.safeString(transaction, 'asset');
1489
+ const code = this.safeCurrencyCode(currencyId, currency);
1490
+ const fees = this.safeString(transaction, 'fees');
1491
+ const networkFee = this.safeString(transaction, 'network_fee');
1492
+ const totalFee = Precise["default"].stringAdd(fees, networkFee);
1493
+ const fee = {
1494
+ 'cost': this.parseNumber(totalFee),
1495
+ 'currency': code,
1496
+ };
1497
+ return {
1498
+ 'info': transaction,
1499
+ 'id': this.safeString(transaction, 'id'),
1500
+ 'txid': this.safeString(transaction, 'tx_hash'),
1501
+ 'timestamp': this.parse8601(datetime),
1502
+ 'datetime': datetime,
1503
+ 'network': this.safeString(transaction, 'chain'),
1504
+ 'address': this.safeString(transaction, 'to_address'),
1505
+ 'addressTo': this.safeString(transaction, 'to_address'),
1506
+ 'addressFrom': this.safeString(transaction, 'from_address'),
1507
+ 'tag': undefined,
1508
+ 'tagTo': undefined,
1509
+ 'tagFrom': undefined,
1510
+ 'type': this.parseTransactionType(this.safeString(transaction, 'direction')),
1511
+ 'amount': this.safeNumber(transaction, 'amount'),
1512
+ 'currency': code,
1513
+ 'status': this.parseTransactionStatus(this.safeString(transaction, 'status')),
1514
+ 'updated': undefined,
1515
+ 'fee': fee,
1516
+ 'comment': undefined,
1517
+ 'internal': undefined,
1518
+ };
1519
+ }
1520
+ parseTransactionStatus(status) {
1521
+ const statuses = {
1522
+ 'PROCESSING': 'pending',
1523
+ 'FAILED': 'failed',
1524
+ 'COMPLETE': 'ok',
1525
+ };
1526
+ return this.safeString(statuses, status, status);
1527
+ }
1528
+ parseTransactionType(type) {
1529
+ const types = {
1530
+ 'INCOMING': 'deposit',
1531
+ 'OUTGOING': 'withdrawal',
1532
+ };
1533
+ return this.safeString(types, type, type);
1534
+ }
1342
1535
  sign(path, api = 'public', method = 'GET', params = {}, headers = undefined, body = undefined) {
1343
1536
  let endpoint = '/' + this.implodeParams(path, params);
1344
1537
  let url = this.implodeHostname(this.urls['api'][api[0]]);
@@ -113,7 +113,7 @@ class ascendex extends ascendex$1 {
113
113
  },
114
114
  'version': 'v2',
115
115
  'urls': {
116
- 'logo': 'https://user-images.githubusercontent.com/1294454/112027508-47984600-8b48-11eb-9e17-d26459cc36c6.jpg',
116
+ 'logo': 'https://github.com/user-attachments/assets/55bab6b9-d4ca-42a8-a0e6-fac81ae557f1',
117
117
  'api': {
118
118
  'rest': 'https://ascendex.com',
119
119
  },
@@ -2036,9 +2036,15 @@ class Exchange {
2036
2036
  async watchTrades(symbol, since = undefined, limit = undefined, params = {}) {
2037
2037
  throw new errors.NotSupported(this.id + ' watchTrades() is not supported yet');
2038
2038
  }
2039
+ async unWatchTrades(symbol, params = {}) {
2040
+ throw new errors.NotSupported(this.id + ' unWatchTrades() is not supported yet');
2041
+ }
2039
2042
  async watchTradesForSymbols(symbols, since = undefined, limit = undefined, params = {}) {
2040
2043
  throw new errors.NotSupported(this.id + ' watchTradesForSymbols() is not supported yet');
2041
2044
  }
2045
+ async unWatchTradesForSymbols(symbols, params = {}) {
2046
+ throw new errors.NotSupported(this.id + ' unWatchTradesForSymbols() is not supported yet');
2047
+ }
2042
2048
  async watchMyTradesForSymbols(symbols, since = undefined, limit = undefined, params = {}) {
2043
2049
  throw new errors.NotSupported(this.id + ' watchMyTradesForSymbols() is not supported yet');
2044
2050
  }
@@ -2048,9 +2054,15 @@ class Exchange {
2048
2054
  async watchOHLCVForSymbols(symbolsAndTimeframes, since = undefined, limit = undefined, params = {}) {
2049
2055
  throw new errors.NotSupported(this.id + ' watchOHLCVForSymbols() is not supported yet');
2050
2056
  }
2057
+ async unWatchOHLCVForSymbols(symbolsAndTimeframes, params = {}) {
2058
+ throw new errors.NotSupported(this.id + ' unWatchOHLCVForSymbols() is not supported yet');
2059
+ }
2051
2060
  async watchOrderBookForSymbols(symbols, limit = undefined, params = {}) {
2052
2061
  throw new errors.NotSupported(this.id + ' watchOrderBookForSymbols() is not supported yet');
2053
2062
  }
2063
+ async unWatchOrderBookForSymbols(symbols, params = {}) {
2064
+ throw new errors.NotSupported(this.id + ' unWatchOrderBookForSymbols() is not supported yet');
2065
+ }
2054
2066
  async fetchDepositAddresses(codes = undefined, params = {}) {
2055
2067
  throw new errors.NotSupported(this.id + ' fetchDepositAddresses() is not supported yet');
2056
2068
  }
@@ -2087,6 +2099,9 @@ class Exchange {
2087
2099
  async watchOrderBook(symbol, limit = undefined, params = {}) {
2088
2100
  throw new errors.NotSupported(this.id + ' watchOrderBook() is not supported yet');
2089
2101
  }
2102
+ async unWatchOrderBook(symbol, params = {}) {
2103
+ throw new errors.NotSupported(this.id + ' unWatchOrderBook() is not supported yet');
2104
+ }
2090
2105
  async fetchTime(params = {}) {
2091
2106
  throw new errors.NotSupported(this.id + ' fetchTime() is not supported yet');
2092
2107
  }
@@ -4515,6 +4530,9 @@ class Exchange {
4515
4530
  async watchTickers(symbols = undefined, params = {}) {
4516
4531
  throw new errors.NotSupported(this.id + ' watchTickers() is not supported yet');
4517
4532
  }
4533
+ async unWatchTickers(symbols = undefined, params = {}) {
4534
+ throw new errors.NotSupported(this.id + ' unWatchTickers() is not supported yet');
4535
+ }
4518
4536
  async fetchOrder(id, symbol = undefined, params = {}) {
4519
4537
  throw new errors.NotSupported(this.id + ' fetchOrder() is not supported yet');
4520
4538
  }
@@ -12,7 +12,7 @@ class bequant extends hitbtc {
12
12
  'countries': ['MT'],
13
13
  'pro': true,
14
14
  'urls': {
15
- 'logo': 'https://user-images.githubusercontent.com/1294454/55248342-a75dfe00-525a-11e9-8aa2-05e9dca943c6.jpg',
15
+ 'logo': 'https://github.com/user-attachments/assets/0583ef1f-29fe-4b7c-8189-63565a0e2867',
16
16
  'api': {
17
17
  'public': 'https://api.bequant.io/api/3',
18
18
  'private': 'https://api.bequant.io/api/3',
@@ -83,7 +83,7 @@ class bigone extends bigone$1 {
83
83
  },
84
84
  'hostname': 'big.one',
85
85
  'urls': {
86
- 'logo': 'https://user-images.githubusercontent.com/1294454/69354403-1d532180-0c91-11ea-88ed-44c06cefdf87.jpg',
86
+ 'logo': 'https://github.com/user-attachments/assets/4e5cfd53-98cc-4b90-92cd-0d7b512653d1',
87
87
  'api': {
88
88
  'public': 'https://{hostname}/api/v3',
89
89
  'private': 'https://{hostname}/api/v3/viewer',
@@ -188,7 +188,7 @@ class binance extends binance$1 {
188
188
  '1M': '1M',
189
189
  },
190
190
  'urls': {
191
- 'logo': 'https://user-images.githubusercontent.com/1294454/29604020-d5483cdc-87ee-11e7-94c7-d1a8d9169293.jpg',
191
+ 'logo': 'https://github.com/user-attachments/assets/e9419b93-ccb0-46aa-9bff-c883f096274b',
192
192
  'test': {
193
193
  'dapiPublic': 'https://testnet.binancefuture.com/dapi/v1',
194
194
  'dapiPrivate': 'https://testnet.binancefuture.com/dapi/v1',
@@ -950,6 +950,9 @@ class binance extends binance$1 {
950
950
  'mmp': 1,
951
951
  'countdownCancelAll': 1,
952
952
  'order': 1,
953
+ 'block/order/orders': 5,
954
+ 'block/order/execute': 5,
955
+ 'block/user-trades': 5,
953
956
  },
954
957
  'post': {
955
958
  'order': 1,
@@ -959,9 +962,12 @@ class binance extends binance$1 {
959
962
  'mmpReset': 1,
960
963
  'countdownCancelAll': 1,
961
964
  'countdownCancelAllHeartBeat': 10,
965
+ 'block/order/create': 5,
966
+ 'block/order/execute': 5,
962
967
  },
963
968
  'put': {
964
969
  'listenKey': 1,
970
+ 'block/order/create': 5,
965
971
  },
966
972
  'delete': {
967
973
  'order': 1,
@@ -969,6 +975,7 @@ class binance extends binance$1 {
969
975
  'allOpenOrders': 1,
970
976
  'allOpenOrdersByUnderlying': 1,
971
977
  'listenKey': 1,
978
+ 'block/order/create': 5,
972
979
  },
973
980
  },
974
981
  'public': {
@@ -10,7 +10,7 @@ class binancecoinm extends binance {
10
10
  'id': 'binancecoinm',
11
11
  'name': 'Binance COIN-M',
12
12
  'urls': {
13
- 'logo': 'https://user-images.githubusercontent.com/1294454/117738721-668c8d80-b205-11eb-8c49-3fad84c4a07f.jpg',
13
+ 'logo': 'https://github.com/user-attachments/assets/387cfc4e-5f33-48cd-8f5c-cd4854dabf0c',
14
14
  'doc': [
15
15
  'https://binance-docs.github.io/apidocs/delivery/en/',
16
16
  'https://binance-docs.github.io/apidocs/spot/en',
@@ -15,7 +15,7 @@ class binanceus extends binance {
15
15
  'certified': false,
16
16
  'pro': true,
17
17
  'urls': {
18
- 'logo': 'https://user-images.githubusercontent.com/1294454/65177307-217b7c80-da5f-11e9-876e-0b748ba0a358.jpg',
18
+ 'logo': 'https://github.com/user-attachments/assets/a9667919-b632-4d52-a832-df89f8a35e8c',
19
19
  'api': {
20
20
  'web': 'https://www.binance.us',
21
21
  'public': 'https://api.binance.us/api/v3',
@@ -11,7 +11,7 @@ class binanceusdm extends binance {
11
11
  'id': 'binanceusdm',
12
12
  'name': 'Binance USDⓈ-M',
13
13
  'urls': {
14
- 'logo': 'https://user-images.githubusercontent.com/1294454/117738721-668c8d80-b205-11eb-8c49-3fad84c4a07f.jpg',
14
+ 'logo': 'https://github.com/user-attachments/assets/871cbea7-eebb-4b28-b260-c1c91df0487a',
15
15
  'doc': [
16
16
  'https://binance-docs.github.io/apidocs/futures/en/',
17
17
  'https://binance-docs.github.io/apidocs/spot/en',
@@ -2860,19 +2860,12 @@ class bingx extends bingx$1 {
2860
2860
  */
2861
2861
  await this.loadMarkets();
2862
2862
  const ordersRequests = [];
2863
- let symbol = undefined;
2863
+ const marketIds = [];
2864
2864
  for (let i = 0; i < orders.length; i++) {
2865
2865
  const rawOrder = orders[i];
2866
2866
  const marketId = this.safeString(rawOrder, 'symbol');
2867
- if (symbol === undefined) {
2868
- symbol = marketId;
2869
- }
2870
- else {
2871
- if (symbol !== marketId) {
2872
- throw new errors.BadRequest(this.id + ' createOrders() requires all orders to have the same symbol');
2873
- }
2874
- }
2875
2867
  const type = this.safeString(rawOrder, 'type');
2868
+ marketIds.push(marketId);
2876
2869
  const side = this.safeString(rawOrder, 'side');
2877
2870
  const amount = this.safeNumber(rawOrder, 'amount');
2878
2871
  const price = this.safeNumber(rawOrder, 'price');
@@ -2880,10 +2873,15 @@ class bingx extends bingx$1 {
2880
2873
  const orderRequest = this.createOrderRequest(marketId, type, side, amount, price, orderParams);
2881
2874
  ordersRequests.push(orderRequest);
2882
2875
  }
2883
- const market = this.market(symbol);
2876
+ const symbols = this.marketSymbols(marketIds, undefined, false, true, true);
2877
+ const symbolsLength = symbols.length;
2878
+ const market = this.market(symbols[0]);
2884
2879
  const request = {};
2885
2880
  let response = undefined;
2886
2881
  if (market['swap']) {
2882
+ if (symbolsLength > 5) {
2883
+ throw new errors.InvalidOrder(this.id + ' createOrders() can not create more than 5 orders at once for swap markets');
2884
+ }
2887
2885
  request['batchOrders'] = this.json(ordersRequests);
2888
2886
  response = await this.swapV2PrivatePostTradeBatchOrders(request);
2889
2887
  }
@@ -2940,6 +2938,13 @@ class bingx extends bingx$1 {
2940
2938
  // }
2941
2939
  // }
2942
2940
  //
2941
+ if (typeof response === 'string') {
2942
+ // broken api engine : order-ids are too long numbers (i.e. 1742930526912864656)
2943
+ // and JSON.parse can not handle them in JS, so we have to use .parseJson
2944
+ // however, when order has an attached SL/TP, their value types need extra parsing
2945
+ response = this.fixStringifiedJsonMembers(response);
2946
+ response = this.parseJson(response);
2947
+ }
2943
2948
  const data = this.safeDict(response, 'data', {});
2944
2949
  const result = this.safeList(data, 'orders', []);
2945
2950
  return this.parseOrders(result, market);
@@ -4580,37 +4585,21 @@ class bingx extends bingx$1 {
4580
4585
  }
4581
4586
  parseDepositAddress(depositAddress, currency = undefined) {
4582
4587
  //
4583
- // {
4584
- // "coinId": "799",
4585
- // "coin": "USDT",
4586
- // "network": "BEP20",
4587
- // "address": "6a7eda2817462dabb6493277a2cfe0f5c3f2550b",
4588
- // "tag": ''
4589
- // }
4588
+ // {
4589
+ // "coinId":"4",
4590
+ // "coin":"USDT",
4591
+ // "network":"OMNI",
4592
+ // "address":"1HXyx8HVQRY7Nhqz63nwnRB7SpS9xQPzLN",
4593
+ // "addressWithPrefix":"1HXyx8HVQRY7Nhqz63nwnRB7SpS9xQPzLN"
4594
+ // }
4590
4595
  //
4591
- let address = this.safeString(depositAddress, 'address');
4592
4596
  const tag = this.safeString(depositAddress, 'tag');
4593
4597
  const currencyId = this.safeString(depositAddress, 'coin');
4594
4598
  currency = this.safeCurrency(currencyId, currency);
4595
4599
  const code = currency['code'];
4596
- // the exchange API returns deposit addresses without the leading '0x' prefix
4597
- // however, the exchange API does require the 0x prefix to withdraw
4598
- // so we append the prefix before returning the address to the user
4599
- // that is only if the underlying contract address has the 0x prefix as well
4600
- const networkCode = this.safeString(depositAddress, 'network');
4601
- if (networkCode !== undefined) {
4602
- if (networkCode in currency['networks']) {
4603
- const network = currency['networks'][networkCode];
4604
- const contractAddress = this.safeString(network['info'], 'contractAddress');
4605
- if (contractAddress !== undefined) {
4606
- if (contractAddress[0] === '0' && contractAddress[1] === 'x') {
4607
- if (address[0] !== '0' || address[1] !== 'x') {
4608
- address = '0x' + address;
4609
- }
4610
- }
4611
- }
4612
- }
4613
- }
4600
+ const address = this.safeString(depositAddress, 'addressWithPrefix');
4601
+ const networkdId = this.safeString(depositAddress, 'network');
4602
+ const networkCode = this.networkIdToCode(networkdId, code);
4614
4603
  this.checkAddress(address);
4615
4604
  return {
4616
4605
  'info': depositAddress,
@@ -77,7 +77,7 @@ class bit2c extends bit2c$1 {
77
77
  'ws': false,
78
78
  },
79
79
  'urls': {
80
- 'logo': 'https://user-images.githubusercontent.com/1294454/27766119-3593220e-5ece-11e7-8b3a-5a041f6bcc3f.jpg',
80
+ 'logo': 'https://github.com/user-attachments/assets/db0bce50-6842-4c09-a1d5-0c87d22118aa',
81
81
  'api': {
82
82
  'rest': 'https://bit2c.co.il',
83
83
  },
@@ -92,7 +92,7 @@ class bitbank extends bitbank$1 {
92
92
  },
93
93
  'hostname': 'bitbank.cc',
94
94
  'urls': {
95
- 'logo': 'https://user-images.githubusercontent.com/1294454/37808081-b87f2d9c-2e59-11e8-894d-c1900b7584fe.jpg',
95
+ 'logo': 'https://github.com/user-attachments/assets/9d616de0-8a88-4468-8e38-d269acab0348',
96
96
  'api': {
97
97
  'public': 'https://public.{hostname}',
98
98
  'private': 'https://api.{hostname}',
@@ -67,7 +67,7 @@ class bitbns extends bitbns$1 {
67
67
  },
68
68
  'hostname': 'bitbns.com',
69
69
  'urls': {
70
- 'logo': 'https://user-images.githubusercontent.com/1294454/117201933-e7a6e780-adf5-11eb-9d80-98fc2a21c3d6.jpg',
70
+ 'logo': 'https://github.com/user-attachments/assets/a5b9a562-cdd8-4bea-9fa7-fd24c1dad3d9',
71
71
  'api': {
72
72
  'www': 'https://{hostname}',
73
73
  'v1': 'https://api.{hostname}/api/trade/v1',
@@ -88,7 +88,7 @@ class bitfinex extends bitfinex$1 {
88
88
  '1M': '1M',
89
89
  },
90
90
  'urls': {
91
- 'logo': 'https://user-images.githubusercontent.com/1294454/27766244-e328a50c-5ed2-11e7-947b-041416579bb3.jpg',
91
+ 'logo': 'https://github.com/user-attachments/assets/9147c6c5-7197-481e-827b-7483672bb0e9',
92
92
  'api': {
93
93
  'v2': 'https://api-pub.bitfinex.com',
94
94
  'public': 'https://api.bitfinex.com',
@@ -128,7 +128,7 @@ class bitfinex2 extends bitfinex2$1 {
128
128
  // cheapest endpoint is 240 requests per minute => ~ 4 requests per second => ( 1000ms / 4 ) = 250ms between requests on average
129
129
  'rateLimit': 250,
130
130
  'urls': {
131
- 'logo': 'https://user-images.githubusercontent.com/1294454/27766244-e328a50c-5ed2-11e7-947b-041416579bb3.jpg',
131
+ 'logo': 'https://github.com/user-attachments/assets/4a8e947f-ab46-481a-a8ae-8b20e9b03178',
132
132
  'api': {
133
133
  'v1': 'https://api.bitfinex.com',
134
134
  'public': 'https://api-pub.bitfinex.com',
@@ -57,7 +57,7 @@ class bitflyer extends bitflyer$1 {
57
57
  'withdraw': true,
58
58
  },
59
59
  'urls': {
60
- 'logo': 'https://user-images.githubusercontent.com/1294454/28051642-56154182-660e-11e7-9b0d-6042d1e6edd8.jpg',
60
+ 'logo': 'https://github.com/user-attachments/assets/d0217747-e54d-4533-8416-0d553dca74bb',
61
61
  'api': {
62
62
  'rest': 'https://api.{hostname}',
63
63
  },
@@ -160,7 +160,7 @@ class bitget extends bitget$1 {
160
160
  },
161
161
  'hostname': 'bitget.com',
162
162
  'urls': {
163
- 'logo': 'https://user-images.githubusercontent.com/1294454/195989417-4253ddb0-afbe-4a1c-9dea-9dbcd121fa5d.jpg',
163
+ 'logo': 'https://github.com/user-attachments/assets/fbaa10cc-a277-441d-a5b7-997dd9a87658',
164
164
  'api': {
165
165
  'spot': 'https://api.{hostname}',
166
166
  'mix': 'https://api.{hostname}',
@@ -76,7 +76,7 @@ class bithumb extends bithumb$1 {
76
76
  },
77
77
  'hostname': 'bithumb.com',
78
78
  'urls': {
79
- 'logo': 'https://user-images.githubusercontent.com/1294454/30597177-ea800172-9d5e-11e7-804c-b9d4fa9b56b0.jpg',
79
+ 'logo': 'https://github.com/user-attachments/assets/c9e0eefb-4777-46b9-8f09-9d7f7c4af82d',
80
80
  'api': {
81
81
  'public': 'https://api.{hostname}/public',
82
82
  'private': 'https://api.{hostname}',
@@ -108,7 +108,7 @@ class bitmart extends bitmart$1 {
108
108
  },
109
109
  'hostname': 'bitmart.com',
110
110
  'urls': {
111
- 'logo': 'https://user-images.githubusercontent.com/1294454/129991357-8f47464b-d0f4-41d6-8a82-34122f0d1398.jpg',
111
+ 'logo': 'https://github.com/user-attachments/assets/0623e9c4-f50e-48c9-82bd-65c3908c3a14',
112
112
  'api': {
113
113
  'spot': 'https://api-cloud.{hostname}',
114
114
  'swap': 'https://api-cloud-v2.{hostname}', // bitmart.info for Hong Kong users
@@ -108,7 +108,7 @@ class bitmex extends bitmex$1 {
108
108
  'public': 'https://testnet.bitmex.com',
109
109
  'private': 'https://testnet.bitmex.com',
110
110
  },
111
- 'logo': 'https://github.com/ccxt/ccxt/assets/43336371/cea9cfe5-c57e-4b84-b2ac-77b960b04445',
111
+ 'logo': 'https://github.com/user-attachments/assets/c78425ab-78d5-49d6-bd14-db7734798f04',
112
112
  'api': {
113
113
  'public': 'https://www.bitmex.com',
114
114
  'private': 'https://www.bitmex.com',