gate-io-api 0.0.78__py3-none-any.whl → 0.0.80__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.

Potentially problematic release.


This version of gate-io-api might be problematic. Click here for more details.

gate/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
 
@@ -685,8 +685,7 @@ class gate(Exchange, ImplicitAPI):
685
685
  'BSC': 'BSC',
686
686
  'BEP20': 'BSC',
687
687
  'SOL': 'SOL',
688
- 'POLYGON': 'POL',
689
- 'MATIC': 'POL',
688
+ 'MATIC': 'MATIC',
690
689
  'OPTIMISM': 'OPETH',
691
690
  'ADA': 'ADA', # CARDANO
692
691
  'AVAXC': 'AVAX_C',
@@ -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:
gate/ccxt/base/errors.py CHANGED
@@ -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
 
gate/ccxt/gate.py CHANGED
@@ -684,8 +684,7 @@ class gate(Exchange, ImplicitAPI):
684
684
  'BSC': 'BSC',
685
685
  'BEP20': 'BSC',
686
686
  'SOL': 'SOL',
687
- 'POLYGON': 'POL',
688
- 'MATIC': 'POL',
687
+ 'MATIC': 'MATIC',
689
688
  'OPTIMISM': 'OPETH',
690
689
  'ADA': 'ADA', # CARDANO
691
690
  'AVAXC': 'AVAX_C',
gate/ccxt/pro/__init__.py CHANGED
@@ -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
gate/ccxt/pro/gate.py CHANGED
@@ -6,7 +6,7 @@
6
6
  import ccxt.async_support
7
7
  from ccxt.async_support.base.ws.cache import ArrayCache, ArrayCacheBySymbolById, ArrayCacheBySymbolBySide, ArrayCacheByTimestamp
8
8
  import hashlib
9
- from ccxt.base.types import Any, Balances, Int, Liquidation, Market, MarketType, Num, Order, OrderBook, OrderRequest, OrderSide, OrderType, Position, Str, Strings, Ticker, Tickers, Trade
9
+ from ccxt.base.types import Any, Balances, Bool, Int, Liquidation, Market, MarketType, Num, Order, OrderBook, OrderRequest, OrderSide, OrderType, Position, Str, Strings, Ticker, Tickers, Trade
10
10
  from ccxt.async_support.base.ws.client import Client
11
11
  from typing import List
12
12
  from ccxt.base.errors import ExchangeError
@@ -1335,7 +1335,7 @@ class gate(gateAsync):
1335
1335
  """
1336
1336
  return self.watch_my_liquidations_for_symbols([symbol], since, limit, params)
1337
1337
 
1338
- async def watch_my_liquidations_for_symbols(self, symbols: List[str] = None, since: Int = None, limit: Int = None, params={}) -> List[Liquidation]:
1338
+ async def watch_my_liquidations_for_symbols(self, symbols: List[str], since: Int = None, limit: Int = None, params={}) -> List[Liquidation]:
1339
1339
  """
1340
1340
  watch the private liquidations of a trading pair
1341
1341
 
@@ -1489,7 +1489,7 @@ class gate(gateAsync):
1489
1489
  'datetime': self.iso8601(timestamp),
1490
1490
  })
1491
1491
 
1492
- def handle_error_message(self, client: Client, message):
1492
+ def handle_error_message(self, client: Client, message) -> Bool:
1493
1493
  #
1494
1494
  # {
1495
1495
  # "time": 1647274664,
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: gate-io-api
3
- Version: 0.0.78
3
+ Version: 0.0.80
4
4
  Summary: gate crypto exchange api client
5
5
  Project-URL: Homepage, https://github.com/ccxt/ccxt
6
6
  Project-URL: Issues, https://github.com/ccxt/ccxt
@@ -528,7 +528,7 @@ You can also construct custom requests to available "implicit" endpoints
528
528
  - `load_positions_snapshot(self, client, messageHash, type)`
529
529
  - `watch_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={})`
530
530
  - `watch_my_liquidations(self, symbol: str, since: Int = None, limit: Int = None, params={})`
531
- - `watch_my_liquidations_for_symbols(self, symbols: List[str] = None, since: Int = None, limit: Int = None, params={})`
531
+ - `watch_my_liquidations_for_symbols(self, symbols: List[str], since: Int = None, limit: Int = None, params={})`
532
532
  - `clean_cache(self, subscription: dict)`
533
533
  - `get_url_by_market(self, market)`
534
534
  - `get_type_by_market(self, market: Market)`
@@ -1,11 +1,11 @@
1
1
  gate/__init__.py,sha256=rmRavmagjlyk7Z5zGWWJiY8tfYIPsk04hRzC4SYJOzA,222
2
- gate/ccxt/__init__.py,sha256=IOmO23F2F4YILFU4aTHc4w-JYKlwXqsixqHsJmK8WTM,6044
3
- gate/ccxt/gate.py,sha256=9mswLbaMIqbrHeDtY8S3aa1kYrW9oBg3FNeSC21PZDQ,352192
2
+ gate/ccxt/__init__.py,sha256=Z8ugo3scm8QTNP4SzJuIYWUS9dcdBFocV_CDQVNI64c,6127
3
+ gate/ccxt/gate.py,sha256=x35V5D99Gug9aPjwz65jy5aZm84ngUOC2m_CpNj4X9A,352156
4
4
  gate/ccxt/abstract/gate.py,sha256=MrRMycFEpZKJ6yC7qi0p_qcwZtU9WJi5bBbVllskGoA,45044
5
- gate/ccxt/async_support/__init__.py,sha256=jsuB12oyYKSdyFFnLOTkUOb5DNdsdBcGMFQHc9aizXU,4777
6
- gate/ccxt/async_support/gate.py,sha256=Aym1SJBifOHtKD8X4yq82UHStvP-TFyRmybn-zv0L9U,354151
5
+ gate/ccxt/async_support/__init__.py,sha256=BZxiDxKgRXHJcV1Wfw9OMyh43kFNledGO_Y-kAaDaqM,4860
6
+ gate/ccxt/async_support/gate.py,sha256=Qa1pe2RAh15KXiziXocjPy5RlzTrmwdNu8varlI_o2g,354115
7
7
  gate/ccxt/async_support/base/__init__.py,sha256=aVYSsFi--b4InRs9zDN_wtCpj8odosAB726JdUHavrk,67
8
- gate/ccxt/async_support/base/exchange.py,sha256=dfG2PcsOXmi6SGjx29G2VVyCDI9t4qVUIUkdwrGRdio,119769
8
+ gate/ccxt/async_support/base/exchange.py,sha256=byGHDRDag0QkyLZKSuej4Ipj_i5e-BEVEtkwVPE2ESw,119769
9
9
  gate/ccxt/async_support/base/throttler.py,sha256=tvDVcdRUVYi8fZRlEcnqtgzcgB_KMUMRs5Pu8tuU-tU,1847
10
10
  gate/ccxt/async_support/base/ws/__init__.py,sha256=uockzpLuwntKGZbs5EOWFe-Zg-k6Cj7GhNJLc_RX0so,1791
11
11
  gate/ccxt/async_support/base/ws/cache.py,sha256=xf2VOtfUwloxSlIQ39M1RGZHWQzyS9IGhB5NX6cDcAc,8370
@@ -15,13 +15,13 @@ gate/ccxt/async_support/base/ws/future.py,sha256=hjdQ42zkfju5nar0GpTLJ4zXQBtgBU8
15
15
  gate/ccxt/async_support/base/ws/order_book.py,sha256=uBUaIHhzMRykpmo4BCsdJ-t_HozS6VxhEs8x-Kbj-NI,2894
16
16
  gate/ccxt/async_support/base/ws/order_book_side.py,sha256=GhnGUt78pJ-AYL_Dq9produGjmBJLCI5FHIRdMz1O-g,6551
17
17
  gate/ccxt/base/__init__.py,sha256=eTx1OE3HJjspFUQjGm6LBhaQiMKJnXjkdP-JUXknyQ0,1320
18
- gate/ccxt/base/decimal_to_precision.py,sha256=XQNziSPUz4UqhIvNx0aDx6-3wSSgZBTsMX57rM7WGPM,7330
19
- gate/ccxt/base/errors.py,sha256=MvCrL_sAM3de616T6RE0PSxiF2xV6Qqz5b1y1ghidbk,4888
20
- gate/ccxt/base/exchange.py,sha256=xR8H49JVMf7AvDdfCAc8n-UPaVO_XU6FMsHmkEAi0ps,333932
18
+ gate/ccxt/base/decimal_to_precision.py,sha256=3XI30u9YudHbTA438397u5rkdlXa3atxwZEfUus3C4k,6803
19
+ gate/ccxt/base/errors.py,sha256=LdTTHPmxpeFHJze93mGl7I3maqTgN0y_1mJ6coWkXmA,4734
20
+ gate/ccxt/base/exchange.py,sha256=gQLGpgb8TTdsXUl9_GqbubUcEtJrzCdsrXeJPZS-IoA,333932
21
21
  gate/ccxt/base/precise.py,sha256=koce64Yrp6vFbGijJtUt-QQ6XhJgeGTCksZ871FPp_A,8886
22
22
  gate/ccxt/base/types.py,sha256=vMQfFDVntED4YHrRJt0Q98YaM7OtGhK-DkbkqXFTYHc,11485
23
- gate/ccxt/pro/__init__.py,sha256=7wNAPIra4KWOwxml1r7XXutU_W0CkkVNJuAK7OOiHIE,4091
24
- gate/ccxt/pro/gate.py,sha256=TImMphR9V8h9xqDJ541s3zb4NOppfLDc-XoBkntT1nA,89399
23
+ gate/ccxt/pro/__init__.py,sha256=jlNlAa0kNqvTfnS03TYaRtx46s1QSYgQwD7z6JV_bzQ,4174
24
+ gate/ccxt/pro/gate.py,sha256=vbpPBXKBrPjtA-mQF-d6Rh0jfSqZBG17tMo42v4CWTM,89406
25
25
  gate/ccxt/static_dependencies/README.md,sha256=3TCvhhn09_Cqf9BDDpao1V7EfKHDpQ6k9oWRsLFixpU,18
26
26
  gate/ccxt/static_dependencies/__init__.py,sha256=tzFje8cloqmiIE6kola3EaYC0SnD1izWnri69hzHsSw,168
27
27
  gate/ccxt/static_dependencies/ecdsa/__init__.py,sha256=Xaj0G79BLtBt2YZcOOMV8qOlQZ7fIJznNiHhiEEZfQA,594
@@ -281,6 +281,6 @@ gate/ccxt/static_dependencies/toolz/curried/exceptions.py,sha256=gKFOHDIayAWnX2u
281
281
  gate/ccxt/static_dependencies/toolz/curried/operator.py,sha256=ML92mknkAwzBl2NCm-4werSUmJEtSHNY9NSzhseNM9s,525
282
282
  gate/ccxt/static_dependencies/typing_inspect/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
283
283
  gate/ccxt/static_dependencies/typing_inspect/typing_inspect.py,sha256=5gIWomLPfuDpgd3gX1GlnX0MuXM3VorR4j2W2qXORiQ,28269
284
- gate_io_api-0.0.78.dist-info/METADATA,sha256=_3TqUCZM-8O_9Q36ZWAmJFrSDrKeY5QZPT93vtfsYXg,26789
285
- gate_io_api-0.0.78.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
286
- gate_io_api-0.0.78.dist-info/RECORD,,
284
+ gate_io_api-0.0.80.dist-info/METADATA,sha256=1SElF8lvlKaHN4ksAB5avPjPbWaMrPLgjwfTpCXW-gY,26782
285
+ gate_io_api-0.0.80.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
286
+ gate_io_api-0.0.80.dist-info/RECORD,,