kucoin-api 0.0.77__py3-none-any.whl → 0.0.79__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.
kucoin/ccxt/__init__.py CHANGED
@@ -26,7 +26,7 @@ sys.modules['ccxt'] = ccxt_module
26
26
 
27
27
  # ----------------------------------------------------------------------------
28
28
 
29
- __version__ = '4.4.94'
29
+ __version__ = '4.4.96'
30
30
 
31
31
  # ----------------------------------------------------------------------------
32
32
 
@@ -8,7 +8,7 @@ sys.modules['ccxt'] = ccxt_module
8
8
 
9
9
  # -----------------------------------------------------------------------------
10
10
 
11
- __version__ = '4.4.94'
11
+ __version__ = '4.4.96'
12
12
 
13
13
  # -----------------------------------------------------------------------------
14
14
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  # -----------------------------------------------------------------------------
4
4
 
5
- __version__ = '4.4.94'
5
+ __version__ = '4.4.96'
6
6
 
7
7
  # -----------------------------------------------------------------------------
8
8
 
@@ -231,6 +231,8 @@ class Exchange(BaseExchange):
231
231
  self.last_json_response = json_response
232
232
  if self.verbose:
233
233
  self.log("\nfetch Response:", self.id, method, url, http_status_code, "ResponseHeaders:", headers, "ResponseBody:", http_response)
234
+ if json_response and not isinstance(json_response, list) and self.returnResponseHeaders:
235
+ json_response['responseHeaders'] = headers
234
236
  self.logger.debug("%s %s, Response: %s %s %s", method, url, http_status_code, headers, http_response)
235
237
 
236
238
  except socket.gaierror as e:
@@ -1596,10 +1598,10 @@ class Exchange(BaseExchange):
1596
1598
  """
1597
1599
  raise NotSupported(self.id + ' fetchDepositsWithdrawals() is not supported yet')
1598
1600
 
1599
- async def fetch_deposits(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
1601
+ async def fetch_deposits(self, code: Str = None, since: Int = None, limit: Int = None, params={}):
1600
1602
  raise NotSupported(self.id + ' fetchDeposits() is not supported yet')
1601
1603
 
1602
- async def fetch_withdrawals(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
1604
+ async def fetch_withdrawals(self, code: Str = None, since: Int = None, limit: Int = None, params={}):
1603
1605
  raise NotSupported(self.id + ' fetchWithdrawals() is not supported yet')
1604
1606
 
1605
1607
  async def fetch_deposits_ws(self, code: Str = None, since: Int = None, limit: Int = None, params={}):
@@ -1,6 +1,8 @@
1
1
  import asyncio
2
2
 
3
-
3
+ # Test by running:
4
+ # - python python/ccxt/pro/test/base/test_close.py
5
+ # - python python/ccxt/pro/test/base/test_future.py
4
6
  class Future(asyncio.Future):
5
7
 
6
8
  def resolve(self, result=None):
@@ -30,6 +32,8 @@ class Future(asyncio.Future):
30
32
  if err:
31
33
  exceptions.append(err)
32
34
  # if any exceptions return with first exception
35
+ if future.cancelled():
36
+ return
33
37
  if len(exceptions) > 0:
34
38
  future.set_exception(exceptions[0])
35
39
  # else return first result
@@ -2647,7 +2647,7 @@ class kucoin(Exchange, ImplicitAPI):
2647
2647
  response = await self.privateDeleteHfOrders(self.extend(request, query))
2648
2648
  else:
2649
2649
  response = await self.privateDeleteOrders(self.extend(request, query))
2650
- return response
2650
+ return [self.safe_order({'info': response})]
2651
2651
 
2652
2652
  async def fetch_orders_by_status(self, status, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
2653
2653
  """
@@ -4,7 +4,7 @@
4
4
 
5
5
  # -----------------------------------------------------------------------------
6
6
 
7
- __version__ = '4.4.94'
7
+ __version__ = '4.4.96'
8
8
 
9
9
  # -----------------------------------------------------------------------------
10
10
 
@@ -229,6 +229,7 @@ class Exchange(object):
229
229
  'chrome100': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/100.0.4896.75 Safari/537.36',
230
230
  }
231
231
  headers = None
232
+ returnResponseHeaders = False
232
233
  origin = '*' # CORS origin
233
234
  MAX_VALUE = float('inf')
234
235
  #
@@ -579,6 +580,8 @@ class Exchange(object):
579
580
  if self.verbose:
580
581
  self.log("\nfetch Response:", self.id, method, url, http_status_code, "ResponseHeaders:", headers, "ResponseBody:", http_response)
581
582
  self.logger.debug("%s %s, Response: %s %s %s", method, url, http_status_code, headers, http_response)
583
+ if json_response and not isinstance(json_response, list) and self.returnResponseHeaders:
584
+ json_response['responseHeaders'] = headers
582
585
  response.raise_for_status()
583
586
 
584
587
  except Timeout as e:
@@ -2839,7 +2842,7 @@ class Exchange(object):
2839
2842
  # keep self in mind:
2840
2843
  # in JS: 1 == 1.0 is True; 1 == 1.0 is True
2841
2844
  # in Python: 1 == 1.0 is True
2842
- # in PHP 1 == 1.0 is True, but 1 == 1.0 is False
2845
+ # in PHP 1 == 1.0 is True, but 1 == 1.0 is False.
2843
2846
  if stringVersion.find('.') >= 0:
2844
2847
  return float(stringVersion)
2845
2848
  return int(stringVersion)
@@ -3780,7 +3783,7 @@ class Exchange(object):
3780
3783
  for i in range(0, len(fees)):
3781
3784
  fee = fees[i]
3782
3785
  code = self.safe_string(fee, 'currency')
3783
- feeCurrencyCode = code is not code if None else str(i)
3786
+ feeCurrencyCode = code if (code is not None) else str(i)
3784
3787
  if feeCurrencyCode is not None:
3785
3788
  rate = self.safe_string(fee, 'rate')
3786
3789
  cost = self.safe_string(fee, 'cost')
@@ -5495,10 +5498,10 @@ class Exchange(object):
5495
5498
  """
5496
5499
  raise NotSupported(self.id + ' fetchDepositsWithdrawals() is not supported yet')
5497
5500
 
5498
- def fetch_deposits(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
5501
+ def fetch_deposits(self, code: Str = None, since: Int = None, limit: Int = None, params={}):
5499
5502
  raise NotSupported(self.id + ' fetchDeposits() is not supported yet')
5500
5503
 
5501
- def fetch_withdrawals(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
5504
+ def fetch_withdrawals(self, code: Str = None, since: Int = None, limit: Int = None, params={}):
5502
5505
  raise NotSupported(self.id + ' fetchWithdrawals() is not supported yet')
5503
5506
 
5504
5507
  def fetch_deposits_ws(self, code: Str = None, since: Int = None, limit: Int = None, params={}):
kucoin/ccxt/kucoin.py CHANGED
@@ -2646,7 +2646,7 @@ class kucoin(Exchange, ImplicitAPI):
2646
2646
  response = self.privateDeleteHfOrders(self.extend(request, query))
2647
2647
  else:
2648
2648
  response = self.privateDeleteOrders(self.extend(request, query))
2649
- return response
2649
+ return [self.safe_order({'info': response})]
2650
2650
 
2651
2651
  def fetch_orders_by_status(self, status, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
2652
2652
  """
@@ -8,7 +8,7 @@ sys.modules['ccxt'] = ccxt_module
8
8
 
9
9
  # ----------------------------------------------------------------------------
10
10
 
11
- __version__ = '4.4.94'
11
+ __version__ = '4.4.96'
12
12
 
13
13
  # ----------------------------------------------------------------------------
14
14
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: kucoin-api
3
- Version: 0.0.77
3
+ Version: 0.0.79
4
4
  Summary: kucoin crypto exchange api client
5
5
  Project-URL: Homepage, https://github.com/ccxt/ccxt
6
6
  Project-URL: Issues, https://github.com/ccxt/ccxt
@@ -1,26 +1,26 @@
1
1
  kucoin/__init__.py,sha256=J1NNMLktlkCZKV82j8CFTVES3O3TCVk3so0ROi4E52o,246
2
- kucoin/ccxt/__init__.py,sha256=fDbVvWSSbYA356DZQ4rGZGBC0q4VnzoHkrayupdJYww,6048
3
- kucoin/ccxt/kucoin.py,sha256=K21dkk9MqfRi3PmJuyJ0J7FxwQYrppVtCG0EMEUj-WY,232408
2
+ kucoin/ccxt/__init__.py,sha256=GWGEm4bjn7EwuDiNfqhvOCar1kh4IOKsVgvnGP-cXfE,6048
3
+ kucoin/ccxt/kucoin.py,sha256=8H-NEfBtvSx_9K5qY-i0iAT39xsKdhWBn5XKC4wjgIY,232437
4
4
  kucoin/ccxt/abstract/kucoin.py,sha256=kVrVEXiigc36arfbSS8lDUMnG7uFdKgUKHIhVb0Am_8,28626
5
- kucoin/ccxt/async_support/__init__.py,sha256=Zf_n7uaZS568pPY-cDcszcXP6yQ3owR6qwWH5q7sbog,4781
6
- kucoin/ccxt/async_support/kucoin.py,sha256=7yF38unXPmQ7YYd0qpgcUOw5rFwzexP9p1anSAhQlak,233558
5
+ kucoin/ccxt/async_support/__init__.py,sha256=LxqgyF_ElKfy-NUZZbjIjGxsvEc2haq0fb9UJlBBzMI,4781
6
+ kucoin/ccxt/async_support/kucoin.py,sha256=_NehR_n9khVIndzPmFtAonTXr_1VVfjMk2HepwkZ7Go,233587
7
7
  kucoin/ccxt/async_support/base/__init__.py,sha256=aVYSsFi--b4InRs9zDN_wtCpj8odosAB726JdUHavrk,67
8
- kucoin/ccxt/async_support/base/exchange.py,sha256=Z9NwTqOgxX_ZbS_RhtiRlLojF9sY4xOXTmwyXRjXVc0,119440
8
+ kucoin/ccxt/async_support/base/exchange.py,sha256=Ov3ySIOFH_PGlKGNFfPqF_RywDiSLp9Je64KanBTMDY,119604
9
9
  kucoin/ccxt/async_support/base/throttler.py,sha256=tvDVcdRUVYi8fZRlEcnqtgzcgB_KMUMRs5Pu8tuU-tU,1847
10
10
  kucoin/ccxt/async_support/base/ws/__init__.py,sha256=uockzpLuwntKGZbs5EOWFe-Zg-k6Cj7GhNJLc_RX0so,1791
11
11
  kucoin/ccxt/async_support/base/ws/cache.py,sha256=xf2VOtfUwloxSlIQ39M1RGZHWQzyS9IGhB5NX6cDcAc,8370
12
12
  kucoin/ccxt/async_support/base/ws/client.py,sha256=ekIN5HNgeQgMG3tLZMsE889Aoxs960DLwQnwkTGhdi8,13624
13
13
  kucoin/ccxt/async_support/base/ws/functions.py,sha256=qwvEnjtINWL5ZU-dbbeIunjyBxzFqbGWHfVhxqAcKug,1499
14
- kucoin/ccxt/async_support/base/ws/future.py,sha256=9yFyxqT7cl-7ZFM6LM4b6UPXyO2FGIbAhs5uoJ3-Smo,1271
14
+ kucoin/ccxt/async_support/base/ws/future.py,sha256=hjdQ42zkfju5nar0GpTLJ4zXQBtgBU8DzYM5uPFcjsE,1450
15
15
  kucoin/ccxt/async_support/base/ws/order_book.py,sha256=uBUaIHhzMRykpmo4BCsdJ-t_HozS6VxhEs8x-Kbj-NI,2894
16
16
  kucoin/ccxt/async_support/base/ws/order_book_side.py,sha256=GhnGUt78pJ-AYL_Dq9produGjmBJLCI5FHIRdMz1O-g,6551
17
17
  kucoin/ccxt/base/__init__.py,sha256=eTx1OE3HJjspFUQjGm6LBhaQiMKJnXjkdP-JUXknyQ0,1320
18
18
  kucoin/ccxt/base/decimal_to_precision.py,sha256=fgWRBzRTtsf3r2INyS4f7WHlzgjB5YM1ekiwqD21aac,6634
19
19
  kucoin/ccxt/base/errors.py,sha256=MvCrL_sAM3de616T6RE0PSxiF2xV6Qqz5b1y1ghidbk,4888
20
- kucoin/ccxt/base/exchange.py,sha256=ygC1Ymk0Jd6SUwnCS8Eq0ZaPyYBLyG5iXWNJyrMuhNQ,331662
20
+ kucoin/ccxt/base/exchange.py,sha256=uJ-9MHGpRUufv0rcn7X9QmQSnSKuWj8OjA5poA_qc_s,331855
21
21
  kucoin/ccxt/base/precise.py,sha256=koce64Yrp6vFbGijJtUt-QQ6XhJgeGTCksZ871FPp_A,8886
22
22
  kucoin/ccxt/base/types.py,sha256=vMQfFDVntED4YHrRJt0Q98YaM7OtGhK-DkbkqXFTYHc,11485
23
- kucoin/ccxt/pro/__init__.py,sha256=LQsqFEdq6IHJygEZBGjJpFDuxwrslwa3TmNL6aToneo,4095
23
+ kucoin/ccxt/pro/__init__.py,sha256=sw1CfqnHy9D7GwnQT7iENG76AG2vqKo5q61JkZbLybY,4095
24
24
  kucoin/ccxt/pro/kucoin.py,sha256=598XsFeIFOOAOlY2fuEenBT-pPFjoOKiqPP8lP7dzD4,60794
25
25
  kucoin/ccxt/static_dependencies/README.md,sha256=3TCvhhn09_Cqf9BDDpao1V7EfKHDpQ6k9oWRsLFixpU,18
26
26
  kucoin/ccxt/static_dependencies/__init__.py,sha256=tzFje8cloqmiIE6kola3EaYC0SnD1izWnri69hzHsSw,168
@@ -281,6 +281,6 @@ kucoin/ccxt/static_dependencies/toolz/curried/exceptions.py,sha256=gKFOHDIayAWnX
281
281
  kucoin/ccxt/static_dependencies/toolz/curried/operator.py,sha256=ML92mknkAwzBl2NCm-4werSUmJEtSHNY9NSzhseNM9s,525
282
282
  kucoin/ccxt/static_dependencies/typing_inspect/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
283
283
  kucoin/ccxt/static_dependencies/typing_inspect/typing_inspect.py,sha256=5gIWomLPfuDpgd3gX1GlnX0MuXM3VorR4j2W2qXORiQ,28269
284
- kucoin_api-0.0.77.dist-info/METADATA,sha256=GGEPaS4HRZWTZ3p4qhfNtYYFQ62FhpTKHowUyHfUROo,18571
285
- kucoin_api-0.0.77.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
286
- kucoin_api-0.0.77.dist-info/RECORD,,
284
+ kucoin_api-0.0.79.dist-info/METADATA,sha256=GtgviRYrC0EnVW5Y69bB-bC1qK4gCz1OL-89do1BPKg,18571
285
+ kucoin_api-0.0.79.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
286
+ kucoin_api-0.0.79.dist-info/RECORD,,