ccxt 4.4.26__py2.py3-none-any.whl → 4.4.27__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 (97) hide show
  1. ccxt/__init__.py +1 -1
  2. ccxt/abstract/alpaca.py +2 -0
  3. ccxt/abstract/hyperliquid.py +1 -1
  4. ccxt/ace.py +1 -1
  5. ccxt/alpaca.py +182 -6
  6. ccxt/ascendex.py +1 -1
  7. ccxt/async_support/__init__.py +1 -1
  8. ccxt/async_support/ace.py +1 -1
  9. ccxt/async_support/alpaca.py +182 -6
  10. ccxt/async_support/ascendex.py +1 -1
  11. ccxt/async_support/base/exchange.py +19 -1
  12. ccxt/async_support/bequant.py +1 -1
  13. ccxt/async_support/bigone.py +1 -1
  14. ccxt/async_support/binance.py +1 -1
  15. ccxt/async_support/binancecoinm.py +1 -1
  16. ccxt/async_support/binanceus.py +1 -1
  17. ccxt/async_support/binanceusdm.py +1 -1
  18. ccxt/async_support/bingx.py +23 -28
  19. ccxt/async_support/bit2c.py +1 -1
  20. ccxt/async_support/bitbank.py +1 -1
  21. ccxt/async_support/bitbns.py +1 -1
  22. ccxt/async_support/bitfinex.py +1 -1
  23. ccxt/async_support/bitfinex2.py +1 -1
  24. ccxt/async_support/bitflyer.py +1 -1
  25. ccxt/async_support/bitget.py +1 -1
  26. ccxt/async_support/bithumb.py +1 -1
  27. ccxt/async_support/bitmart.py +1 -1
  28. ccxt/async_support/bitmex.py +1 -1
  29. ccxt/async_support/bitopro.py +1 -1
  30. ccxt/async_support/bitrue.py +1 -1
  31. ccxt/async_support/bitso.py +1 -1
  32. ccxt/async_support/bitstamp.py +1 -1
  33. ccxt/async_support/bitteam.py +1 -1
  34. ccxt/async_support/bitvavo.py +1 -1
  35. ccxt/async_support/bl3p.py +1 -1
  36. ccxt/async_support/blockchaincom.py +1 -1
  37. ccxt/async_support/blofin.py +1 -1
  38. ccxt/async_support/btcalpha.py +1 -1
  39. ccxt/async_support/btcbox.py +1 -1
  40. ccxt/async_support/btcmarkets.py +1 -1
  41. ccxt/async_support/btcturk.py +1 -1
  42. ccxt/async_support/bybit.py +4 -1
  43. ccxt/async_support/coinbase.py +89 -11
  44. ccxt/async_support/coinex.py +1 -1
  45. ccxt/async_support/gate.py +20 -16
  46. ccxt/async_support/hyperliquid.py +19 -1
  47. ccxt/async_support/lbank.py +97 -2
  48. ccxt/async_support/wavesexchange.py +13 -2
  49. ccxt/base/exchange.py +19 -1
  50. ccxt/bequant.py +1 -1
  51. ccxt/bigone.py +1 -1
  52. ccxt/binance.py +1 -1
  53. ccxt/binancecoinm.py +1 -1
  54. ccxt/binanceus.py +1 -1
  55. ccxt/binanceusdm.py +1 -1
  56. ccxt/bingx.py +23 -28
  57. ccxt/bit2c.py +1 -1
  58. ccxt/bitbank.py +1 -1
  59. ccxt/bitbns.py +1 -1
  60. ccxt/bitfinex.py +1 -1
  61. ccxt/bitfinex2.py +1 -1
  62. ccxt/bitflyer.py +1 -1
  63. ccxt/bitget.py +1 -1
  64. ccxt/bithumb.py +1 -1
  65. ccxt/bitmart.py +1 -1
  66. ccxt/bitmex.py +1 -1
  67. ccxt/bitopro.py +1 -1
  68. ccxt/bitrue.py +1 -1
  69. ccxt/bitso.py +1 -1
  70. ccxt/bitstamp.py +1 -1
  71. ccxt/bitteam.py +1 -1
  72. ccxt/bitvavo.py +1 -1
  73. ccxt/bl3p.py +1 -1
  74. ccxt/blockchaincom.py +1 -1
  75. ccxt/blofin.py +1 -1
  76. ccxt/btcalpha.py +1 -1
  77. ccxt/btcbox.py +1 -1
  78. ccxt/btcmarkets.py +1 -1
  79. ccxt/btcturk.py +1 -1
  80. ccxt/bybit.py +4 -1
  81. ccxt/coinbase.py +89 -11
  82. ccxt/coinex.py +1 -1
  83. ccxt/gate.py +20 -16
  84. ccxt/hyperliquid.py +19 -1
  85. ccxt/lbank.py +97 -2
  86. ccxt/pro/__init__.py +1 -1
  87. ccxt/pro/binance.py +2 -2
  88. ccxt/pro/bybit.py +1 -1
  89. ccxt/pro/lbank.py +7 -4
  90. ccxt/pro/okx.py +1 -1
  91. ccxt/wavesexchange.py +13 -2
  92. ccxt-4.4.27.dist-info/METADATA +637 -0
  93. {ccxt-4.4.26.dist-info → ccxt-4.4.27.dist-info}/RECORD +96 -96
  94. ccxt-4.4.26.dist-info/METADATA +0 -636
  95. {ccxt-4.4.26.dist-info → ccxt-4.4.27.dist-info}/LICENSE.txt +0 -0
  96. {ccxt-4.4.26.dist-info → ccxt-4.4.27.dist-info}/WHEEL +0 -0
  97. {ccxt-4.4.26.dist-info → ccxt-4.4.27.dist-info}/top_level.txt +0 -0
ccxt/__init__.py CHANGED
@@ -22,7 +22,7 @@
22
22
 
23
23
  # ----------------------------------------------------------------------------
24
24
 
25
- __version__ = '4.4.26'
25
+ __version__ = '4.4.27'
26
26
 
27
27
  # ----------------------------------------------------------------------------
28
28
 
ccxt/abstract/alpaca.py CHANGED
@@ -21,10 +21,12 @@ class ImplicitAPI:
21
21
  trader_private_get_v2_corporate_actions_announcements_id = traderPrivateGetV2CorporateActionsAnnouncementsId = Entry('v2/corporate_actions/announcements/{id}', ['trader', 'private'], 'GET', {})
22
22
  trader_private_get_v2_corporate_actions_announcements = traderPrivateGetV2CorporateActionsAnnouncements = Entry('v2/corporate_actions/announcements', ['trader', 'private'], 'GET', {})
23
23
  trader_private_get_v2_wallets = traderPrivateGetV2Wallets = Entry('v2/wallets', ['trader', 'private'], 'GET', {})
24
+ trader_private_get_v2_wallets_transfers = traderPrivateGetV2WalletsTransfers = Entry('v2/wallets/transfers', ['trader', 'private'], 'GET', {})
24
25
  trader_private_post_v2_orders = traderPrivatePostV2Orders = Entry('v2/orders', ['trader', 'private'], 'POST', {})
25
26
  trader_private_post_v2_watchlists = traderPrivatePostV2Watchlists = Entry('v2/watchlists', ['trader', 'private'], 'POST', {})
26
27
  trader_private_post_v2_watchlists_watchlist_id = traderPrivatePostV2WatchlistsWatchlistId = Entry('v2/watchlists/{watchlist_id}', ['trader', 'private'], 'POST', {})
27
28
  trader_private_post_v2_watchlists_by_name = traderPrivatePostV2WatchlistsByName = Entry('v2/watchlists:by_name', ['trader', 'private'], 'POST', {})
29
+ trader_private_post_v2_wallets_transfers = traderPrivatePostV2WalletsTransfers = Entry('v2/wallets/transfers', ['trader', 'private'], 'POST', {})
28
30
  trader_private_put_v2_watchlists_watchlist_id = traderPrivatePutV2WatchlistsWatchlistId = Entry('v2/watchlists/{watchlist_id}', ['trader', 'private'], 'PUT', {})
29
31
  trader_private_put_v2_watchlists_by_name = traderPrivatePutV2WatchlistsByName = Entry('v2/watchlists:by_name', ['trader', 'private'], 'PUT', {})
30
32
  trader_private_patch_v2_orders_order_id = traderPrivatePatchV2OrdersOrderId = Entry('v2/orders/{order_id}', ['trader', 'private'], 'PATCH', {})
@@ -2,5 +2,5 @@ from ccxt.base.types import Entry
2
2
 
3
3
 
4
4
  class ImplicitAPI:
5
- public_post_info = publicPostInfo = Entry('info', 'public', 'POST', {'cost': 1})
5
+ public_post_info = publicPostInfo = Entry('info', 'public', 'POST', {'cost': 20, 'byType': {'l2Book': 2, 'allMids': 2, 'clearinghouseState': 2, 'orderStatus': 2, 'spotClearinghouseState': 2, 'exchangeStatus': 2}})
6
6
  private_post_exchange = privatePostExchange = Entry('exchange', 'private', 'POST', {'cost': 1})
ccxt/ace.py CHANGED
@@ -108,7 +108,7 @@ class ace(Exchange, ImplicitAPI):
108
108
  '1M': 31,
109
109
  },
110
110
  'urls': {
111
- 'logo': 'https://user-images.githubusercontent.com/1294454/216908003-fb314cf6-e66e-471c-b91d-1d86e4baaa90.jpg',
111
+ 'logo': 'https://github.com/user-attachments/assets/115f1e4a-0fd0-4b76-85d5-a49ebf64d1c8',
112
112
  'api': {
113
113
  'public': 'https://ace.io/polarisex',
114
114
  'private': 'https://ace.io/polarisex/open',
ccxt/alpaca.py CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
  from ccxt.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
@@ -33,7 +33,7 @@ class alpaca(Exchange, ImplicitAPI):
33
33
  'hostname': 'alpaca.markets',
34
34
  'pro': True,
35
35
  'urls': {
36
- 'logo': 'https://user-images.githubusercontent.com/1294454/187234005-b864db3d-f1e3-447a-aaf9-a9fc7b955d07.jpg',
36
+ 'logo': 'https://github.com/user-attachments/assets/e9476df8-a450-4c3e-ab9a-1a7794219e1b',
37
37
  'www': 'https://alpaca.markets',
38
38
  'api': {
39
39
  'broker': 'https://broker-api.{hostname}',
@@ -66,8 +66,8 @@ class alpaca(Exchange, ImplicitAPI):
66
66
  'fetchCurrencies': False,
67
67
  'fetchDepositAddress': True,
68
68
  'fetchDepositAddressesByNetwork': False,
69
- 'fetchDeposits': False,
70
- 'fetchDepositsWithdrawals': False,
69
+ 'fetchDeposits': True,
70
+ 'fetchDepositsWithdrawals': True,
71
71
  'fetchFundingHistory': False,
72
72
  'fetchFundingRate': False,
73
73
  'fetchFundingRateHistory': False,
@@ -99,12 +99,12 @@ class alpaca(Exchange, ImplicitAPI):
99
99
  'fetchTransactionFees': False,
100
100
  'fetchTransactions': False,
101
101
  'fetchTransfers': False,
102
- 'fetchWithdrawals': False,
102
+ 'fetchWithdrawals': True,
103
103
  'sandbox': True,
104
104
  'setLeverage': False,
105
105
  'setMarginMode': False,
106
106
  'transfer': False,
107
- 'withdraw': False,
107
+ 'withdraw': True,
108
108
  },
109
109
  'api': {
110
110
  'broker': {
@@ -131,12 +131,14 @@ class alpaca(Exchange, ImplicitAPI):
131
131
  'v2/corporate_actions/announcements/{id}',
132
132
  'v2/corporate_actions/announcements',
133
133
  'v2/wallets',
134
+ 'v2/wallets/transfers',
134
135
  ],
135
136
  'post': [
136
137
  'v2/orders',
137
138
  'v2/watchlists',
138
139
  'v2/watchlists/{watchlist_id}',
139
140
  'v2/watchlists:by_name',
141
+ 'v2/wallets/transfers',
140
142
  ],
141
143
  'put': [
142
144
  'v2/watchlists/{watchlist_id}',
@@ -1286,6 +1288,180 @@ class alpaca(Exchange, ImplicitAPI):
1286
1288
  'tag': None,
1287
1289
  }
1288
1290
 
1291
+ def withdraw(self, code: str, amount: float, address: str, tag=None, params={}):
1292
+ """
1293
+ make a withdrawal
1294
+ :see: https://docs.alpaca.markets/reference/createcryptotransferforaccount
1295
+ :param str code: unified currency code
1296
+ :param float amount: the amount to withdraw
1297
+ :param str address: the address to withdraw to
1298
+ :param str tag: a memo for the transaction
1299
+ :param dict [params]: extra parameters specific to the exchange API endpoint
1300
+ :returns dict: a `transaction structure <https://docs.ccxt.com/#/?id=transaction-structure>`
1301
+ """
1302
+ tag, params = self.handle_withdraw_tag_and_params(tag, params)
1303
+ self.check_address(address)
1304
+ self.load_markets()
1305
+ currency = self.currency(code)
1306
+ if tag:
1307
+ address = address + ':' + tag
1308
+ request: dict = {
1309
+ 'asset': currency['id'],
1310
+ 'address': address,
1311
+ 'amount': self.number_to_string(amount),
1312
+ }
1313
+ response = self.traderPrivatePostV2WalletsTransfers(self.extend(request, params))
1314
+ #
1315
+ # {
1316
+ # "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
1317
+ # "tx_hash": "string",
1318
+ # "direction": "INCOMING",
1319
+ # "status": "PROCESSING",
1320
+ # "amount": "string",
1321
+ # "usd_value": "string",
1322
+ # "network_fee": "string",
1323
+ # "fees": "string",
1324
+ # "chain": "string",
1325
+ # "asset": "string",
1326
+ # "from_address": "string",
1327
+ # "to_address": "string",
1328
+ # "created_at": "2024-11-02T07:42:48.402Z"
1329
+ # }
1330
+ #
1331
+ return self.parse_transaction(response, currency)
1332
+
1333
+ def fetch_transactions_helper(self, type, code, since, limit, params):
1334
+ self.load_markets()
1335
+ currency = None
1336
+ if code is not None:
1337
+ currency = self.currency(code)
1338
+ response = self.traderPrivateGetV2WalletsTransfers(params)
1339
+ #
1340
+ # {
1341
+ # "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
1342
+ # "tx_hash": "string",
1343
+ # "direction": "INCOMING",
1344
+ # "status": "PROCESSING",
1345
+ # "amount": "string",
1346
+ # "usd_value": "string",
1347
+ # "network_fee": "string",
1348
+ # "fees": "string",
1349
+ # "chain": "string",
1350
+ # "asset": "string",
1351
+ # "from_address": "string",
1352
+ # "to_address": "string",
1353
+ # "created_at": "2024-11-02T07:42:48.402Z"
1354
+ # }
1355
+ #
1356
+ results = []
1357
+ for i in range(0, len(response)):
1358
+ entry = response[i]
1359
+ direction = self.safe_string(entry, 'direction')
1360
+ if direction == type:
1361
+ results.append(entry)
1362
+ elif direction == 'BOTH':
1363
+ results.append(entry)
1364
+ return self.parse_transactions(results, currency, since, limit, params)
1365
+
1366
+ def fetch_deposits_withdrawals(self, code: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Transaction]:
1367
+ """
1368
+ fetch history of deposits and withdrawals
1369
+ :see: https://docs.alpaca.markets/reference/listcryptofundingtransfers
1370
+ :param str [code]: unified currency code for the currency of the deposit/withdrawals, default is None
1371
+ :param int [since]: timestamp in ms of the earliest deposit/withdrawal, default is None
1372
+ :param int [limit]: max number of deposit/withdrawals to return, default is None
1373
+ :param dict [params]: extra parameters specific to the exchange API endpoint
1374
+ :returns dict: a list of `transaction structure <https://docs.ccxt.com/#/?id=transaction-structure>`
1375
+ """
1376
+ return self.fetch_transactions_helper('BOTH', code, since, limit, params)
1377
+
1378
+ def fetch_deposits(self, code: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Transaction]:
1379
+ """
1380
+ fetch all deposits made to an account
1381
+ :see: https://docs.alpaca.markets/reference/listcryptofundingtransfers
1382
+ :param str [code]: unified currency code
1383
+ :param int [since]: the earliest time in ms to fetch deposits for
1384
+ :param int [limit]: the maximum number of deposit structures to retrieve
1385
+ :param dict [params]: extra parameters specific to the exchange API endpoint
1386
+ :returns dict[]: a list of `transaction structures <https://docs.ccxt.com/#/?id=transaction-structure>`
1387
+ """
1388
+ return self.fetch_transactions_helper('INCOMING', code, since, limit, params)
1389
+
1390
+ def fetch_withdrawals(self, code: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Transaction]:
1391
+ """
1392
+ fetch all withdrawals made from an account
1393
+ :see: https://docs.alpaca.markets/reference/listcryptofundingtransfers
1394
+ :param str [code]: unified currency code
1395
+ :param int [since]: the earliest time in ms to fetch withdrawals for
1396
+ :param int [limit]: the maximum number of withdrawal structures to retrieve
1397
+ :param dict [params]: extra parameters specific to the exchange API endpoint
1398
+ :returns dict[]: a list of `transaction structures <https://docs.ccxt.com/#/?id=transaction-structure>`
1399
+ """
1400
+ return self.fetch_transactions_helper('OUTGOING', code, since, limit, params)
1401
+
1402
+ def parse_transaction(self, transaction: dict, currency: Currency = None) -> Transaction:
1403
+ #
1404
+ # {
1405
+ # "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
1406
+ # "tx_hash": "string",
1407
+ # "direction": "INCOMING",
1408
+ # "status": "PROCESSING",
1409
+ # "amount": "string",
1410
+ # "usd_value": "string",
1411
+ # "network_fee": "string",
1412
+ # "fees": "string",
1413
+ # "chain": "string",
1414
+ # "asset": "string",
1415
+ # "from_address": "string",
1416
+ # "to_address": "string",
1417
+ # "created_at": "2024-11-02T07:42:48.402Z"
1418
+ # }
1419
+ #
1420
+ datetime = self.safe_string(transaction, 'created_at')
1421
+ currencyId = self.safe_string(transaction, 'asset')
1422
+ code = self.safe_currency_code(currencyId, currency)
1423
+ fee = {
1424
+ 'cost': self.safe_number(transaction, 'fees'),
1425
+ 'currency': code,
1426
+ }
1427
+ return {
1428
+ 'info': transaction,
1429
+ 'id': self.safe_string(transaction, 'id'),
1430
+ 'txid': self.safe_string(transaction, 'tx_hash'),
1431
+ 'timestamp': self.parse8601(datetime),
1432
+ 'datetime': datetime,
1433
+ 'network': self.safe_string(transaction, 'chain'),
1434
+ 'address': self.safe_string(transaction, 'to_address'),
1435
+ 'addressTo': self.safe_string(transaction, 'to_address'),
1436
+ 'addressFrom': self.safe_string(transaction, 'from_address'),
1437
+ 'tag': None,
1438
+ 'tagTo': None,
1439
+ 'tagFrom': None,
1440
+ 'type': self.parse_transaction_type(self.safe_string(transaction, 'direction')),
1441
+ 'amount': self.safe_number(transaction, 'amount'),
1442
+ 'currency': code,
1443
+ 'status': self.parse_transaction_status(self.safe_string(transaction, 'status')),
1444
+ 'updated': None,
1445
+ 'fee': fee,
1446
+ 'comment': None,
1447
+ 'internal': None,
1448
+ }
1449
+
1450
+ def parse_transaction_status(self, status: Str):
1451
+ statuses: dict = {
1452
+ 'PROCESSING': 'pending',
1453
+ # 'FAILED': 'failed',
1454
+ # 'SUCCESS': 'ok',
1455
+ }
1456
+ return self.safe_string(statuses, status, status)
1457
+
1458
+ def parse_transaction_type(self, type):
1459
+ types: dict = {
1460
+ 'INCOMING': 'deposit',
1461
+ 'OUTGOING': 'withdrawal',
1462
+ }
1463
+ return self.safe_string(types, type, type)
1464
+
1289
1465
  def sign(self, path, api='public', method='GET', params={}, headers=None, body=None):
1290
1466
  endpoint = '/' + self.implode_params(path, params)
1291
1467
  url = self.implode_hostname(self.urls['api'][api[0]])
ccxt/ascendex.py CHANGED
@@ -124,7 +124,7 @@ class ascendex(Exchange, ImplicitAPI):
124
124
  },
125
125
  'version': 'v2',
126
126
  'urls': {
127
- 'logo': 'https://user-images.githubusercontent.com/1294454/112027508-47984600-8b48-11eb-9e17-d26459cc36c6.jpg',
127
+ 'logo': 'https://github.com/user-attachments/assets/55bab6b9-d4ca-42a8-a0e6-fac81ae557f1',
128
128
  'api': {
129
129
  'rest': 'https://ascendex.com',
130
130
  },
@@ -4,7 +4,7 @@
4
4
 
5
5
  # -----------------------------------------------------------------------------
6
6
 
7
- __version__ = '4.4.26'
7
+ __version__ = '4.4.27'
8
8
 
9
9
  # -----------------------------------------------------------------------------
10
10
 
ccxt/async_support/ace.py CHANGED
@@ -108,7 +108,7 @@ class ace(Exchange, ImplicitAPI):
108
108
  '1M': 31,
109
109
  },
110
110
  'urls': {
111
- 'logo': 'https://user-images.githubusercontent.com/1294454/216908003-fb314cf6-e66e-471c-b91d-1d86e4baaa90.jpg',
111
+ 'logo': 'https://github.com/user-attachments/assets/115f1e4a-0fd0-4b76-85d5-a49ebf64d1c8',
112
112
  'api': {
113
113
  'public': 'https://ace.io/polarisex',
114
114
  'private': 'https://ace.io/polarisex/open',
@@ -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
@@ -33,7 +33,7 @@ class alpaca(Exchange, ImplicitAPI):
33
33
  'hostname': 'alpaca.markets',
34
34
  'pro': True,
35
35
  'urls': {
36
- 'logo': 'https://user-images.githubusercontent.com/1294454/187234005-b864db3d-f1e3-447a-aaf9-a9fc7b955d07.jpg',
36
+ 'logo': 'https://github.com/user-attachments/assets/e9476df8-a450-4c3e-ab9a-1a7794219e1b',
37
37
  'www': 'https://alpaca.markets',
38
38
  'api': {
39
39
  'broker': 'https://broker-api.{hostname}',
@@ -66,8 +66,8 @@ class alpaca(Exchange, ImplicitAPI):
66
66
  'fetchCurrencies': False,
67
67
  'fetchDepositAddress': True,
68
68
  'fetchDepositAddressesByNetwork': False,
69
- 'fetchDeposits': False,
70
- 'fetchDepositsWithdrawals': False,
69
+ 'fetchDeposits': True,
70
+ 'fetchDepositsWithdrawals': True,
71
71
  'fetchFundingHistory': False,
72
72
  'fetchFundingRate': False,
73
73
  'fetchFundingRateHistory': False,
@@ -99,12 +99,12 @@ class alpaca(Exchange, ImplicitAPI):
99
99
  'fetchTransactionFees': False,
100
100
  'fetchTransactions': False,
101
101
  'fetchTransfers': False,
102
- 'fetchWithdrawals': False,
102
+ 'fetchWithdrawals': True,
103
103
  'sandbox': True,
104
104
  'setLeverage': False,
105
105
  'setMarginMode': False,
106
106
  'transfer': False,
107
- 'withdraw': False,
107
+ 'withdraw': True,
108
108
  },
109
109
  'api': {
110
110
  'broker': {
@@ -131,12 +131,14 @@ class alpaca(Exchange, ImplicitAPI):
131
131
  'v2/corporate_actions/announcements/{id}',
132
132
  'v2/corporate_actions/announcements',
133
133
  'v2/wallets',
134
+ 'v2/wallets/transfers',
134
135
  ],
135
136
  'post': [
136
137
  'v2/orders',
137
138
  'v2/watchlists',
138
139
  'v2/watchlists/{watchlist_id}',
139
140
  'v2/watchlists:by_name',
141
+ 'v2/wallets/transfers',
140
142
  ],
141
143
  'put': [
142
144
  'v2/watchlists/{watchlist_id}',
@@ -1286,6 +1288,180 @@ class alpaca(Exchange, ImplicitAPI):
1286
1288
  'tag': None,
1287
1289
  }
1288
1290
 
1291
+ async def withdraw(self, code: str, amount: float, address: str, tag=None, params={}):
1292
+ """
1293
+ make a withdrawal
1294
+ :see: https://docs.alpaca.markets/reference/createcryptotransferforaccount
1295
+ :param str code: unified currency code
1296
+ :param float amount: the amount to withdraw
1297
+ :param str address: the address to withdraw to
1298
+ :param str tag: a memo for the transaction
1299
+ :param dict [params]: extra parameters specific to the exchange API endpoint
1300
+ :returns dict: a `transaction structure <https://docs.ccxt.com/#/?id=transaction-structure>`
1301
+ """
1302
+ tag, params = self.handle_withdraw_tag_and_params(tag, params)
1303
+ self.check_address(address)
1304
+ await self.load_markets()
1305
+ currency = self.currency(code)
1306
+ if tag:
1307
+ address = address + ':' + tag
1308
+ request: dict = {
1309
+ 'asset': currency['id'],
1310
+ 'address': address,
1311
+ 'amount': self.number_to_string(amount),
1312
+ }
1313
+ response = await self.traderPrivatePostV2WalletsTransfers(self.extend(request, params))
1314
+ #
1315
+ # {
1316
+ # "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
1317
+ # "tx_hash": "string",
1318
+ # "direction": "INCOMING",
1319
+ # "status": "PROCESSING",
1320
+ # "amount": "string",
1321
+ # "usd_value": "string",
1322
+ # "network_fee": "string",
1323
+ # "fees": "string",
1324
+ # "chain": "string",
1325
+ # "asset": "string",
1326
+ # "from_address": "string",
1327
+ # "to_address": "string",
1328
+ # "created_at": "2024-11-02T07:42:48.402Z"
1329
+ # }
1330
+ #
1331
+ return self.parse_transaction(response, currency)
1332
+
1333
+ async def fetch_transactions_helper(self, type, code, since, limit, params):
1334
+ await self.load_markets()
1335
+ currency = None
1336
+ if code is not None:
1337
+ currency = self.currency(code)
1338
+ response = await self.traderPrivateGetV2WalletsTransfers(params)
1339
+ #
1340
+ # {
1341
+ # "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
1342
+ # "tx_hash": "string",
1343
+ # "direction": "INCOMING",
1344
+ # "status": "PROCESSING",
1345
+ # "amount": "string",
1346
+ # "usd_value": "string",
1347
+ # "network_fee": "string",
1348
+ # "fees": "string",
1349
+ # "chain": "string",
1350
+ # "asset": "string",
1351
+ # "from_address": "string",
1352
+ # "to_address": "string",
1353
+ # "created_at": "2024-11-02T07:42:48.402Z"
1354
+ # }
1355
+ #
1356
+ results = []
1357
+ for i in range(0, len(response)):
1358
+ entry = response[i]
1359
+ direction = self.safe_string(entry, 'direction')
1360
+ if direction == type:
1361
+ results.append(entry)
1362
+ elif direction == 'BOTH':
1363
+ results.append(entry)
1364
+ return self.parse_transactions(results, currency, since, limit, params)
1365
+
1366
+ async def fetch_deposits_withdrawals(self, code: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Transaction]:
1367
+ """
1368
+ fetch history of deposits and withdrawals
1369
+ :see: https://docs.alpaca.markets/reference/listcryptofundingtransfers
1370
+ :param str [code]: unified currency code for the currency of the deposit/withdrawals, default is None
1371
+ :param int [since]: timestamp in ms of the earliest deposit/withdrawal, default is None
1372
+ :param int [limit]: max number of deposit/withdrawals to return, default is None
1373
+ :param dict [params]: extra parameters specific to the exchange API endpoint
1374
+ :returns dict: a list of `transaction structure <https://docs.ccxt.com/#/?id=transaction-structure>`
1375
+ """
1376
+ return await self.fetch_transactions_helper('BOTH', code, since, limit, params)
1377
+
1378
+ async def fetch_deposits(self, code: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Transaction]:
1379
+ """
1380
+ fetch all deposits made to an account
1381
+ :see: https://docs.alpaca.markets/reference/listcryptofundingtransfers
1382
+ :param str [code]: unified currency code
1383
+ :param int [since]: the earliest time in ms to fetch deposits for
1384
+ :param int [limit]: the maximum number of deposit structures to retrieve
1385
+ :param dict [params]: extra parameters specific to the exchange API endpoint
1386
+ :returns dict[]: a list of `transaction structures <https://docs.ccxt.com/#/?id=transaction-structure>`
1387
+ """
1388
+ return await self.fetch_transactions_helper('INCOMING', code, since, limit, params)
1389
+
1390
+ async def fetch_withdrawals(self, code: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Transaction]:
1391
+ """
1392
+ fetch all withdrawals made from an account
1393
+ :see: https://docs.alpaca.markets/reference/listcryptofundingtransfers
1394
+ :param str [code]: unified currency code
1395
+ :param int [since]: the earliest time in ms to fetch withdrawals for
1396
+ :param int [limit]: the maximum number of withdrawal structures to retrieve
1397
+ :param dict [params]: extra parameters specific to the exchange API endpoint
1398
+ :returns dict[]: a list of `transaction structures <https://docs.ccxt.com/#/?id=transaction-structure>`
1399
+ """
1400
+ return await self.fetch_transactions_helper('OUTGOING', code, since, limit, params)
1401
+
1402
+ def parse_transaction(self, transaction: dict, currency: Currency = None) -> Transaction:
1403
+ #
1404
+ # {
1405
+ # "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
1406
+ # "tx_hash": "string",
1407
+ # "direction": "INCOMING",
1408
+ # "status": "PROCESSING",
1409
+ # "amount": "string",
1410
+ # "usd_value": "string",
1411
+ # "network_fee": "string",
1412
+ # "fees": "string",
1413
+ # "chain": "string",
1414
+ # "asset": "string",
1415
+ # "from_address": "string",
1416
+ # "to_address": "string",
1417
+ # "created_at": "2024-11-02T07:42:48.402Z"
1418
+ # }
1419
+ #
1420
+ datetime = self.safe_string(transaction, 'created_at')
1421
+ currencyId = self.safe_string(transaction, 'asset')
1422
+ code = self.safe_currency_code(currencyId, currency)
1423
+ fee = {
1424
+ 'cost': self.safe_number(transaction, 'fees'),
1425
+ 'currency': code,
1426
+ }
1427
+ return {
1428
+ 'info': transaction,
1429
+ 'id': self.safe_string(transaction, 'id'),
1430
+ 'txid': self.safe_string(transaction, 'tx_hash'),
1431
+ 'timestamp': self.parse8601(datetime),
1432
+ 'datetime': datetime,
1433
+ 'network': self.safe_string(transaction, 'chain'),
1434
+ 'address': self.safe_string(transaction, 'to_address'),
1435
+ 'addressTo': self.safe_string(transaction, 'to_address'),
1436
+ 'addressFrom': self.safe_string(transaction, 'from_address'),
1437
+ 'tag': None,
1438
+ 'tagTo': None,
1439
+ 'tagFrom': None,
1440
+ 'type': self.parse_transaction_type(self.safe_string(transaction, 'direction')),
1441
+ 'amount': self.safe_number(transaction, 'amount'),
1442
+ 'currency': code,
1443
+ 'status': self.parse_transaction_status(self.safe_string(transaction, 'status')),
1444
+ 'updated': None,
1445
+ 'fee': fee,
1446
+ 'comment': None,
1447
+ 'internal': None,
1448
+ }
1449
+
1450
+ def parse_transaction_status(self, status: Str):
1451
+ statuses: dict = {
1452
+ 'PROCESSING': 'pending',
1453
+ # 'FAILED': 'failed',
1454
+ # 'SUCCESS': 'ok',
1455
+ }
1456
+ return self.safe_string(statuses, status, status)
1457
+
1458
+ def parse_transaction_type(self, type):
1459
+ types: dict = {
1460
+ 'INCOMING': 'deposit',
1461
+ 'OUTGOING': 'withdrawal',
1462
+ }
1463
+ return self.safe_string(types, type, type)
1464
+
1289
1465
  def sign(self, path, api='public', method='GET', params={}, headers=None, body=None):
1290
1466
  endpoint = '/' + self.implode_params(path, params)
1291
1467
  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.27'
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',