crypto-com-sdk 0.0.76__py3-none-any.whl → 0.0.78__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.
- {crypto_com_sdk-0.0.76.dist-info → crypto_com_sdk-0.0.78.dist-info}/METADATA +1 -1
- {crypto_com_sdk-0.0.76.dist-info → crypto_com_sdk-0.0.78.dist-info}/RECORD +12 -12
- cryptocom/ccxt/__init__.py +2 -1
- cryptocom/ccxt/async_support/__init__.py +2 -1
- cryptocom/ccxt/async_support/base/exchange.py +2 -2
- cryptocom/ccxt/async_support/cryptocom.py +1 -0
- cryptocom/ccxt/base/decimal_to_precision.py +7 -9
- cryptocom/ccxt/base/errors.py +6 -0
- cryptocom/ccxt/base/exchange.py +1 -1
- cryptocom/ccxt/cryptocom.py +1 -0
- cryptocom/ccxt/pro/__init__.py +2 -1
- {crypto_com_sdk-0.0.76.dist-info → crypto_com_sdk-0.0.78.dist-info}/WHEEL +0 -0
@@ -1,11 +1,11 @@
|
|
1
1
|
cryptocom/__init__.py,sha256=Ei5wz00g_3ERgN2Gsu1ZcccyL4tByDvfxR8qKkPxAgc,282
|
2
|
-
cryptocom/ccxt/__init__.py,sha256=
|
3
|
-
cryptocom/ccxt/cryptocom.py,sha256=
|
2
|
+
cryptocom/ccxt/__init__.py,sha256=3eBc3vBgfLytJyQAaTPaER-3I5A-FWTiqKc9x5atWuc,6137
|
3
|
+
cryptocom/ccxt/cryptocom.py,sha256=ShI0f39kp76tNvx7v52kIsEeQjS18JS_mbsGXpTxoMg,152409
|
4
4
|
cryptocom/ccxt/abstract/cryptocom.py,sha256=EiTT45sV8yZQ6bJc41OB5S05o0VfTsASiwgElIck78A,21243
|
5
|
-
cryptocom/ccxt/async_support/__init__.py,sha256=
|
6
|
-
cryptocom/ccxt/async_support/cryptocom.py,sha256=
|
5
|
+
cryptocom/ccxt/async_support/__init__.py,sha256=C686WmMhuF7-z8y_KSKU3aRuVTMH-HxYavjcn9qzfw8,4870
|
6
|
+
cryptocom/ccxt/async_support/cryptocom.py,sha256=_Ex0w6Pq7O3bTs-27Rku0qk69z3_kcK9vxYHjCn7NWE,153065
|
7
7
|
cryptocom/ccxt/async_support/base/__init__.py,sha256=aVYSsFi--b4InRs9zDN_wtCpj8odosAB726JdUHavrk,67
|
8
|
-
cryptocom/ccxt/async_support/base/exchange.py,sha256=
|
8
|
+
cryptocom/ccxt/async_support/base/exchange.py,sha256=h7rGS7bj1QxT69nooadJgVM1UToAauxTskymPAMf7wo,119769
|
9
9
|
cryptocom/ccxt/async_support/base/throttler.py,sha256=tvDVcdRUVYi8fZRlEcnqtgzcgB_KMUMRs5Pu8tuU-tU,1847
|
10
10
|
cryptocom/ccxt/async_support/base/ws/__init__.py,sha256=uockzpLuwntKGZbs5EOWFe-Zg-k6Cj7GhNJLc_RX0so,1791
|
11
11
|
cryptocom/ccxt/async_support/base/ws/cache.py,sha256=xf2VOtfUwloxSlIQ39M1RGZHWQzyS9IGhB5NX6cDcAc,8370
|
@@ -15,12 +15,12 @@ cryptocom/ccxt/async_support/base/ws/future.py,sha256=hjdQ42zkfju5nar0GpTLJ4zXQB
|
|
15
15
|
cryptocom/ccxt/async_support/base/ws/order_book.py,sha256=uBUaIHhzMRykpmo4BCsdJ-t_HozS6VxhEs8x-Kbj-NI,2894
|
16
16
|
cryptocom/ccxt/async_support/base/ws/order_book_side.py,sha256=GhnGUt78pJ-AYL_Dq9produGjmBJLCI5FHIRdMz1O-g,6551
|
17
17
|
cryptocom/ccxt/base/__init__.py,sha256=eTx1OE3HJjspFUQjGm6LBhaQiMKJnXjkdP-JUXknyQ0,1320
|
18
|
-
cryptocom/ccxt/base/decimal_to_precision.py,sha256=
|
19
|
-
cryptocom/ccxt/base/errors.py,sha256=
|
20
|
-
cryptocom/ccxt/base/exchange.py,sha256=
|
18
|
+
cryptocom/ccxt/base/decimal_to_precision.py,sha256=3XI30u9YudHbTA438397u5rkdlXa3atxwZEfUus3C4k,6803
|
19
|
+
cryptocom/ccxt/base/errors.py,sha256=OGhWNvNtRlJOzFx-n1x3ZjTnaPpfWH0Vc0xACS-MeDw,5012
|
20
|
+
cryptocom/ccxt/base/exchange.py,sha256=5KgAUmwjrHelR87gaxFRZzaju7B3csvnlUzkuw6mpJE,333932
|
21
21
|
cryptocom/ccxt/base/precise.py,sha256=koce64Yrp6vFbGijJtUt-QQ6XhJgeGTCksZ871FPp_A,8886
|
22
22
|
cryptocom/ccxt/base/types.py,sha256=vMQfFDVntED4YHrRJt0Q98YaM7OtGhK-DkbkqXFTYHc,11485
|
23
|
-
cryptocom/ccxt/pro/__init__.py,sha256=
|
23
|
+
cryptocom/ccxt/pro/__init__.py,sha256=EJdP-ojlU1di6GDw8y8ir-C3GUBblCLphcUdAH9GRe8,4184
|
24
24
|
cryptocom/ccxt/pro/cryptocom.py,sha256=ky8ltFg54HLxsA8vlNnahVCSnWdmn2pB8E3WjNxYUuM,61627
|
25
25
|
cryptocom/ccxt/static_dependencies/README.md,sha256=3TCvhhn09_Cqf9BDDpao1V7EfKHDpQ6k9oWRsLFixpU,18
|
26
26
|
cryptocom/ccxt/static_dependencies/__init__.py,sha256=tzFje8cloqmiIE6kola3EaYC0SnD1izWnri69hzHsSw,168
|
@@ -281,6 +281,6 @@ cryptocom/ccxt/static_dependencies/toolz/curried/exceptions.py,sha256=gKFOHDIayA
|
|
281
281
|
cryptocom/ccxt/static_dependencies/toolz/curried/operator.py,sha256=ML92mknkAwzBl2NCm-4werSUmJEtSHNY9NSzhseNM9s,525
|
282
282
|
cryptocom/ccxt/static_dependencies/typing_inspect/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
283
283
|
cryptocom/ccxt/static_dependencies/typing_inspect/typing_inspect.py,sha256=5gIWomLPfuDpgd3gX1GlnX0MuXM3VorR4j2W2qXORiQ,28269
|
284
|
-
crypto_com_sdk-0.0.
|
285
|
-
crypto_com_sdk-0.0.
|
286
|
-
crypto_com_sdk-0.0.
|
284
|
+
crypto_com_sdk-0.0.78.dist-info/METADATA,sha256=wvQwU55iYtDd2GNrlU8hqO_3LvARRFgseHBzWZgkrFE,15363
|
285
|
+
crypto_com_sdk-0.0.78.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
286
|
+
crypto_com_sdk-0.0.78.dist-info/RECORD,,
|
cryptocom/ccxt/__init__.py
CHANGED
@@ -26,7 +26,7 @@ sys.modules['ccxt'] = ccxt_module
|
|
26
26
|
|
27
27
|
# ----------------------------------------------------------------------------
|
28
28
|
|
29
|
-
__version__ = '4.4.
|
29
|
+
__version__ = '4.4.98'
|
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.
|
11
|
+
__version__ = '4.4.98'
|
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.
|
5
|
+
__version__ = '4.4.98'
|
6
6
|
|
7
7
|
# -----------------------------------------------------------------------------
|
8
8
|
|
@@ -176,7 +176,7 @@ class Exchange(BaseExchange):
|
|
176
176
|
if (socksProxy not in self.socks_proxy_sessions):
|
177
177
|
# Create our SSL context object with our CA cert file
|
178
178
|
self.open() # ensure `asyncio_loop` is set
|
179
|
-
|
179
|
+
proxy_session = self.get_socks_proxy_session(socksProxy)
|
180
180
|
# add aiohttp_proxy for python as exclusion
|
181
181
|
elif self.aiohttp_proxy:
|
182
182
|
final_proxy = self.aiohttp_proxy
|
@@ -481,6 +481,7 @@ class cryptocom(Exchange, ImplicitAPI):
|
|
481
481
|
'exceptions': {
|
482
482
|
'exact': {
|
483
483
|
'219': InvalidOrder,
|
484
|
+
'306': InsufficientFunds, # {"id" : 1753xxx, "method" : "private/amend-order", "code" : 306, "message" : "INSUFFICIENT_AVAILABLE_BALANCE", "result" : {"client_oid" : "1753xxx", "order_id" : "6530xxx"}}
|
484
485
|
'314': InvalidOrder, # {"id" : 1700xxx, "method" : "private/create-order", "code" : 314, "message" : "EXCEEDS_MAX_ORDER_SIZE", "result" : {"client_oid" : "1700xxx", "order_id" : "6530xxx"}}
|
485
486
|
'325': InvalidOrder, # {"id" : 1741xxx, "method" : "private/create-order", "code" : 325, "message" : "EXCEED_DAILY_VOL_LIMIT", "result" : {"client_oid" : "1741xxx", "order_id" : "6530xxx"}}
|
486
487
|
'415': InvalidOrder, # {"id" : 1741xxx, "method" : "private/create-order", "code" : 415, "message" : "BELOW_MIN_ORDER_SIZE", "result" : {"client_oid" : "1741xxx", "order_id" : "6530xxx"}}
|
@@ -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,
|
37
|
-
assert
|
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(
|
40
|
-
|
41
|
-
assert isinstance(
|
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
|
44
|
+
assert precision > 0, 'negative or zero precision can not be used with TICK_SIZE precisionMode'
|
45
45
|
else:
|
46
|
-
assert isinstance(
|
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:
|
cryptocom/ccxt/base/errors.py
CHANGED
@@ -23,6 +23,7 @@ error_hierarchy = {
|
|
23
23
|
},
|
24
24
|
'MarketClosed': {},
|
25
25
|
'ManualInteractionNeeded': {},
|
26
|
+
'RestrictedLocation': {},
|
26
27
|
},
|
27
28
|
'InsufficientFunds': {},
|
28
29
|
'InvalidAddress': {
|
@@ -118,6 +119,10 @@ class ManualInteractionNeeded(OperationRejected):
|
|
118
119
|
pass
|
119
120
|
|
120
121
|
|
122
|
+
class RestrictedLocation(OperationRejected):
|
123
|
+
pass
|
124
|
+
|
125
|
+
|
121
126
|
class InsufficientFunds(ExchangeError):
|
122
127
|
pass
|
123
128
|
|
@@ -238,6 +243,7 @@ __all__ = [
|
|
238
243
|
'MarginModeAlreadySet',
|
239
244
|
'MarketClosed',
|
240
245
|
'ManualInteractionNeeded',
|
246
|
+
'RestrictedLocation',
|
241
247
|
'InsufficientFunds',
|
242
248
|
'InvalidAddress',
|
243
249
|
'AddressPending',
|
cryptocom/ccxt/base/exchange.py
CHANGED
cryptocom/ccxt/cryptocom.py
CHANGED
@@ -481,6 +481,7 @@ class cryptocom(Exchange, ImplicitAPI):
|
|
481
481
|
'exceptions': {
|
482
482
|
'exact': {
|
483
483
|
'219': InvalidOrder,
|
484
|
+
'306': InsufficientFunds, # {"id" : 1753xxx, "method" : "private/amend-order", "code" : 306, "message" : "INSUFFICIENT_AVAILABLE_BALANCE", "result" : {"client_oid" : "1753xxx", "order_id" : "6530xxx"}}
|
484
485
|
'314': InvalidOrder, # {"id" : 1700xxx, "method" : "private/create-order", "code" : 314, "message" : "EXCEEDS_MAX_ORDER_SIZE", "result" : {"client_oid" : "1700xxx", "order_id" : "6530xxx"}}
|
485
486
|
'325': InvalidOrder, # {"id" : 1741xxx, "method" : "private/create-order", "code" : 325, "message" : "EXCEED_DAILY_VOL_LIMIT", "result" : {"client_oid" : "1741xxx", "order_id" : "6530xxx"}}
|
486
487
|
'415': InvalidOrder, # {"id" : 1741xxx, "method" : "private/create-order", "code" : 415, "message" : "BELOW_MIN_ORDER_SIZE", "result" : {"client_oid" : "1741xxx", "order_id" : "6530xxx"}}
|
cryptocom/ccxt/pro/__init__.py
CHANGED
@@ -8,7 +8,7 @@ sys.modules['ccxt'] = ccxt_module
|
|
8
8
|
|
9
9
|
# ----------------------------------------------------------------------------
|
10
10
|
|
11
|
-
__version__ = '4.4.
|
11
|
+
__version__ = '4.4.98'
|
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
|
File without changes
|