kucoin-api 0.0.82__py3-none-any.whl → 0.0.84__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.97'
29
+ __version__ = '4.4.99'
30
30
 
31
31
  # ----------------------------------------------------------------------------
32
32
 
@@ -59,6 +59,7 @@ from ccxt.base.errors import NoChange # noqa: F4
59
59
  from ccxt.base.errors import MarginModeAlreadySet # noqa: F401
60
60
  from ccxt.base.errors import MarketClosed # noqa: F401
61
61
  from ccxt.base.errors import ManualInteractionNeeded # noqa: F401
62
+ from ccxt.base.errors import RestrictedLocation # noqa: F401
62
63
  from ccxt.base.errors import InsufficientFunds # noqa: F401
63
64
  from ccxt.base.errors import InvalidAddress # noqa: F401
64
65
  from ccxt.base.errors import AddressPending # noqa: F401
@@ -8,7 +8,7 @@ sys.modules['ccxt'] = ccxt_module
8
8
 
9
9
  # -----------------------------------------------------------------------------
10
10
 
11
- __version__ = '4.4.97'
11
+ __version__ = '4.4.99'
12
12
 
13
13
  # -----------------------------------------------------------------------------
14
14
 
@@ -38,6 +38,7 @@ from ccxt.base.errors import NoChange # noqa: F4
38
38
  from ccxt.base.errors import MarginModeAlreadySet # noqa: F401
39
39
  from ccxt.base.errors import MarketClosed # noqa: F401
40
40
  from ccxt.base.errors import ManualInteractionNeeded # noqa: F401
41
+ from ccxt.base.errors import RestrictedLocation # noqa: F401
41
42
  from ccxt.base.errors import InsufficientFunds # noqa: F401
42
43
  from ccxt.base.errors import InvalidAddress # noqa: F401
43
44
  from ccxt.base.errors import AddressPending # noqa: F401
@@ -2,7 +2,7 @@
2
2
 
3
3
  # -----------------------------------------------------------------------------
4
4
 
5
- __version__ = '4.4.97'
5
+ __version__ = '4.4.99'
6
6
 
7
7
  # -----------------------------------------------------------------------------
8
8
 
@@ -33,25 +33,23 @@ NO_PADDING = 5
33
33
  PAD_WITH_ZERO = 6
34
34
 
35
35
 
36
- def decimal_to_precision(n, rounding_mode=ROUND, numPrecisionDigits=None, counting_mode=DECIMAL_PLACES, padding_mode=NO_PADDING):
37
- assert numPrecisionDigits is not None, 'numPrecisionDigits should not be None'
36
+ def decimal_to_precision(n, rounding_mode=ROUND, precision=None, counting_mode=DECIMAL_PLACES, padding_mode=NO_PADDING):
37
+ assert precision is not None, 'precision should not be None'
38
38
 
39
- if isinstance(numPrecisionDigits, str):
40
- numPrecisionDigits = float(numPrecisionDigits)
41
- assert isinstance(numPrecisionDigits, float) or isinstance(numPrecisionDigits, decimal.Decimal) or isinstance(numPrecisionDigits, numbers.Integral), 'numPrecisionDigits has an invalid number'
39
+ if isinstance(precision, str):
40
+ precision = float(precision)
41
+ assert isinstance(precision, float) or isinstance(precision, decimal.Decimal) or isinstance(precision, numbers.Integral), 'precision has an invalid number'
42
42
 
43
43
  if counting_mode == TICK_SIZE:
44
- assert numPrecisionDigits > 0, 'negative or zero numPrecisionDigits can not be used with TICK_SIZE precisionMode'
44
+ assert precision > 0, 'negative or zero precision can not be used with TICK_SIZE precisionMode'
45
45
  else:
46
- assert isinstance(numPrecisionDigits, numbers.Integral)
46
+ assert isinstance(precision, numbers.Integral)
47
47
 
48
48
  assert rounding_mode in [TRUNCATE, ROUND]
49
49
  assert counting_mode in [DECIMAL_PLACES, SIGNIFICANT_DIGITS, TICK_SIZE]
50
50
  assert padding_mode in [NO_PADDING, PAD_WITH_ZERO]
51
51
  # end of checks
52
52
 
53
- precision = numPrecisionDigits # "precision" variable name was in signature, but to make function signature similar to php/js, I had to change the argument name to "numPrecisionDigits". however, the below codes use "precision" variable name, so we have to assign that name here (you can change the usage of 'precision' variable name below everywhere, but i've refrained to do that to avoid many changes)
54
-
55
53
  context = decimal.getcontext()
56
54
 
57
55
  if counting_mode != TICK_SIZE:
@@ -1,9 +1,3 @@
1
- # ----------------------------------------------------------------------------
2
-
3
- # PLEASE DO NOT EDIT THIS FILE, IT IS GENERATED AND WILL BE OVERWRITTEN:
4
- # https://github.com/ccxt/ccxt/blob/master/CONTRIBUTING.md#how-to-contribute-code
5
- # EDIT THE CORRESPONDENT .ts FILE INSTEAD
6
-
7
1
  error_hierarchy = {
8
2
  'BaseError': {
9
3
  'ExchangeError': {
@@ -23,6 +17,7 @@ error_hierarchy = {
23
17
  },
24
18
  'MarketClosed': {},
25
19
  'ManualInteractionNeeded': {},
20
+ 'RestrictedLocation': {},
26
21
  },
27
22
  'InsufficientFunds': {},
28
23
  'InvalidAddress': {
@@ -118,6 +113,10 @@ class ManualInteractionNeeded(OperationRejected):
118
113
  pass
119
114
 
120
115
 
116
+ class RestrictedLocation(OperationRejected):
117
+ pass
118
+
119
+
121
120
  class InsufficientFunds(ExchangeError):
122
121
  pass
123
122
 
@@ -238,6 +237,7 @@ __all__ = [
238
237
  'MarginModeAlreadySet',
239
238
  'MarketClosed',
240
239
  'ManualInteractionNeeded',
240
+ 'RestrictedLocation',
241
241
  'InsufficientFunds',
242
242
  'InvalidAddress',
243
243
  'AddressPending',
@@ -4,7 +4,7 @@
4
4
 
5
5
  # -----------------------------------------------------------------------------
6
6
 
7
- __version__ = '4.4.97'
7
+ __version__ = '4.4.99'
8
8
 
9
9
  # -----------------------------------------------------------------------------
10
10
 
@@ -8,7 +8,7 @@ sys.modules['ccxt'] = ccxt_module
8
8
 
9
9
  # ----------------------------------------------------------------------------
10
10
 
11
- __version__ = '4.4.97'
11
+ __version__ = '4.4.99'
12
12
 
13
13
  # ----------------------------------------------------------------------------
14
14
 
@@ -31,6 +31,7 @@ from ccxt.base.errors import NoChange # noqa: F4
31
31
  from ccxt.base.errors import MarginModeAlreadySet # noqa: F401
32
32
  from ccxt.base.errors import MarketClosed # noqa: F401
33
33
  from ccxt.base.errors import ManualInteractionNeeded # noqa: F401
34
+ from ccxt.base.errors import RestrictedLocation # noqa: F401
34
35
  from ccxt.base.errors import InsufficientFunds # noqa: F401
35
36
  from ccxt.base.errors import InvalidAddress # noqa: F401
36
37
  from ccxt.base.errors import AddressPending # noqa: F401
kucoin/ccxt/pro/kucoin.py CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
  import ccxt.async_support
7
7
  from ccxt.async_support.base.ws.cache import ArrayCache, ArrayCacheBySymbolById, ArrayCacheByTimestamp
8
- from ccxt.base.types import Any, Balances, Int, Order, OrderBook, Str, Strings, Ticker, Tickers, Trade
8
+ from ccxt.base.types import Any, Balances, Bool, Int, Order, OrderBook, Str, Strings, Ticker, Tickers, Trade
9
9
  from ccxt.async_support.base.ws.client import Client
10
10
  from typing import List
11
11
  from ccxt.base.errors import ExchangeError
@@ -1324,7 +1324,7 @@ class kucoin(kucoinAsync):
1324
1324
  client.lastPong = self.milliseconds()
1325
1325
  # https://docs.kucoin.com/#ping
1326
1326
 
1327
- def handle_error_message(self, client: Client, message):
1327
+ def handle_error_message(self, client: Client, message) -> Bool:
1328
1328
  #
1329
1329
  # {
1330
1330
  # "id": "1",
@@ -1340,6 +1340,7 @@ class kucoin(kucoinAsync):
1340
1340
  type = 'private'
1341
1341
  self.options['urls'][type] = None
1342
1342
  self.handle_errors(None, None, client.url, None, None, data, message, None, None)
1343
+ return False
1343
1344
 
1344
1345
  def handle_message(self, client: Client, message):
1345
1346
  type = self.safe_string(message, 'type')
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: kucoin-api
3
- Version: 0.0.82
3
+ Version: 0.0.84
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,11 +1,11 @@
1
1
  kucoin/__init__.py,sha256=J1NNMLktlkCZKV82j8CFTVES3O3TCVk3so0ROi4E52o,246
2
- kucoin/ccxt/__init__.py,sha256=HwTpZQjkuufzzMCD8FS2eBfMHZ2r3KU2gW514Wg5vp4,6048
2
+ kucoin/ccxt/__init__.py,sha256=FVzJhIv0QnWmcGt5ITVGWSKw47Ciglyy63TlVE2PCis,6131
3
3
  kucoin/ccxt/kucoin.py,sha256=5JXt4spzkgIaSpIyVZ0jNXrY2R8xxHUpau76jCaOswA,232479
4
4
  kucoin/ccxt/abstract/kucoin.py,sha256=kVrVEXiigc36arfbSS8lDUMnG7uFdKgUKHIhVb0Am_8,28626
5
- kucoin/ccxt/async_support/__init__.py,sha256=gRp2x8FdQ865fvmvEZCjWAILcJcYccOSk3YqCrv4H50,4781
5
+ kucoin/ccxt/async_support/__init__.py,sha256=_etnWFLK2Vu31y-OYUM_p9ewLZO9E1jHh1UFv8KUSks,4864
6
6
  kucoin/ccxt/async_support/kucoin.py,sha256=R6FQ5LGhNiruAO831oj0UjTTmRYhL96MHivzQ8891pY,233629
7
7
  kucoin/ccxt/async_support/base/__init__.py,sha256=aVYSsFi--b4InRs9zDN_wtCpj8odosAB726JdUHavrk,67
8
- kucoin/ccxt/async_support/base/exchange.py,sha256=dfG2PcsOXmi6SGjx29G2VVyCDI9t4qVUIUkdwrGRdio,119769
8
+ kucoin/ccxt/async_support/base/exchange.py,sha256=byGHDRDag0QkyLZKSuej4Ipj_i5e-BEVEtkwVPE2ESw,119769
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
@@ -15,13 +15,13 @@ kucoin/ccxt/async_support/base/ws/future.py,sha256=hjdQ42zkfju5nar0GpTLJ4zXQBtgB
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
- kucoin/ccxt/base/decimal_to_precision.py,sha256=XQNziSPUz4UqhIvNx0aDx6-3wSSgZBTsMX57rM7WGPM,7330
19
- kucoin/ccxt/base/errors.py,sha256=MvCrL_sAM3de616T6RE0PSxiF2xV6Qqz5b1y1ghidbk,4888
20
- kucoin/ccxt/base/exchange.py,sha256=xR8H49JVMf7AvDdfCAc8n-UPaVO_XU6FMsHmkEAi0ps,333932
18
+ kucoin/ccxt/base/decimal_to_precision.py,sha256=3XI30u9YudHbTA438397u5rkdlXa3atxwZEfUus3C4k,6803
19
+ kucoin/ccxt/base/errors.py,sha256=LdTTHPmxpeFHJze93mGl7I3maqTgN0y_1mJ6coWkXmA,4734
20
+ kucoin/ccxt/base/exchange.py,sha256=gQLGpgb8TTdsXUl9_GqbubUcEtJrzCdsrXeJPZS-IoA,333932
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=DKs4nYhDT5u0Rk_6S9yV8QKjfzAR_DHlSvqi2BLupk8,4095
24
- kucoin/ccxt/pro/kucoin.py,sha256=598XsFeIFOOAOlY2fuEenBT-pPFjoOKiqPP8lP7dzD4,60794
23
+ kucoin/ccxt/pro/__init__.py,sha256=7SM0_T761rShT3mSeIR3zIFbWkyf-fgM7BJR7K2eRGg,4178
24
+ kucoin/ccxt/pro/kucoin.py,sha256=l1jx8Fen2pKoDUl04QB7p_Ju-7ohC3BpuWGvvtXwiW8,60829
25
25
  kucoin/ccxt/static_dependencies/README.md,sha256=3TCvhhn09_Cqf9BDDpao1V7EfKHDpQ6k9oWRsLFixpU,18
26
26
  kucoin/ccxt/static_dependencies/__init__.py,sha256=tzFje8cloqmiIE6kola3EaYC0SnD1izWnri69hzHsSw,168
27
27
  kucoin/ccxt/static_dependencies/ecdsa/__init__.py,sha256=Xaj0G79BLtBt2YZcOOMV8qOlQZ7fIJznNiHhiEEZfQA,594
@@ -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.82.dist-info/METADATA,sha256=8wVaOPUW4vxJ_S894kYQLMVj6MjsCFPP0pumv4o5MDM,18571
285
- kucoin_api-0.0.82.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
286
- kucoin_api-0.0.82.dist-info/RECORD,,
284
+ kucoin_api-0.0.84.dist-info/METADATA,sha256=BOeUHXX84cWom8eNhusE5xaOS0kduXequNRkCncnYTQ,18571
285
+ kucoin_api-0.0.84.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
286
+ kucoin_api-0.0.84.dist-info/RECORD,,