ccxt 4.4.26__py2.py3-none-any.whl → 4.4.28__py2.py3-none-any.whl

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 (103) hide show
  1. ccxt/__init__.py +1 -1
  2. ccxt/abstract/alpaca.py +2 -0
  3. ccxt/abstract/binance.py +7 -0
  4. ccxt/abstract/binancecoinm.py +7 -0
  5. ccxt/abstract/binanceus.py +7 -0
  6. ccxt/abstract/binanceusdm.py +7 -0
  7. ccxt/abstract/hyperliquid.py +1 -1
  8. ccxt/ace.py +1 -1
  9. ccxt/alpaca.py +186 -6
  10. ccxt/ascendex.py +1 -1
  11. ccxt/async_support/__init__.py +1 -1
  12. ccxt/async_support/ace.py +1 -1
  13. ccxt/async_support/alpaca.py +186 -6
  14. ccxt/async_support/ascendex.py +1 -1
  15. ccxt/async_support/base/exchange.py +19 -1
  16. ccxt/async_support/bequant.py +1 -1
  17. ccxt/async_support/bigone.py +1 -1
  18. ccxt/async_support/binance.py +8 -1
  19. ccxt/async_support/binancecoinm.py +1 -1
  20. ccxt/async_support/binanceus.py +1 -1
  21. ccxt/async_support/binanceusdm.py +1 -1
  22. ccxt/async_support/bingx.py +23 -28
  23. ccxt/async_support/bit2c.py +1 -1
  24. ccxt/async_support/bitbank.py +1 -1
  25. ccxt/async_support/bitbns.py +1 -1
  26. ccxt/async_support/bitfinex.py +1 -1
  27. ccxt/async_support/bitfinex2.py +1 -1
  28. ccxt/async_support/bitflyer.py +1 -1
  29. ccxt/async_support/bitget.py +1 -1
  30. ccxt/async_support/bithumb.py +1 -1
  31. ccxt/async_support/bitmart.py +1 -1
  32. ccxt/async_support/bitmex.py +1 -1
  33. ccxt/async_support/bitopro.py +1 -1
  34. ccxt/async_support/bitrue.py +1 -1
  35. ccxt/async_support/bitso.py +1 -1
  36. ccxt/async_support/bitstamp.py +1 -1
  37. ccxt/async_support/bitteam.py +1 -1
  38. ccxt/async_support/bitvavo.py +1 -1
  39. ccxt/async_support/bl3p.py +1 -1
  40. ccxt/async_support/blockchaincom.py +1 -1
  41. ccxt/async_support/blofin.py +1 -1
  42. ccxt/async_support/btcalpha.py +1 -1
  43. ccxt/async_support/btcbox.py +1 -1
  44. ccxt/async_support/btcmarkets.py +1 -1
  45. ccxt/async_support/btcturk.py +1 -1
  46. ccxt/async_support/bybit.py +4 -1
  47. ccxt/async_support/coinbase.py +89 -11
  48. ccxt/async_support/coinex.py +1 -1
  49. ccxt/async_support/gate.py +20 -16
  50. ccxt/async_support/hyperliquid.py +19 -1
  51. ccxt/async_support/kraken.py +43 -35
  52. ccxt/async_support/lbank.py +97 -2
  53. ccxt/async_support/wavesexchange.py +14 -2
  54. ccxt/base/exchange.py +19 -1
  55. ccxt/bequant.py +1 -1
  56. ccxt/bigone.py +1 -1
  57. ccxt/binance.py +8 -1
  58. ccxt/binancecoinm.py +1 -1
  59. ccxt/binanceus.py +1 -1
  60. ccxt/binanceusdm.py +1 -1
  61. ccxt/bingx.py +23 -28
  62. ccxt/bit2c.py +1 -1
  63. ccxt/bitbank.py +1 -1
  64. ccxt/bitbns.py +1 -1
  65. ccxt/bitfinex.py +1 -1
  66. ccxt/bitfinex2.py +1 -1
  67. ccxt/bitflyer.py +1 -1
  68. ccxt/bitget.py +1 -1
  69. ccxt/bithumb.py +1 -1
  70. ccxt/bitmart.py +1 -1
  71. ccxt/bitmex.py +1 -1
  72. ccxt/bitopro.py +1 -1
  73. ccxt/bitrue.py +1 -1
  74. ccxt/bitso.py +1 -1
  75. ccxt/bitstamp.py +1 -1
  76. ccxt/bitteam.py +1 -1
  77. ccxt/bitvavo.py +1 -1
  78. ccxt/bl3p.py +1 -1
  79. ccxt/blockchaincom.py +1 -1
  80. ccxt/blofin.py +1 -1
  81. ccxt/btcalpha.py +1 -1
  82. ccxt/btcbox.py +1 -1
  83. ccxt/btcmarkets.py +1 -1
  84. ccxt/btcturk.py +1 -1
  85. ccxt/bybit.py +4 -1
  86. ccxt/coinbase.py +89 -11
  87. ccxt/coinex.py +1 -1
  88. ccxt/gate.py +20 -16
  89. ccxt/hyperliquid.py +19 -1
  90. ccxt/kraken.py +43 -35
  91. ccxt/lbank.py +97 -2
  92. ccxt/pro/__init__.py +1 -1
  93. ccxt/pro/binance.py +6 -7
  94. ccxt/pro/bybit.py +1 -1
  95. ccxt/pro/lbank.py +7 -4
  96. ccxt/pro/okx.py +1 -1
  97. ccxt/wavesexchange.py +14 -2
  98. ccxt-4.4.28.dist-info/METADATA +637 -0
  99. {ccxt-4.4.26.dist-info → ccxt-4.4.28.dist-info}/RECORD +102 -102
  100. ccxt-4.4.26.dist-info/METADATA +0 -636
  101. {ccxt-4.4.26.dist-info → ccxt-4.4.28.dist-info}/LICENSE.txt +0 -0
  102. {ccxt-4.4.26.dist-info → ccxt-4.4.28.dist-info}/WHEEL +0 -0
  103. {ccxt-4.4.26.dist-info → ccxt-4.4.28.dist-info}/top_level.txt +0 -0
@@ -5,7 +5,7 @@
5
5
 
6
6
  from ccxt.async_support.base.exchange import Exchange
7
7
  from ccxt.abstract.alpaca import ImplicitAPI
8
- from ccxt.base.types import Currency, DepositAddress, Int, Market, Num, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade
8
+ from ccxt.base.types import Currency, DepositAddress, Int, Market, Num, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, Transaction
9
9
  from typing import List
10
10
  from ccxt.base.errors import ExchangeError
11
11
  from ccxt.base.errors import PermissionDenied
@@ -17,6 +17,7 @@ from ccxt.base.errors import InvalidOrder
17
17
  from ccxt.base.errors import NotSupported
18
18
  from ccxt.base.errors import RateLimitExceeded
19
19
  from ccxt.base.decimal_to_precision import TICK_SIZE
20
+ from ccxt.base.precise import Precise
20
21
 
21
22
 
22
23
  class alpaca(Exchange, ImplicitAPI):
@@ -33,7 +34,7 @@ class alpaca(Exchange, ImplicitAPI):
33
34
  'hostname': 'alpaca.markets',
34
35
  'pro': True,
35
36
  'urls': {
36
- 'logo': 'https://user-images.githubusercontent.com/1294454/187234005-b864db3d-f1e3-447a-aaf9-a9fc7b955d07.jpg',
37
+ 'logo': 'https://github.com/user-attachments/assets/e9476df8-a450-4c3e-ab9a-1a7794219e1b',
37
38
  'www': 'https://alpaca.markets',
38
39
  'api': {
39
40
  'broker': 'https://broker-api.{hostname}',
@@ -66,8 +67,8 @@ class alpaca(Exchange, ImplicitAPI):
66
67
  'fetchCurrencies': False,
67
68
  'fetchDepositAddress': True,
68
69
  'fetchDepositAddressesByNetwork': False,
69
- 'fetchDeposits': False,
70
- 'fetchDepositsWithdrawals': False,
70
+ 'fetchDeposits': True,
71
+ 'fetchDepositsWithdrawals': True,
71
72
  'fetchFundingHistory': False,
72
73
  'fetchFundingRate': False,
73
74
  'fetchFundingRateHistory': False,
@@ -99,12 +100,12 @@ class alpaca(Exchange, ImplicitAPI):
99
100
  'fetchTransactionFees': False,
100
101
  'fetchTransactions': False,
101
102
  'fetchTransfers': False,
102
- 'fetchWithdrawals': False,
103
+ 'fetchWithdrawals': True,
103
104
  'sandbox': True,
104
105
  'setLeverage': False,
105
106
  'setMarginMode': False,
106
107
  'transfer': False,
107
- 'withdraw': False,
108
+ 'withdraw': True,
108
109
  },
109
110
  'api': {
110
111
  'broker': {
@@ -131,12 +132,14 @@ class alpaca(Exchange, ImplicitAPI):
131
132
  'v2/corporate_actions/announcements/{id}',
132
133
  'v2/corporate_actions/announcements',
133
134
  'v2/wallets',
135
+ 'v2/wallets/transfers',
134
136
  ],
135
137
  'post': [
136
138
  'v2/orders',
137
139
  'v2/watchlists',
138
140
  'v2/watchlists/{watchlist_id}',
139
141
  'v2/watchlists:by_name',
142
+ 'v2/wallets/transfers',
140
143
  ],
141
144
  'put': [
142
145
  'v2/watchlists/{watchlist_id}',
@@ -1286,6 +1289,183 @@ class alpaca(Exchange, ImplicitAPI):
1286
1289
  'tag': None,
1287
1290
  }
1288
1291
 
1292
+ async def withdraw(self, code: str, amount: float, address: str, tag=None, params={}):
1293
+ """
1294
+ make a withdrawal
1295
+ :see: https://docs.alpaca.markets/reference/createcryptotransferforaccount
1296
+ :param str code: unified currency code
1297
+ :param float amount: the amount to withdraw
1298
+ :param str address: the address to withdraw to
1299
+ :param str tag: a memo for the transaction
1300
+ :param dict [params]: extra parameters specific to the exchange API endpoint
1301
+ :returns dict: a `transaction structure <https://docs.ccxt.com/#/?id=transaction-structure>`
1302
+ """
1303
+ tag, params = self.handle_withdraw_tag_and_params(tag, params)
1304
+ self.check_address(address)
1305
+ await self.load_markets()
1306
+ currency = self.currency(code)
1307
+ if tag:
1308
+ address = address + ':' + tag
1309
+ request: dict = {
1310
+ 'asset': currency['id'],
1311
+ 'address': address,
1312
+ 'amount': self.number_to_string(amount),
1313
+ }
1314
+ response = await self.traderPrivatePostV2WalletsTransfers(self.extend(request, params))
1315
+ #
1316
+ # {
1317
+ # "id": "e27b70a6-5610-40d7-8468-a516a284b776",
1318
+ # "tx_hash": null,
1319
+ # "direction": "OUTGOING",
1320
+ # "amount": "20",
1321
+ # "usd_value": "19.99856",
1322
+ # "chain": "ETH",
1323
+ # "asset": "USDT",
1324
+ # "from_address": "0x123930E4dCA196E070d39B60c644C8Aae02f23",
1325
+ # "to_address": "0x1232c0925196e4dcf05945f67f690153190fbaab",
1326
+ # "status": "PROCESSING",
1327
+ # "created_at": "2024-11-07T02:39:01.775495Z",
1328
+ # "network_fee": "4",
1329
+ # "fees": "0.1"
1330
+ # }
1331
+ #
1332
+ return self.parse_transaction(response, currency)
1333
+
1334
+ async def fetch_transactions_helper(self, type, code, since, limit, params):
1335
+ await self.load_markets()
1336
+ currency = None
1337
+ if code is not None:
1338
+ currency = self.currency(code)
1339
+ response = await self.traderPrivateGetV2WalletsTransfers(params)
1340
+ #
1341
+ # {
1342
+ # "id": "e27b70a6-5610-40d7-8468-a516a284b776",
1343
+ # "tx_hash": null,
1344
+ # "direction": "OUTGOING",
1345
+ # "amount": "20",
1346
+ # "usd_value": "19.99856",
1347
+ # "chain": "ETH",
1348
+ # "asset": "USDT",
1349
+ # "from_address": "0x123930E4dCA196E070d39B60c644C8Aae02f23",
1350
+ # "to_address": "0x1232c0925196e4dcf05945f67f690153190fbaab",
1351
+ # "status": "PROCESSING",
1352
+ # "created_at": "2024-11-07T02:39:01.775495Z",
1353
+ # "network_fee": "4",
1354
+ # "fees": "0.1"
1355
+ # }
1356
+ #
1357
+ results = []
1358
+ for i in range(0, len(response)):
1359
+ entry = response[i]
1360
+ direction = self.safe_string(entry, 'direction')
1361
+ if direction == type:
1362
+ results.append(entry)
1363
+ elif type == 'BOTH':
1364
+ results.append(entry)
1365
+ return self.parse_transactions(results, currency, since, limit, params)
1366
+
1367
+ async def fetch_deposits_withdrawals(self, code: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Transaction]:
1368
+ """
1369
+ fetch history of deposits and withdrawals
1370
+ :see: https://docs.alpaca.markets/reference/listcryptofundingtransfers
1371
+ :param str [code]: unified currency code for the currency of the deposit/withdrawals, default is None
1372
+ :param int [since]: timestamp in ms of the earliest deposit/withdrawal, default is None
1373
+ :param int [limit]: max number of deposit/withdrawals to return, default is None
1374
+ :param dict [params]: extra parameters specific to the exchange API endpoint
1375
+ :returns dict: a list of `transaction structure <https://docs.ccxt.com/#/?id=transaction-structure>`
1376
+ """
1377
+ return await self.fetch_transactions_helper('BOTH', code, since, limit, params)
1378
+
1379
+ async def fetch_deposits(self, code: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Transaction]:
1380
+ """
1381
+ fetch all deposits made to an account
1382
+ :see: https://docs.alpaca.markets/reference/listcryptofundingtransfers
1383
+ :param str [code]: unified currency code
1384
+ :param int [since]: the earliest time in ms to fetch deposits for
1385
+ :param int [limit]: the maximum number of deposit structures to retrieve
1386
+ :param dict [params]: extra parameters specific to the exchange API endpoint
1387
+ :returns dict[]: a list of `transaction structures <https://docs.ccxt.com/#/?id=transaction-structure>`
1388
+ """
1389
+ return await self.fetch_transactions_helper('INCOMING', code, since, limit, params)
1390
+
1391
+ async def fetch_withdrawals(self, code: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Transaction]:
1392
+ """
1393
+ fetch all withdrawals made from an account
1394
+ :see: https://docs.alpaca.markets/reference/listcryptofundingtransfers
1395
+ :param str [code]: unified currency code
1396
+ :param int [since]: the earliest time in ms to fetch withdrawals for
1397
+ :param int [limit]: the maximum number of withdrawal structures to retrieve
1398
+ :param dict [params]: extra parameters specific to the exchange API endpoint
1399
+ :returns dict[]: a list of `transaction structures <https://docs.ccxt.com/#/?id=transaction-structure>`
1400
+ """
1401
+ return await self.fetch_transactions_helper('OUTGOING', code, since, limit, params)
1402
+
1403
+ def parse_transaction(self, transaction: dict, currency: Currency = None) -> Transaction:
1404
+ #
1405
+ # {
1406
+ # "id": "e27b70a6-5610-40d7-8468-a516a284b776",
1407
+ # "tx_hash": null,
1408
+ # "direction": "OUTGOING",
1409
+ # "amount": "20",
1410
+ # "usd_value": "19.99856",
1411
+ # "chain": "ETH",
1412
+ # "asset": "USDT",
1413
+ # "from_address": "0x123930E4dCA196E070d39B60c644C8Aae02f23",
1414
+ # "to_address": "0x1232c0925196e4dcf05945f67f690153190fbaab",
1415
+ # "status": "PROCESSING",
1416
+ # "created_at": "2024-11-07T02:39:01.775495Z",
1417
+ # "network_fee": "4",
1418
+ # "fees": "0.1"
1419
+ # }
1420
+ #
1421
+ datetime = self.safe_string(transaction, 'created_at')
1422
+ currencyId = self.safe_string(transaction, 'asset')
1423
+ code = self.safe_currency_code(currencyId, currency)
1424
+ fees = self.safe_string(transaction, 'fees')
1425
+ networkFee = self.safe_string(transaction, 'network_fee')
1426
+ totalFee = Precise.string_add(fees, networkFee)
1427
+ fee = {
1428
+ 'cost': self.parse_number(totalFee),
1429
+ 'currency': code,
1430
+ }
1431
+ return {
1432
+ 'info': transaction,
1433
+ 'id': self.safe_string(transaction, 'id'),
1434
+ 'txid': self.safe_string(transaction, 'tx_hash'),
1435
+ 'timestamp': self.parse8601(datetime),
1436
+ 'datetime': datetime,
1437
+ 'network': self.safe_string(transaction, 'chain'),
1438
+ 'address': self.safe_string(transaction, 'to_address'),
1439
+ 'addressTo': self.safe_string(transaction, 'to_address'),
1440
+ 'addressFrom': self.safe_string(transaction, 'from_address'),
1441
+ 'tag': None,
1442
+ 'tagTo': None,
1443
+ 'tagFrom': None,
1444
+ 'type': self.parse_transaction_type(self.safe_string(transaction, 'direction')),
1445
+ 'amount': self.safe_number(transaction, 'amount'),
1446
+ 'currency': code,
1447
+ 'status': self.parse_transaction_status(self.safe_string(transaction, 'status')),
1448
+ 'updated': None,
1449
+ 'fee': fee,
1450
+ 'comment': None,
1451
+ 'internal': None,
1452
+ }
1453
+
1454
+ def parse_transaction_status(self, status: Str):
1455
+ statuses: dict = {
1456
+ 'PROCESSING': 'pending',
1457
+ 'FAILED': 'failed',
1458
+ 'COMPLETE': 'ok',
1459
+ }
1460
+ return self.safe_string(statuses, status, status)
1461
+
1462
+ def parse_transaction_type(self, type):
1463
+ types: dict = {
1464
+ 'INCOMING': 'deposit',
1465
+ 'OUTGOING': 'withdrawal',
1466
+ }
1467
+ return self.safe_string(types, type, type)
1468
+
1289
1469
  def sign(self, path, api='public', method='GET', params={}, headers=None, body=None):
1290
1470
  endpoint = '/' + self.implode_params(path, params)
1291
1471
  url = self.implode_hostname(self.urls['api'][api[0]])
@@ -125,7 +125,7 @@ class ascendex(Exchange, ImplicitAPI):
125
125
  },
126
126
  'version': 'v2',
127
127
  'urls': {
128
- 'logo': 'https://user-images.githubusercontent.com/1294454/112027508-47984600-8b48-11eb-9e17-d26459cc36c6.jpg',
128
+ 'logo': 'https://github.com/user-attachments/assets/55bab6b9-d4ca-42a8-a0e6-fac81ae557f1',
129
129
  'api': {
130
130
  'rest': 'https://ascendex.com',
131
131
  },
@@ -2,7 +2,7 @@
2
2
 
3
3
  # -----------------------------------------------------------------------------
4
4
 
5
- __version__ = '4.4.26'
5
+ __version__ = '4.4.28'
6
6
 
7
7
  # -----------------------------------------------------------------------------
8
8
 
@@ -598,9 +598,15 @@ class Exchange(BaseExchange):
598
598
  async def watch_trades(self, symbol: str, since: Int = None, limit: Int = None, params={}):
599
599
  raise NotSupported(self.id + ' watchTrades() is not supported yet')
600
600
 
601
+ async def un_watch_trades(self, symbol: str, params={}):
602
+ raise NotSupported(self.id + ' unWatchTrades() is not supported yet')
603
+
601
604
  async def watch_trades_for_symbols(self, symbols: List[str], since: Int = None, limit: Int = None, params={}):
602
605
  raise NotSupported(self.id + ' watchTradesForSymbols() is not supported yet')
603
606
 
607
+ async def un_watch_trades_for_symbols(self, symbols: List[str], params={}):
608
+ raise NotSupported(self.id + ' unWatchTradesForSymbols() is not supported yet')
609
+
604
610
  async def watch_my_trades_for_symbols(self, symbols: List[str], since: Int = None, limit: Int = None, params={}):
605
611
  raise NotSupported(self.id + ' watchMyTradesForSymbols() is not supported yet')
606
612
 
@@ -610,9 +616,15 @@ class Exchange(BaseExchange):
610
616
  async def watch_ohlcv_for_symbols(self, symbolsAndTimeframes: List[List[str]], since: Int = None, limit: Int = None, params={}):
611
617
  raise NotSupported(self.id + ' watchOHLCVForSymbols() is not supported yet')
612
618
 
619
+ async def un_watch_ohlcv_for_symbols(self, symbolsAndTimeframes: List[List[str]], params={}):
620
+ raise NotSupported(self.id + ' unWatchOHLCVForSymbols() is not supported yet')
621
+
613
622
  async def watch_order_book_for_symbols(self, symbols: List[str], limit: Int = None, params={}):
614
623
  raise NotSupported(self.id + ' watchOrderBookForSymbols() is not supported yet')
615
624
 
625
+ async def un_watch_order_book_for_symbols(self, symbols: List[str], params={}):
626
+ raise NotSupported(self.id + ' unWatchOrderBookForSymbols() is not supported yet')
627
+
616
628
  async def fetch_deposit_addresses(self, codes: Strings = None, params={}):
617
629
  raise NotSupported(self.id + ' fetchDepositAddresses() is not supported yet')
618
630
 
@@ -643,6 +655,9 @@ class Exchange(BaseExchange):
643
655
  async def watch_order_book(self, symbol: str, limit: Int = None, params={}):
644
656
  raise NotSupported(self.id + ' watchOrderBook() is not supported yet')
645
657
 
658
+ async def un_watch_order_book(self, symbol: str, params={}):
659
+ raise NotSupported(self.id + ' unWatchOrderBook() is not supported yet')
660
+
646
661
  async def fetch_time(self, params={}):
647
662
  raise NotSupported(self.id + ' fetchTime() is not supported yet')
648
663
 
@@ -1074,6 +1089,9 @@ class Exchange(BaseExchange):
1074
1089
  async def watch_tickers(self, symbols: Strings = None, params={}):
1075
1090
  raise NotSupported(self.id + ' watchTickers() is not supported yet')
1076
1091
 
1092
+ async def un_watch_tickers(self, symbols: Strings = None, params={}):
1093
+ raise NotSupported(self.id + ' unWatchTickers() is not supported yet')
1094
+
1077
1095
  async def fetch_order(self, id: str, symbol: Str = None, params={}):
1078
1096
  raise NotSupported(self.id + ' fetchOrder() is not supported yet')
1079
1097
 
@@ -16,7 +16,7 @@ class bequant(hitbtc, ImplicitAPI):
16
16
  'countries': ['MT'], # Malta
17
17
  'pro': True,
18
18
  'urls': {
19
- 'logo': 'https://user-images.githubusercontent.com/1294454/55248342-a75dfe00-525a-11e9-8aa2-05e9dca943c6.jpg',
19
+ 'logo': 'https://github.com/user-attachments/assets/0583ef1f-29fe-4b7c-8189-63565a0e2867',
20
20
  'api': {
21
21
  'public': 'https://api.bequant.io/api/3',
22
22
  'private': 'https://api.bequant.io/api/3',
@@ -93,7 +93,7 @@ class bigone(Exchange, ImplicitAPI):
93
93
  },
94
94
  'hostname': 'big.one', # or 'bigone.com'
95
95
  'urls': {
96
- 'logo': 'https://user-images.githubusercontent.com/1294454/69354403-1d532180-0c91-11ea-88ed-44c06cefdf87.jpg',
96
+ 'logo': 'https://github.com/user-attachments/assets/4e5cfd53-98cc-4b90-92cd-0d7b512653d1',
97
97
  'api': {
98
98
  'public': 'https://{hostname}/api/v3',
99
99
  'private': 'https://{hostname}/api/v3/viewer',
@@ -212,7 +212,7 @@ class binance(Exchange, ImplicitAPI):
212
212
  '1M': '1M',
213
213
  },
214
214
  'urls': {
215
- 'logo': 'https://user-images.githubusercontent.com/1294454/29604020-d5483cdc-87ee-11e7-94c7-d1a8d9169293.jpg',
215
+ 'logo': 'https://github.com/user-attachments/assets/e9419b93-ccb0-46aa-9bff-c883f096274b',
216
216
  'test': {
217
217
  'dapiPublic': 'https://testnet.binancefuture.com/dapi/v1',
218
218
  'dapiPrivate': 'https://testnet.binancefuture.com/dapi/v1',
@@ -974,6 +974,9 @@ class binance(Exchange, ImplicitAPI):
974
974
  'mmp': 1,
975
975
  'countdownCancelAll': 1,
976
976
  'order': 1,
977
+ 'block/order/orders': 5,
978
+ 'block/order/execute': 5,
979
+ 'block/user-trades': 5,
977
980
  },
978
981
  'post': {
979
982
  'order': 1,
@@ -983,9 +986,12 @@ class binance(Exchange, ImplicitAPI):
983
986
  'mmpReset': 1,
984
987
  'countdownCancelAll': 1,
985
988
  'countdownCancelAllHeartBeat': 10,
989
+ 'block/order/create': 5,
990
+ 'block/order/execute': 5,
986
991
  },
987
992
  'put': {
988
993
  'listenKey': 1,
994
+ 'block/order/create': 5,
989
995
  },
990
996
  'delete': {
991
997
  'order': 1,
@@ -993,6 +999,7 @@ class binance(Exchange, ImplicitAPI):
993
999
  'allOpenOrders': 1,
994
1000
  'allOpenOrdersByUnderlying': 1,
995
1001
  'listenKey': 1,
1002
+ 'block/order/create': 5,
996
1003
  },
997
1004
  },
998
1005
  'public': {
@@ -14,7 +14,7 @@ class binancecoinm(binance, ImplicitAPI):
14
14
  'id': 'binancecoinm',
15
15
  'name': 'Binance COIN-M',
16
16
  'urls': {
17
- 'logo': 'https://user-images.githubusercontent.com/1294454/117738721-668c8d80-b205-11eb-8c49-3fad84c4a07f.jpg',
17
+ 'logo': 'https://github.com/user-attachments/assets/387cfc4e-5f33-48cd-8f5c-cd4854dabf0c',
18
18
  'doc': [
19
19
  'https://binance-docs.github.io/apidocs/delivery/en/',
20
20
  'https://binance-docs.github.io/apidocs/spot/en',
@@ -19,7 +19,7 @@ class binanceus(binance, ImplicitAPI):
19
19
  'certified': False,
20
20
  'pro': True,
21
21
  'urls': {
22
- 'logo': 'https://user-images.githubusercontent.com/1294454/65177307-217b7c80-da5f-11e9-876e-0b748ba0a358.jpg',
22
+ 'logo': 'https://github.com/user-attachments/assets/a9667919-b632-4d52-a832-df89f8a35e8c',
23
23
  'api': {
24
24
  'web': 'https://www.binance.us',
25
25
  'public': 'https://api.binance.us/api/v3',
@@ -15,7 +15,7 @@ class binanceusdm(binance, ImplicitAPI):
15
15
  'id': 'binanceusdm',
16
16
  'name': 'Binance USDⓈ-M',
17
17
  'urls': {
18
- 'logo': 'https://user-images.githubusercontent.com/1294454/117738721-668c8d80-b205-11eb-8c49-3fad84c4a07f.jpg',
18
+ 'logo': 'https://github.com/user-attachments/assets/871cbea7-eebb-4b28-b260-c1c91df0487a',
19
19
  'doc': [
20
20
  'https://binance-docs.github.io/apidocs/futures/en/',
21
21
  'https://binance-docs.github.io/apidocs/spot/en',
@@ -2683,26 +2683,26 @@ class bingx(Exchange, ImplicitAPI):
2683
2683
  """
2684
2684
  await self.load_markets()
2685
2685
  ordersRequests = []
2686
- symbol = None
2686
+ marketIds = []
2687
2687
  for i in range(0, len(orders)):
2688
2688
  rawOrder = orders[i]
2689
2689
  marketId = self.safe_string(rawOrder, 'symbol')
2690
- if symbol is None:
2691
- symbol = marketId
2692
- else:
2693
- if symbol != marketId:
2694
- raise BadRequest(self.id + ' createOrders() requires all orders to have the same symbol')
2695
2690
  type = self.safe_string(rawOrder, 'type')
2691
+ marketIds.append(marketId)
2696
2692
  side = self.safe_string(rawOrder, 'side')
2697
2693
  amount = self.safe_number(rawOrder, 'amount')
2698
2694
  price = self.safe_number(rawOrder, 'price')
2699
2695
  orderParams = self.safe_dict(rawOrder, 'params', {})
2700
2696
  orderRequest = self.create_order_request(marketId, type, side, amount, price, orderParams)
2701
2697
  ordersRequests.append(orderRequest)
2702
- market = self.market(symbol)
2698
+ symbols = self.market_symbols(marketIds, None, False, True, True)
2699
+ symbolsLength = len(symbols)
2700
+ market = self.market(symbols[0])
2703
2701
  request: dict = {}
2704
2702
  response = None
2705
2703
  if market['swap']:
2704
+ if symbolsLength > 5:
2705
+ raise InvalidOrder(self.id + ' createOrders() can not create more than 5 orders at once for swap markets')
2706
2706
  request['batchOrders'] = self.json(ordersRequests)
2707
2707
  response = await self.swapV2PrivatePostTradeBatchOrders(request)
2708
2708
  else:
@@ -2756,6 +2756,12 @@ class bingx(Exchange, ImplicitAPI):
2756
2756
  # }
2757
2757
  # }
2758
2758
  #
2759
+ if isinstance(response, str):
2760
+ # broken api engine : order-ids are too long numbers(i.e. 1742930526912864656)
2761
+ # and json.loadscan not handle them in JS, so we have to use .parseJson
2762
+ # however, when order has an attached SL/TP, their value types need extra parsing
2763
+ response = self.fix_stringified_json_members(response)
2764
+ response = self.parse_json(response)
2759
2765
  data = self.safe_dict(response, 'data', {})
2760
2766
  result = self.safe_list(data, 'orders', [])
2761
2767
  return self.parse_orders(result, market)
@@ -4300,32 +4306,21 @@ class bingx(Exchange, ImplicitAPI):
4300
4306
 
4301
4307
  def parse_deposit_address(self, depositAddress, currency: Currency = None) -> DepositAddress:
4302
4308
  #
4303
- # {
4304
- # "coinId": "799",
4305
- # "coin": "USDT",
4306
- # "network": "BEP20",
4307
- # "address": "6a7eda2817462dabb6493277a2cfe0f5c3f2550b",
4308
- # "tag": ''
4309
- # }
4309
+ # {
4310
+ # "coinId":"4",
4311
+ # "coin":"USDT",
4312
+ # "network":"OMNI",
4313
+ # "address":"1HXyx8HVQRY7Nhqz63nwnRB7SpS9xQPzLN",
4314
+ # "addressWithPrefix":"1HXyx8HVQRY7Nhqz63nwnRB7SpS9xQPzLN"
4315
+ # }
4310
4316
  #
4311
- address = self.safe_string(depositAddress, 'address')
4312
4317
  tag = self.safe_string(depositAddress, 'tag')
4313
4318
  currencyId = self.safe_string(depositAddress, 'coin')
4314
4319
  currency = self.safe_currency(currencyId, currency)
4315
4320
  code = currency['code']
4316
- # the exchange API returns deposit addresses without the leading '0x' prefix
4317
- # however, the exchange API does require the 0x prefix to withdraw
4318
- # so we append the prefix before returning the address to the user
4319
- # that is only if the underlying contract address has the 0x prefix
4320
- networkCode = self.safe_string(depositAddress, 'network')
4321
- if networkCode is not None:
4322
- if networkCode in currency['networks']:
4323
- network = currency['networks'][networkCode]
4324
- contractAddress = self.safe_string(network['info'], 'contractAddress')
4325
- if contractAddress is not None:
4326
- if contractAddress[0] == '0' and contractAddress[1] == 'x':
4327
- if address[0] != '0' or address[1] != 'x':
4328
- address = '0x' + address
4321
+ address = self.safe_string(depositAddress, 'addressWithPrefix')
4322
+ networkdId = self.safe_string(depositAddress, 'network')
4323
+ networkCode = self.network_id_to_code(networkdId, code)
4329
4324
  self.check_address(address)
4330
4325
  return {
4331
4326
  'info': depositAddress,
@@ -85,7 +85,7 @@ class bit2c(Exchange, ImplicitAPI):
85
85
  'ws': False,
86
86
  },
87
87
  'urls': {
88
- 'logo': 'https://user-images.githubusercontent.com/1294454/27766119-3593220e-5ece-11e7-8b3a-5a041f6bcc3f.jpg',
88
+ 'logo': 'https://github.com/user-attachments/assets/db0bce50-6842-4c09-a1d5-0c87d22118aa',
89
89
  'api': {
90
90
  'rest': 'https://bit2c.co.il',
91
91
  },
@@ -100,7 +100,7 @@ class bitbank(Exchange, ImplicitAPI):
100
100
  },
101
101
  'hostname': 'bitbank.cc',
102
102
  'urls': {
103
- 'logo': 'https://user-images.githubusercontent.com/1294454/37808081-b87f2d9c-2e59-11e8-894d-c1900b7584fe.jpg',
103
+ 'logo': 'https://github.com/user-attachments/assets/9d616de0-8a88-4468-8e38-d269acab0348',
104
104
  'api': {
105
105
  'public': 'https://public.{hostname}',
106
106
  'private': 'https://api.{hostname}',
@@ -74,7 +74,7 @@ class bitbns(Exchange, ImplicitAPI):
74
74
  },
75
75
  'hostname': 'bitbns.com',
76
76
  'urls': {
77
- 'logo': 'https://user-images.githubusercontent.com/1294454/117201933-e7a6e780-adf5-11eb-9d80-98fc2a21c3d6.jpg',
77
+ 'logo': 'https://github.com/user-attachments/assets/a5b9a562-cdd8-4bea-9fa7-fd24c1dad3d9',
78
78
  'api': {
79
79
  'www': 'https://{hostname}',
80
80
  'v1': 'https://api.{hostname}/api/trade/v1',
@@ -105,7 +105,7 @@ class bitfinex(Exchange, ImplicitAPI):
105
105
  '1M': '1M',
106
106
  },
107
107
  'urls': {
108
- 'logo': 'https://user-images.githubusercontent.com/1294454/27766244-e328a50c-5ed2-11e7-947b-041416579bb3.jpg',
108
+ 'logo': 'https://github.com/user-attachments/assets/9147c6c5-7197-481e-827b-7483672bb0e9',
109
109
  'api': {
110
110
  'v2': 'https://api-pub.bitfinex.com', # https://github.com/ccxt/ccxt/issues/5109
111
111
  'public': 'https://api.bitfinex.com',
@@ -148,7 +148,7 @@ class bitfinex2(Exchange, ImplicitAPI):
148
148
  # cheapest endpoint is 240 requests per minute => ~ 4 requests per second =>( 1000ms / 4 ) = 250ms between requests on average
149
149
  'rateLimit': 250,
150
150
  'urls': {
151
- 'logo': 'https://user-images.githubusercontent.com/1294454/27766244-e328a50c-5ed2-11e7-947b-041416579bb3.jpg',
151
+ 'logo': 'https://github.com/user-attachments/assets/4a8e947f-ab46-481a-a8ae-8b20e9b03178',
152
152
  'api': {
153
153
  'v1': 'https://api.bitfinex.com',
154
154
  'public': 'https://api-pub.bitfinex.com',
@@ -62,7 +62,7 @@ class bitflyer(Exchange, ImplicitAPI):
62
62
  'withdraw': True,
63
63
  },
64
64
  'urls': {
65
- 'logo': 'https://user-images.githubusercontent.com/1294454/28051642-56154182-660e-11e7-9b0d-6042d1e6edd8.jpg',
65
+ 'logo': 'https://github.com/user-attachments/assets/d0217747-e54d-4533-8416-0d553dca74bb',
66
66
  'api': {
67
67
  'rest': 'https://api.{hostname}',
68
68
  },
@@ -182,7 +182,7 @@ class bitget(Exchange, ImplicitAPI):
182
182
  },
183
183
  'hostname': 'bitget.com',
184
184
  'urls': {
185
- 'logo': 'https://user-images.githubusercontent.com/1294454/195989417-4253ddb0-afbe-4a1c-9dea-9dbcd121fa5d.jpg',
185
+ 'logo': 'https://github.com/user-attachments/assets/fbaa10cc-a277-441d-a5b7-997dd9a87658',
186
186
  'api': {
187
187
  'spot': 'https://api.{hostname}',
188
188
  'mix': 'https://api.{hostname}',
@@ -88,7 +88,7 @@ class bithumb(Exchange, ImplicitAPI):
88
88
  },
89
89
  'hostname': 'bithumb.com',
90
90
  'urls': {
91
- 'logo': 'https://user-images.githubusercontent.com/1294454/30597177-ea800172-9d5e-11e7-804c-b9d4fa9b56b0.jpg',
91
+ 'logo': 'https://github.com/user-attachments/assets/c9e0eefb-4777-46b9-8f09-9d7f7c4af82d',
92
92
  'api': {
93
93
  'public': 'https://api.{hostname}/public',
94
94
  'private': 'https://api.{hostname}',
@@ -127,7 +127,7 @@ class bitmart(Exchange, ImplicitAPI):
127
127
  },
128
128
  'hostname': 'bitmart.com', # bitmart.info, bitmart.news for Hong Kong users
129
129
  'urls': {
130
- 'logo': 'https://user-images.githubusercontent.com/1294454/129991357-8f47464b-d0f4-41d6-8a82-34122f0d1398.jpg',
130
+ 'logo': 'https://github.com/user-attachments/assets/0623e9c4-f50e-48c9-82bd-65c3908c3a14',
131
131
  'api': {
132
132
  'spot': 'https://api-cloud.{hostname}',
133
133
  'swap': 'https://api-cloud-v2.{hostname}', # bitmart.info for Hong Kong users
@@ -119,7 +119,7 @@ class bitmex(Exchange, ImplicitAPI):
119
119
  'public': 'https://testnet.bitmex.com',
120
120
  'private': 'https://testnet.bitmex.com',
121
121
  },
122
- 'logo': 'https://github.com/ccxt/ccxt/assets/43336371/cea9cfe5-c57e-4b84-b2ac-77b960b04445',
122
+ 'logo': 'https://github.com/user-attachments/assets/c78425ab-78d5-49d6-bd14-db7734798f04',
123
123
  'api': {
124
124
  'public': 'https://www.bitmex.com',
125
125
  'private': 'https://www.bitmex.com',
@@ -112,7 +112,7 @@ class bitopro(Exchange, ImplicitAPI):
112
112
  '1M': '1M',
113
113
  },
114
114
  'urls': {
115
- 'logo': 'https://user-images.githubusercontent.com/1294454/158227251-3a92a220-9222-453c-9277-977c6677fe71.jpg',
115
+ 'logo': 'https://github.com/user-attachments/assets/affc6337-b95a-44bf-aacd-04f9722364f6',
116
116
  'api': {
117
117
  'rest': 'https://api.bitopro.com/v3',
118
118
  },
@@ -116,7 +116,7 @@ class bitrue(Exchange, ImplicitAPI):
116
116
  '1w': '1W',
117
117
  },
118
118
  'urls': {
119
- 'logo': 'https://user-images.githubusercontent.com/1294454/139516488-243a830d-05dd-446b-91c6-c1f18fe30c63.jpg',
119
+ 'logo': 'https://github.com/user-attachments/assets/67abe346-1273-461a-bd7c-42fa32907c8e',
120
120
  'api': {
121
121
  'spot': 'https://www.bitrue.com/api',
122
122
  'fapi': 'https://fapi.bitrue.com/fapi',