ccxt 4.3.86__py2.py3-none-any.whl → 4.3.88__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 (57) hide show
  1. ccxt/__init__.py +2 -1
  2. ccxt/abstract/kucoin.py +1 -0
  3. ccxt/abstract/kucoinfutures.py +1 -0
  4. ccxt/async_support/__init__.py +2 -1
  5. ccxt/async_support/base/exchange.py +3 -3
  6. ccxt/async_support/bingx.py +5 -1
  7. ccxt/async_support/coinex.py +1 -1
  8. ccxt/async_support/hashkey.py +1 -2
  9. ccxt/async_support/kraken.py +32 -5
  10. ccxt/async_support/kucoin.py +2 -0
  11. ccxt/async_support/upbit.py +1 -1
  12. ccxt/base/errors.py +7 -1
  13. ccxt/base/exchange.py +3 -3
  14. ccxt/bingx.py +5 -1
  15. ccxt/coinex.py +1 -1
  16. ccxt/hashkey.py +1 -2
  17. ccxt/kraken.py +32 -5
  18. ccxt/kucoin.py +2 -0
  19. ccxt/pro/__init__.py +1 -1
  20. ccxt/pro/bitfinex.py +1 -0
  21. ccxt/pro/bitfinex2.py +1 -0
  22. ccxt/pro/bitget.py +143 -16
  23. ccxt/pro/bitopro.py +1 -0
  24. ccxt/pro/bitstamp.py +1 -0
  25. ccxt/pro/blockchaincom.py +1 -0
  26. ccxt/pro/cex.py +1 -0
  27. ccxt/pro/coincheck.py +1 -0
  28. ccxt/pro/coinone.py +1 -0
  29. ccxt/pro/hashkey.py +1 -0
  30. ccxt/pro/hitbtc.py +1 -0
  31. ccxt/pro/hollaex.py +1 -0
  32. ccxt/pro/htx.py +1 -0
  33. ccxt/pro/huobijp.py +1 -0
  34. ccxt/pro/hyperliquid.py +7 -0
  35. ccxt/pro/independentreserve.py +1 -0
  36. ccxt/pro/lbank.py +1 -0
  37. ccxt/pro/luno.py +1 -0
  38. ccxt/pro/ndax.py +5 -0
  39. ccxt/pro/okcoin.py +7 -0
  40. ccxt/pro/onetrading.py +1 -0
  41. ccxt/pro/p2b.py +30 -7
  42. ccxt/pro/paradex.py +1 -0
  43. ccxt/pro/poloniex.py +32 -3
  44. ccxt/pro/poloniexfutures.py +1 -0
  45. ccxt/pro/probit.py +2 -0
  46. ccxt/pro/upbit.py +44 -3
  47. ccxt/pro/vertex.py +1 -0
  48. ccxt/pro/wazirx.py +3 -0
  49. ccxt/pro/whitebit.py +9 -0
  50. ccxt/test/tests_async.py +18 -1
  51. ccxt/test/tests_sync.py +18 -1
  52. ccxt/upbit.py +1 -1
  53. {ccxt-4.3.86.dist-info → ccxt-4.3.88.dist-info}/METADATA +7 -6
  54. {ccxt-4.3.86.dist-info → ccxt-4.3.88.dist-info}/RECORD +57 -57
  55. {ccxt-4.3.86.dist-info → ccxt-4.3.88.dist-info}/LICENSE.txt +0 -0
  56. {ccxt-4.3.86.dist-info → ccxt-4.3.88.dist-info}/WHEEL +0 -0
  57. {ccxt-4.3.86.dist-info → ccxt-4.3.88.dist-info}/top_level.txt +0 -0
ccxt/__init__.py CHANGED
@@ -22,7 +22,7 @@
22
22
 
23
23
  # ----------------------------------------------------------------------------
24
24
 
25
- __version__ = '4.3.86'
25
+ __version__ = '4.3.88'
26
26
 
27
27
  # ----------------------------------------------------------------------------
28
28
 
@@ -80,6 +80,7 @@ from ccxt.base.errors import RequestTimeout # noqa: F4
80
80
  from ccxt.base.errors import BadResponse # noqa: F401
81
81
  from ccxt.base.errors import NullResponse # noqa: F401
82
82
  from ccxt.base.errors import CancelPending # noqa: F401
83
+ from ccxt.base.errors import UnsubscribeError # noqa: F401
83
84
  from ccxt.base.errors import error_hierarchy # noqa: F401
84
85
 
85
86
  from ccxt.ace import ace # noqa: F401
ccxt/abstract/kucoin.py CHANGED
@@ -198,6 +198,7 @@ class ImplicitAPI:
198
198
  broker_get_broker_nd_account = brokerGetBrokerNdAccount = Entry('broker/nd/account', 'broker', 'GET', {'cost': 2})
199
199
  broker_get_broker_nd_account_apikey = brokerGetBrokerNdAccountApikey = Entry('broker/nd/account/apikey', 'broker', 'GET', {'cost': 2})
200
200
  broker_get_broker_nd_rebase_download = brokerGetBrokerNdRebaseDownload = Entry('broker/nd/rebase/download', 'broker', 'GET', {'cost': 3})
201
+ broker_get_asset_ndbroker_deposit_list = brokerGetAssetNdbrokerDepositList = Entry('asset/ndbroker/deposit/list', 'broker', 'GET', {'cost': 1})
201
202
  broker_get_broker_nd_transfer_detail = brokerGetBrokerNdTransferDetail = Entry('broker/nd/transfer/detail', 'broker', 'GET', {'cost': 1})
202
203
  broker_get_broker_nd_deposit_detail = brokerGetBrokerNdDepositDetail = Entry('broker/nd/deposit/detail', 'broker', 'GET', {'cost': 1})
203
204
  broker_get_broker_nd_withdraw_detail = brokerGetBrokerNdWithdrawDetail = Entry('broker/nd/withdraw/detail', 'broker', 'GET', {'cost': 1})
@@ -219,6 +219,7 @@ class ImplicitAPI:
219
219
  broker_get_broker_nd_account = brokerGetBrokerNdAccount = Entry('broker/nd/account', 'broker', 'GET', {'cost': 2})
220
220
  broker_get_broker_nd_account_apikey = brokerGetBrokerNdAccountApikey = Entry('broker/nd/account/apikey', 'broker', 'GET', {'cost': 2})
221
221
  broker_get_broker_nd_rebase_download = brokerGetBrokerNdRebaseDownload = Entry('broker/nd/rebase/download', 'broker', 'GET', {'cost': 3})
222
+ broker_get_asset_ndbroker_deposit_list = brokerGetAssetNdbrokerDepositList = Entry('asset/ndbroker/deposit/list', 'broker', 'GET', {'cost': 1})
222
223
  broker_get_broker_nd_transfer_detail = brokerGetBrokerNdTransferDetail = Entry('broker/nd/transfer/detail', 'broker', 'GET', {'cost': 1})
223
224
  broker_get_broker_nd_deposit_detail = brokerGetBrokerNdDepositDetail = Entry('broker/nd/deposit/detail', 'broker', 'GET', {'cost': 1})
224
225
  broker_get_broker_nd_withdraw_detail = brokerGetBrokerNdWithdrawDetail = Entry('broker/nd/withdraw/detail', 'broker', 'GET', {'cost': 1})
@@ -4,7 +4,7 @@
4
4
 
5
5
  # -----------------------------------------------------------------------------
6
6
 
7
- __version__ = '4.3.86'
7
+ __version__ = '4.3.88'
8
8
 
9
9
  # -----------------------------------------------------------------------------
10
10
 
@@ -59,6 +59,7 @@ from ccxt.base.errors import RequestTimeout # noqa: F4
59
59
  from ccxt.base.errors import BadResponse # noqa: F401
60
60
  from ccxt.base.errors import NullResponse # noqa: F401
61
61
  from ccxt.base.errors import CancelPending # noqa: F401
62
+ from ccxt.base.errors import UnsubscribeError # noqa: F401
62
63
  from ccxt.base.errors import error_hierarchy # noqa: F401
63
64
 
64
65
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  # -----------------------------------------------------------------------------
4
4
 
5
- __version__ = '4.3.86'
5
+ __version__ = '4.3.88'
6
6
 
7
7
  # -----------------------------------------------------------------------------
8
8
 
@@ -1792,7 +1792,7 @@ class Exchange(BaseExchange):
1792
1792
  errors = 0
1793
1793
  result = self.array_concat(result, response)
1794
1794
  last = self.safe_value(response, responseLength - 1)
1795
- paginationTimestamp = self.safe_integer(last, 'timestamp') - 1
1795
+ paginationTimestamp = self.safe_integer(last, 'timestamp') + 1
1796
1796
  if (until is not None) and (paginationTimestamp >= until):
1797
1797
  break
1798
1798
  except Exception as e:
@@ -1945,7 +1945,7 @@ class Exchange(BaseExchange):
1945
1945
  """
1946
1946
  if self.has['fetchPositionsHistory']:
1947
1947
  positions = await self.fetch_positions_history([symbol], since, limit, params)
1948
- return self.safe_dict(positions, 0)
1948
+ return positions
1949
1949
  else:
1950
1950
  raise NotSupported(self.id + ' fetchPositionHistory() is not supported yet')
1951
1951
 
@@ -749,7 +749,11 @@ class bingx(Exchange, ImplicitAPI):
749
749
  symbol += ':' + settle
750
750
  fees = self.safe_dict(self.fees, type, {})
751
751
  contractSize = self.parse_number('1') if (swap) else None
752
- isActive = self.safe_string(market, 'status') == '1'
752
+ isActive = False
753
+ if (self.safe_string(market, 'apiStateOpen') == 'true') and (self.safe_string(market, 'apiStateClose') == 'true'):
754
+ isActive = True # swap active
755
+ elif self.safe_bool(market, 'apiStateSell') and self.safe_bool(market, 'apiStateBuy'):
756
+ isActive = True # spot active
753
757
  isInverse = None if (spot) else checkIsInverse
754
758
  isLinear = None if (spot) else checkIsLinear
755
759
  timeOnline = self.safe_integer(market, 'timeOnline')
@@ -5269,7 +5269,7 @@ class coinex(Exchange, ImplicitAPI):
5269
5269
  'shortLeverage': leverageValue,
5270
5270
  }
5271
5271
 
5272
- async def fetch_position_history(self, symbol: str, since: Int = None, limit: Int = None, params={}) -> Position:
5272
+ async def fetch_position_history(self, symbol: str, since: Int = None, limit: Int = None, params={}) -> List[Position]:
5273
5273
  """
5274
5274
  fetches historical positions
5275
5275
  :see: https://docs.coinex.com/api/v2/futures/position/http/list-finished-position
@@ -47,7 +47,6 @@ class hashkey(Exchange, ImplicitAPI):
47
47
  'version': 'v1',
48
48
  'certified': True,
49
49
  'pro': True,
50
- 'hostname': '/api-glb',
51
50
  'has': {
52
51
  'CORS': None,
53
52
  'spot': True,
@@ -168,7 +167,7 @@ class hashkey(Exchange, ImplicitAPI):
168
167
  'www': 'https://global.hashkey.com/',
169
168
  'doc': 'https://hashkeyglobal-apidoc.readme.io/',
170
169
  'fees': 'https://support.global.hashkey.com/hc/en-us/articles/13199900083612-HashKey-Global-Fee-Structure',
171
- 'referral': '',
170
+ 'referral': 'https://global.hashkey.com/en-US/register/invite?invite_code=82FQUN',
172
171
  },
173
172
  'api': {
174
173
  'public': {
@@ -1086,6 +1086,7 @@ class kraken(Exchange, ImplicitAPI):
1086
1086
  :param int [limit]: max number of ledger entrys to return, default is None
1087
1087
  :param dict [params]: extra parameters specific to the exchange API endpoint
1088
1088
  :param int [params.until]: timestamp in ms of the latest ledger entry
1089
+ :param int [params.end]: timestamp in seconds of the latest ledger entry
1089
1090
  :returns dict: a `ledger structure <https://docs.ccxt.com/#/?id=ledger-structure>`
1090
1091
  """
1091
1092
  # https://www.kraken.com/features/api#get-ledgers-info
@@ -1097,7 +1098,11 @@ class kraken(Exchange, ImplicitAPI):
1097
1098
  request['asset'] = currency['id']
1098
1099
  if since is not None:
1099
1100
  request['start'] = self.parse_to_int(since / 1000)
1100
- request, params = self.handle_until_option('end', request, params)
1101
+ until = self.safe_string_n(params, ['until', 'till'])
1102
+ if until is not None:
1103
+ params = self.omit(params, ['until', 'till'])
1104
+ untilDivided = Precise.string_div(until, '1000')
1105
+ request['end'] = self.parse_to_int(Precise.string_add(untilDivided, '1'))
1101
1106
  response = await self.privatePostLedgers(self.extend(request, params))
1102
1107
  # { error: [],
1103
1108
  # "result": {ledger: {'LPUAIB-TS774-UKHP7X': { refid: "A2B4HBV-L4MDIE-JU4N3N",
@@ -1995,6 +2000,8 @@ class kraken(Exchange, ImplicitAPI):
1995
2000
  :param int [since]: the earliest time in ms to fetch trades for
1996
2001
  :param int [limit]: the maximum number of trades structures to retrieve
1997
2002
  :param dict [params]: extra parameters specific to the exchange API endpoint
2003
+ :param int [params.until]: timestamp in ms of the latest trade entry
2004
+ :param int [params.end]: timestamp in seconds of the latest trade entry
1998
2005
  :returns Trade[]: a list of `trade structures <https://docs.ccxt.com/#/?id=trade-structure>`
1999
2006
  """
2000
2007
  await self.load_markets()
@@ -2007,6 +2014,11 @@ class kraken(Exchange, ImplicitAPI):
2007
2014
  }
2008
2015
  if since is not None:
2009
2016
  request['start'] = self.parse_to_int(since / 1000)
2017
+ until = self.safe_string_n(params, ['until', 'till'])
2018
+ if until is not None:
2019
+ params = self.omit(params, ['until', 'till'])
2020
+ untilDivided = Precise.string_div(until, '1000')
2021
+ request['end'] = self.parse_to_int(Precise.string_add(untilDivided, '1'))
2010
2022
  response = await self.privatePostTradesHistory(self.extend(request, params))
2011
2023
  #
2012
2024
  # {
@@ -2391,6 +2403,8 @@ class kraken(Exchange, ImplicitAPI):
2391
2403
  :param int [since]: the earliest time in ms to fetch deposits for
2392
2404
  :param int [limit]: the maximum number of deposits structures to retrieve
2393
2405
  :param dict [params]: extra parameters specific to the exchange API endpoint
2406
+ :param int [params.until]: timestamp in ms of the latest transaction entry
2407
+ :param int [params.end]: timestamp in seconds of the latest transaction entry
2394
2408
  :returns dict[]: a list of `transaction structures <https://docs.ccxt.com/#/?id=transaction-structure>`
2395
2409
  """
2396
2410
  # https://www.kraken.com/en-us/help/api#deposit-status
@@ -2400,7 +2414,13 @@ class kraken(Exchange, ImplicitAPI):
2400
2414
  currency = self.currency(code)
2401
2415
  request['asset'] = currency['id']
2402
2416
  if since is not None:
2403
- request['start'] = since
2417
+ sinceString = self.number_to_string(since)
2418
+ request['start'] = Precise.string_div(sinceString, '1000')
2419
+ until = self.safe_string_n(params, ['until', 'till'])
2420
+ if until is not None:
2421
+ params = self.omit(params, ['until', 'till'])
2422
+ untilDivided = Precise.string_div(until, '1000')
2423
+ request['end'] = Precise.string_add(untilDivided, '1')
2404
2424
  response = await self.privatePostDepositStatus(self.extend(request, params))
2405
2425
  #
2406
2426
  # { error: [],
@@ -2446,8 +2466,9 @@ class kraken(Exchange, ImplicitAPI):
2446
2466
  :param int [since]: the earliest time in ms to fetch withdrawals for
2447
2467
  :param int [limit]: the maximum number of withdrawals structures to retrieve
2448
2468
  :param dict [params]: extra parameters specific to the exchange API endpoint
2449
- :param dict [params.end]: End timestamp, withdrawals created strictly after will be not be included in the response
2450
- :param boolean [params.paginate]: default False, when True will automatically paginate by calling self endpoint multiple times
2469
+ :param int [params.until]: timestamp in ms of the latest transaction entry
2470
+ :param int [params.end]: timestamp in seconds of the latest transaction entry
2471
+ :param boolean [params.paginate]: default False, when True will automatically paginate by calling self endpoint multiple times
2451
2472
  :returns dict[]: a list of `transaction structures <https://docs.ccxt.com/#/?id=transaction-structure>`
2452
2473
  """
2453
2474
  await self.load_markets()
@@ -2461,7 +2482,13 @@ class kraken(Exchange, ImplicitAPI):
2461
2482
  currency = self.currency(code)
2462
2483
  request['asset'] = currency['id']
2463
2484
  if since is not None:
2464
- request['since'] = str(since)
2485
+ sinceString = self.number_to_string(since)
2486
+ request['start'] = Precise.string_div(sinceString, '1000')
2487
+ until = self.safe_string_n(params, ['until', 'till'])
2488
+ if until is not None:
2489
+ params = self.omit(params, ['until', 'till'])
2490
+ untilDivided = Precise.string_div(until, '1000')
2491
+ request['end'] = Precise.string_add(untilDivided, '1')
2465
2492
  response = await self.privatePostWithdrawStatus(self.extend(request, params))
2466
2493
  #
2467
2494
  # with no pagination
@@ -415,6 +415,7 @@ class kucoin(Exchange, ImplicitAPI):
415
415
  'broker/nd/account': 2,
416
416
  'broker/nd/account/apikey': 2,
417
417
  'broker/nd/rebase/download': 3,
418
+ 'asset/ndbroker/deposit/list': 1,
418
419
  'broker/nd/transfer/detail': 1,
419
420
  'broker/nd/deposit/detail': 1,
420
421
  'broker/nd/withdraw/detail': 1,
@@ -706,6 +707,7 @@ class kucoin(Exchange, ImplicitAPI):
706
707
  'purchase/orders': 'v3',
707
708
  'margin/symbols': 'v3',
708
709
  'affiliate/inviter/statistics': 'v2',
710
+ 'asset/ndbroker/deposit/list': 'v1',
709
711
  },
710
712
  'POST': {
711
713
  # account
@@ -1891,7 +1891,7 @@ class upbit(Exchange, ImplicitAPI):
1891
1891
  body = self.json(params)
1892
1892
  headers['Content-Type'] = 'application/json'
1893
1893
  if hasQuery:
1894
- auth = self.urlencode(query)
1894
+ auth = self.rawencode(query)
1895
1895
  if auth is not None:
1896
1896
  hash = self.hash(self.encode(auth), 'sha512')
1897
1897
  request['query_hash'] = hash
ccxt/base/errors.py CHANGED
@@ -51,6 +51,7 @@ error_hierarchy = {
51
51
  },
52
52
  'CancelPending': {},
53
53
  },
54
+ 'UnsubscribeError': {},
54
55
  },
55
56
  }
56
57
 
@@ -211,6 +212,10 @@ class CancelPending(OperationFailed):
211
212
  pass
212
213
 
213
214
 
215
+ class UnsubscribeError(BaseError):
216
+ pass
217
+
218
+
214
219
  __all__ = [
215
220
  'error_hierarchy',
216
221
  'BaseError',
@@ -251,5 +256,6 @@ __all__ = [
251
256
  'RequestTimeout',
252
257
  'BadResponse',
253
258
  'NullResponse',
254
- 'CancelPending'
259
+ 'CancelPending',
260
+ 'UnsubscribeError'
255
261
  ]
ccxt/base/exchange.py CHANGED
@@ -4,7 +4,7 @@
4
4
 
5
5
  # -----------------------------------------------------------------------------
6
6
 
7
- __version__ = '4.3.86'
7
+ __version__ = '4.3.88'
8
8
 
9
9
  # -----------------------------------------------------------------------------
10
10
 
@@ -5846,7 +5846,7 @@ class Exchange(object):
5846
5846
  errors = 0
5847
5847
  result = self.array_concat(result, response)
5848
5848
  last = self.safe_value(response, responseLength - 1)
5849
- paginationTimestamp = self.safe_integer(last, 'timestamp') - 1
5849
+ paginationTimestamp = self.safe_integer(last, 'timestamp') + 1
5850
5850
  if (until is not None) and (paginationTimestamp >= until):
5851
5851
  break
5852
5852
  except Exception as e:
@@ -6215,7 +6215,7 @@ class Exchange(object):
6215
6215
  """
6216
6216
  if self.has['fetchPositionsHistory']:
6217
6217
  positions = self.fetch_positions_history([symbol], since, limit, params)
6218
- return self.safe_dict(positions, 0)
6218
+ return positions
6219
6219
  else:
6220
6220
  raise NotSupported(self.id + ' fetchPositionHistory() is not supported yet')
6221
6221
 
ccxt/bingx.py CHANGED
@@ -748,7 +748,11 @@ class bingx(Exchange, ImplicitAPI):
748
748
  symbol += ':' + settle
749
749
  fees = self.safe_dict(self.fees, type, {})
750
750
  contractSize = self.parse_number('1') if (swap) else None
751
- isActive = self.safe_string(market, 'status') == '1'
751
+ isActive = False
752
+ if (self.safe_string(market, 'apiStateOpen') == 'true') and (self.safe_string(market, 'apiStateClose') == 'true'):
753
+ isActive = True # swap active
754
+ elif self.safe_bool(market, 'apiStateSell') and self.safe_bool(market, 'apiStateBuy'):
755
+ isActive = True # spot active
752
756
  isInverse = None if (spot) else checkIsInverse
753
757
  isLinear = None if (spot) else checkIsLinear
754
758
  timeOnline = self.safe_integer(market, 'timeOnline')
ccxt/coinex.py CHANGED
@@ -5268,7 +5268,7 @@ class coinex(Exchange, ImplicitAPI):
5268
5268
  'shortLeverage': leverageValue,
5269
5269
  }
5270
5270
 
5271
- def fetch_position_history(self, symbol: str, since: Int = None, limit: Int = None, params={}) -> Position:
5271
+ def fetch_position_history(self, symbol: str, since: Int = None, limit: Int = None, params={}) -> List[Position]:
5272
5272
  """
5273
5273
  fetches historical positions
5274
5274
  :see: https://docs.coinex.com/api/v2/futures/position/http/list-finished-position
ccxt/hashkey.py CHANGED
@@ -47,7 +47,6 @@ class hashkey(Exchange, ImplicitAPI):
47
47
  'version': 'v1',
48
48
  'certified': True,
49
49
  'pro': True,
50
- 'hostname': '/api-glb',
51
50
  'has': {
52
51
  'CORS': None,
53
52
  'spot': True,
@@ -168,7 +167,7 @@ class hashkey(Exchange, ImplicitAPI):
168
167
  'www': 'https://global.hashkey.com/',
169
168
  'doc': 'https://hashkeyglobal-apidoc.readme.io/',
170
169
  'fees': 'https://support.global.hashkey.com/hc/en-us/articles/13199900083612-HashKey-Global-Fee-Structure',
171
- 'referral': '',
170
+ 'referral': 'https://global.hashkey.com/en-US/register/invite?invite_code=82FQUN',
172
171
  },
173
172
  'api': {
174
173
  'public': {
ccxt/kraken.py CHANGED
@@ -1086,6 +1086,7 @@ class kraken(Exchange, ImplicitAPI):
1086
1086
  :param int [limit]: max number of ledger entrys to return, default is None
1087
1087
  :param dict [params]: extra parameters specific to the exchange API endpoint
1088
1088
  :param int [params.until]: timestamp in ms of the latest ledger entry
1089
+ :param int [params.end]: timestamp in seconds of the latest ledger entry
1089
1090
  :returns dict: a `ledger structure <https://docs.ccxt.com/#/?id=ledger-structure>`
1090
1091
  """
1091
1092
  # https://www.kraken.com/features/api#get-ledgers-info
@@ -1097,7 +1098,11 @@ class kraken(Exchange, ImplicitAPI):
1097
1098
  request['asset'] = currency['id']
1098
1099
  if since is not None:
1099
1100
  request['start'] = self.parse_to_int(since / 1000)
1100
- request, params = self.handle_until_option('end', request, params)
1101
+ until = self.safe_string_n(params, ['until', 'till'])
1102
+ if until is not None:
1103
+ params = self.omit(params, ['until', 'till'])
1104
+ untilDivided = Precise.string_div(until, '1000')
1105
+ request['end'] = self.parse_to_int(Precise.string_add(untilDivided, '1'))
1101
1106
  response = self.privatePostLedgers(self.extend(request, params))
1102
1107
  # { error: [],
1103
1108
  # "result": {ledger: {'LPUAIB-TS774-UKHP7X': { refid: "A2B4HBV-L4MDIE-JU4N3N",
@@ -1995,6 +2000,8 @@ class kraken(Exchange, ImplicitAPI):
1995
2000
  :param int [since]: the earliest time in ms to fetch trades for
1996
2001
  :param int [limit]: the maximum number of trades structures to retrieve
1997
2002
  :param dict [params]: extra parameters specific to the exchange API endpoint
2003
+ :param int [params.until]: timestamp in ms of the latest trade entry
2004
+ :param int [params.end]: timestamp in seconds of the latest trade entry
1998
2005
  :returns Trade[]: a list of `trade structures <https://docs.ccxt.com/#/?id=trade-structure>`
1999
2006
  """
2000
2007
  self.load_markets()
@@ -2007,6 +2014,11 @@ class kraken(Exchange, ImplicitAPI):
2007
2014
  }
2008
2015
  if since is not None:
2009
2016
  request['start'] = self.parse_to_int(since / 1000)
2017
+ until = self.safe_string_n(params, ['until', 'till'])
2018
+ if until is not None:
2019
+ params = self.omit(params, ['until', 'till'])
2020
+ untilDivided = Precise.string_div(until, '1000')
2021
+ request['end'] = self.parse_to_int(Precise.string_add(untilDivided, '1'))
2010
2022
  response = self.privatePostTradesHistory(self.extend(request, params))
2011
2023
  #
2012
2024
  # {
@@ -2391,6 +2403,8 @@ class kraken(Exchange, ImplicitAPI):
2391
2403
  :param int [since]: the earliest time in ms to fetch deposits for
2392
2404
  :param int [limit]: the maximum number of deposits structures to retrieve
2393
2405
  :param dict [params]: extra parameters specific to the exchange API endpoint
2406
+ :param int [params.until]: timestamp in ms of the latest transaction entry
2407
+ :param int [params.end]: timestamp in seconds of the latest transaction entry
2394
2408
  :returns dict[]: a list of `transaction structures <https://docs.ccxt.com/#/?id=transaction-structure>`
2395
2409
  """
2396
2410
  # https://www.kraken.com/en-us/help/api#deposit-status
@@ -2400,7 +2414,13 @@ class kraken(Exchange, ImplicitAPI):
2400
2414
  currency = self.currency(code)
2401
2415
  request['asset'] = currency['id']
2402
2416
  if since is not None:
2403
- request['start'] = since
2417
+ sinceString = self.number_to_string(since)
2418
+ request['start'] = Precise.string_div(sinceString, '1000')
2419
+ until = self.safe_string_n(params, ['until', 'till'])
2420
+ if until is not None:
2421
+ params = self.omit(params, ['until', 'till'])
2422
+ untilDivided = Precise.string_div(until, '1000')
2423
+ request['end'] = Precise.string_add(untilDivided, '1')
2404
2424
  response = self.privatePostDepositStatus(self.extend(request, params))
2405
2425
  #
2406
2426
  # { error: [],
@@ -2446,8 +2466,9 @@ class kraken(Exchange, ImplicitAPI):
2446
2466
  :param int [since]: the earliest time in ms to fetch withdrawals for
2447
2467
  :param int [limit]: the maximum number of withdrawals structures to retrieve
2448
2468
  :param dict [params]: extra parameters specific to the exchange API endpoint
2449
- :param dict [params.end]: End timestamp, withdrawals created strictly after will be not be included in the response
2450
- :param boolean [params.paginate]: default False, when True will automatically paginate by calling self endpoint multiple times
2469
+ :param int [params.until]: timestamp in ms of the latest transaction entry
2470
+ :param int [params.end]: timestamp in seconds of the latest transaction entry
2471
+ :param boolean [params.paginate]: default False, when True will automatically paginate by calling self endpoint multiple times
2451
2472
  :returns dict[]: a list of `transaction structures <https://docs.ccxt.com/#/?id=transaction-structure>`
2452
2473
  """
2453
2474
  self.load_markets()
@@ -2461,7 +2482,13 @@ class kraken(Exchange, ImplicitAPI):
2461
2482
  currency = self.currency(code)
2462
2483
  request['asset'] = currency['id']
2463
2484
  if since is not None:
2464
- request['since'] = str(since)
2485
+ sinceString = self.number_to_string(since)
2486
+ request['start'] = Precise.string_div(sinceString, '1000')
2487
+ until = self.safe_string_n(params, ['until', 'till'])
2488
+ if until is not None:
2489
+ params = self.omit(params, ['until', 'till'])
2490
+ untilDivided = Precise.string_div(until, '1000')
2491
+ request['end'] = Precise.string_add(untilDivided, '1')
2465
2492
  response = self.privatePostWithdrawStatus(self.extend(request, params))
2466
2493
  #
2467
2494
  # with no pagination
ccxt/kucoin.py CHANGED
@@ -414,6 +414,7 @@ class kucoin(Exchange, ImplicitAPI):
414
414
  'broker/nd/account': 2,
415
415
  'broker/nd/account/apikey': 2,
416
416
  'broker/nd/rebase/download': 3,
417
+ 'asset/ndbroker/deposit/list': 1,
417
418
  'broker/nd/transfer/detail': 1,
418
419
  'broker/nd/deposit/detail': 1,
419
420
  'broker/nd/withdraw/detail': 1,
@@ -705,6 +706,7 @@ class kucoin(Exchange, ImplicitAPI):
705
706
  'purchase/orders': 'v3',
706
707
  'margin/symbols': 'v3',
707
708
  'affiliate/inviter/statistics': 'v2',
709
+ 'asset/ndbroker/deposit/list': 'v1',
708
710
  },
709
711
  'POST': {
710
712
  # account
ccxt/pro/__init__.py CHANGED
@@ -4,7 +4,7 @@
4
4
 
5
5
  # ----------------------------------------------------------------------------
6
6
 
7
- __version__ = '4.3.86'
7
+ __version__ = '4.3.88'
8
8
 
9
9
  # ----------------------------------------------------------------------------
10
10
 
ccxt/pro/bitfinex.py CHANGED
@@ -24,6 +24,7 @@ class bitfinex(ccxt.async_support.bitfinex):
24
24
  'watchTickers': False,
25
25
  'watchOrderBook': True,
26
26
  'watchTrades': True,
27
+ 'watchTradesForSymbols': False,
27
28
  'watchBalance': False, # for now
28
29
  'watchOHLCV': False, # missing on the exchange side in v1
29
30
  },
ccxt/pro/bitfinex2.py CHANGED
@@ -25,6 +25,7 @@ class bitfinex2(ccxt.async_support.bitfinex2):
25
25
  'watchTickers': False,
26
26
  'watchOrderBook': True,
27
27
  'watchTrades': True,
28
+ 'watchTradesForSymbols': False,
28
29
  'watchMyTrades': True,
29
30
  'watchBalance': True,
30
31
  'watchOHLCV': True,