gate-io-api 0.0.65__py3-none-any.whl → 0.0.66__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.86'
29
+ __version__ = '4.4.87'
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.86'
11
+ __version__ = '4.4.87'
12
12
 
13
13
  # -----------------------------------------------------------------------------
14
14
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  # -----------------------------------------------------------------------------
4
4
 
5
- __version__ = '4.4.86'
5
+ __version__ = '4.4.87'
6
6
 
7
7
  # -----------------------------------------------------------------------------
8
8
 
@@ -903,15 +903,15 @@ class Exchange(BaseExchange):
903
903
  if self.enableRateLimit:
904
904
  cost = self.calculate_rate_limiter_cost(api, method, path, params, config)
905
905
  await self.throttle(cost)
906
+ retries = None
907
+ retries, params = self.handle_option_and_params(params, path, 'maxRetriesOnFailure', 0)
908
+ retryDelay = None
909
+ retryDelay, params = self.handle_option_and_params(params, path, 'maxRetriesOnFailureDelay', 0)
906
910
  self.lastRestRequestTimestamp = self.milliseconds()
907
911
  request = self.sign(path, api, method, params, headers, body)
908
912
  self.last_request_headers = request['headers']
909
913
  self.last_request_body = request['body']
910
914
  self.last_request_url = request['url']
911
- retries = None
912
- retries, params = self.handle_option_and_params(params, path, 'maxRetriesOnFailure', 0)
913
- retryDelay = None
914
- retryDelay, params = self.handle_option_and_params(params, path, 'maxRetriesOnFailureDelay', 0)
915
915
  for i in range(0, retries + 1):
916
916
  try:
917
917
  return await self.fetch(request['url'], request['method'], request['headers'], request['body'])
@@ -126,7 +126,7 @@ class gate(Exchange, ImplicitAPI):
126
126
  'fetchCurrencies': True,
127
127
  'fetchDepositAddress': True,
128
128
  'fetchDepositAddresses': False,
129
- 'fetchDepositAddressesByNetwork': False,
129
+ 'fetchDepositAddressesByNetwork': True,
130
130
  'fetchDeposits': True,
131
131
  'fetchDepositWithdrawFee': 'emulated',
132
132
  'fetchDepositWithdrawFees': True,
@@ -2159,9 +2159,7 @@ class gate(Exchange, ImplicitAPI):
2159
2159
  chains = self.safe_value(response, 'multichain_addresses', [])
2160
2160
  currencyId = self.safe_string(response, 'currency')
2161
2161
  currency = self.safe_currency(currencyId, currency)
2162
- parsed = self.parse_deposit_addresses(chains, [currency['code']], False, {
2163
- 'currency': currency['id'],
2164
- })
2162
+ parsed = self.parse_deposit_addresses(chains, None, False)
2165
2163
  return self.index_by(parsed, 'network')
2166
2164
 
2167
2165
  async def fetch_deposit_address(self, code: str, params={}) -> DepositAddress:
@@ -2179,8 +2177,8 @@ class gate(Exchange, ImplicitAPI):
2179
2177
  networkCode = None
2180
2178
  networkCode, params = self.handle_network_code_and_params(params)
2181
2179
  chainsIndexedById = await self.fetch_deposit_addresses_by_network(code, params)
2182
- selectedNetworkId = self.select_network_code_from_unified_networks(code, networkCode, chainsIndexedById)
2183
- return chainsIndexedById[selectedNetworkId]
2180
+ selectedNetworkIdOrCode = self.select_network_code_from_unified_networks(code, networkCode, chainsIndexedById)
2181
+ return chainsIndexedById[selectedNetworkIdOrCode]
2184
2182
 
2185
2183
  def parse_deposit_address(self, depositAddress, currency=None):
2186
2184
  #
@@ -4,7 +4,7 @@
4
4
 
5
5
  # -----------------------------------------------------------------------------
6
6
 
7
- __version__ = '4.4.86'
7
+ __version__ = '4.4.87'
8
8
 
9
9
  # -----------------------------------------------------------------------------
10
10
 
@@ -311,6 +311,7 @@ class Exchange(object):
311
311
  base_currencies = None
312
312
  quote_currencies = None
313
313
  currencies = None
314
+
314
315
  options = None # Python does not allow to define properties in run-time with setattr
315
316
  isSandboxModeEnabled = False
316
317
  accounts = None
@@ -1533,7 +1534,9 @@ class Exchange(object):
1533
1534
  currencies = None
1534
1535
  if self.has['fetchCurrencies'] is True:
1535
1536
  currencies = self.fetch_currencies()
1537
+ self.options['cachedCurrencies'] = currencies
1536
1538
  markets = self.fetch_markets(params)
1539
+ del self.options['cachedCurrencies']
1537
1540
  return self.set_markets(markets, currencies)
1538
1541
 
1539
1542
  def fetch_markets(self, params={}):
@@ -4166,11 +4169,11 @@ class Exchange(object):
4166
4169
  raise NotSupported(self.id + ' - ' + networkCode + ' network did not return any result for ' + currencyCode)
4167
4170
  else:
4168
4171
  # if networkCode was provided by user, we should check it after response, referenced exchange doesn't support network-code during request
4169
- networkId = networkCode if isIndexedByUnifiedNetworkCode else self.network_code_to_id(networkCode, currencyCode)
4170
- if networkId in indexedNetworkEntries:
4171
- chosenNetworkId = networkId
4172
+ networkIdOrCode = networkCode if isIndexedByUnifiedNetworkCode else self.network_code_to_id(networkCode, currencyCode)
4173
+ if networkIdOrCode in indexedNetworkEntries:
4174
+ chosenNetworkId = networkIdOrCode
4172
4175
  else:
4173
- raise NotSupported(self.id + ' - ' + networkId + ' network was not found for ' + currencyCode + ', use one of ' + ', '.join(availableNetworkIds))
4176
+ raise NotSupported(self.id + ' - ' + networkIdOrCode + ' network was not found for ' + currencyCode + ', use one of ' + ', '.join(availableNetworkIds))
4174
4177
  else:
4175
4178
  if responseNetworksLength == 0:
4176
4179
  raise NotSupported(self.id + ' - no networks were returned for ' + currencyCode)
@@ -4458,15 +4461,15 @@ class Exchange(object):
4458
4461
  if self.enableRateLimit:
4459
4462
  cost = self.calculate_rate_limiter_cost(api, method, path, params, config)
4460
4463
  self.throttle(cost)
4464
+ retries = None
4465
+ retries, params = self.handle_option_and_params(params, path, 'maxRetriesOnFailure', 0)
4466
+ retryDelay = None
4467
+ retryDelay, params = self.handle_option_and_params(params, path, 'maxRetriesOnFailureDelay', 0)
4461
4468
  self.lastRestRequestTimestamp = self.milliseconds()
4462
4469
  request = self.sign(path, api, method, params, headers, body)
4463
4470
  self.last_request_headers = request['headers']
4464
4471
  self.last_request_body = request['body']
4465
4472
  self.last_request_url = request['url']
4466
- retries = None
4467
- retries, params = self.handle_option_and_params(params, path, 'maxRetriesOnFailure', 0)
4468
- retryDelay = None
4469
- retryDelay, params = self.handle_option_and_params(params, path, 'maxRetriesOnFailureDelay', 0)
4470
4473
  for i in range(0, retries + 1):
4471
4474
  try:
4472
4475
  return self.fetch(request['url'], request['method'], request['headers'], request['body'])
gate/ccxt/gate.py CHANGED
@@ -125,7 +125,7 @@ class gate(Exchange, ImplicitAPI):
125
125
  'fetchCurrencies': True,
126
126
  'fetchDepositAddress': True,
127
127
  'fetchDepositAddresses': False,
128
- 'fetchDepositAddressesByNetwork': False,
128
+ 'fetchDepositAddressesByNetwork': True,
129
129
  'fetchDeposits': True,
130
130
  'fetchDepositWithdrawFee': 'emulated',
131
131
  'fetchDepositWithdrawFees': True,
@@ -2158,9 +2158,7 @@ class gate(Exchange, ImplicitAPI):
2158
2158
  chains = self.safe_value(response, 'multichain_addresses', [])
2159
2159
  currencyId = self.safe_string(response, 'currency')
2160
2160
  currency = self.safe_currency(currencyId, currency)
2161
- parsed = self.parse_deposit_addresses(chains, [currency['code']], False, {
2162
- 'currency': currency['id'],
2163
- })
2161
+ parsed = self.parse_deposit_addresses(chains, None, False)
2164
2162
  return self.index_by(parsed, 'network')
2165
2163
 
2166
2164
  def fetch_deposit_address(self, code: str, params={}) -> DepositAddress:
@@ -2178,8 +2176,8 @@ class gate(Exchange, ImplicitAPI):
2178
2176
  networkCode = None
2179
2177
  networkCode, params = self.handle_network_code_and_params(params)
2180
2178
  chainsIndexedById = self.fetch_deposit_addresses_by_network(code, params)
2181
- selectedNetworkId = self.select_network_code_from_unified_networks(code, networkCode, chainsIndexedById)
2182
- return chainsIndexedById[selectedNetworkId]
2179
+ selectedNetworkIdOrCode = self.select_network_code_from_unified_networks(code, networkCode, chainsIndexedById)
2180
+ return chainsIndexedById[selectedNetworkIdOrCode]
2183
2181
 
2184
2182
  def parse_deposit_address(self, depositAddress, currency=None):
2185
2183
  #
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.86'
11
+ __version__ = '4.4.87'
12
12
 
13
13
  # ----------------------------------------------------------------------------
14
14
 
@@ -127,6 +127,36 @@ from ccxt.base.errors import error_hierarchy # noqa: F4
127
127
 
128
128
 
129
129
 
130
+
131
+
132
+
133
+
134
+
135
+
136
+
137
+
138
+
139
+
140
+
141
+
142
+
143
+
144
+
145
+
146
+
147
+
148
+
149
+
150
+
151
+
152
+
153
+
154
+
155
+
156
+
157
+
158
+
159
+
130
160
 
131
161
 
132
162
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: gate-io-api
3
- Version: 0.0.65
3
+ Version: 0.0.66
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
@@ -1,11 +1,11 @@
1
1
  gate/__init__.py,sha256=rmRavmagjlyk7Z5zGWWJiY8tfYIPsk04hRzC4SYJOzA,222
2
- gate/ccxt/__init__.py,sha256=YjlwBJp6oTvz-t6cofASFpqmMT_SY_JZDiPuXzkS_EI,6044
3
- gate/ccxt/gate.py,sha256=j4wcnyZjd7LrrBVAPrPnEuhBaaKpThuK_5gduXY1ybM,351663
2
+ gate/ccxt/__init__.py,sha256=vBknI4N6glfARnP6qmulroxm7IW2WD4xrFhflbMVYBQ,6044
3
+ gate/ccxt/gate.py,sha256=UrR0TXXPUnqiq75-rWfdAQfkzPpIIsfRNInY818Qmsg,351607
4
4
  gate/ccxt/abstract/gate.py,sha256=MrRMycFEpZKJ6yC7qi0p_qcwZtU9WJi5bBbVllskGoA,45044
5
- gate/ccxt/async_support/__init__.py,sha256=Mll5n_m2v-b1hh4RNFAqYjj1dXAn-u5uS9GvtZAN6wY,4777
6
- gate/ccxt/async_support/gate.py,sha256=YWd3Lf_XUXu4kHHd-aF1Y2336_5LjhNv5ufcBAxpBP0,353622
5
+ gate/ccxt/async_support/__init__.py,sha256=tLm3WE4MlKA9TnLOcdV37XOWPgoFK5f_q2_OxxAkysY,4777
6
+ gate/ccxt/async_support/gate.py,sha256=dJMsSGh5w3Ja8pAmkyK2--8F3iZ6piGPFhvr8Q26iT4,353566
7
7
  gate/ccxt/async_support/base/__init__.py,sha256=aVYSsFi--b4InRs9zDN_wtCpj8odosAB726JdUHavrk,67
8
- gate/ccxt/async_support/base/exchange.py,sha256=v6BUnxiy1aNvGfPIY_Uoc8bO81Hc2KixZhFYLUZtdgc,119007
8
+ gate/ccxt/async_support/base/exchange.py,sha256=pPVR10gnuBSN2R_vwgfnsqrvTXv7H30sXdPFls3skCk,119007
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/aiohttp_client.py,sha256=Y5HxAVXyyYduj6b6SbbUZETlq3GrVMzrkW1r-TMgpb8,6329
@@ -18,10 +18,10 @@ gate/ccxt/async_support/base/ws/order_book_side.py,sha256=GhnGUt78pJ-AYL_Dq9prod
18
18
  gate/ccxt/base/__init__.py,sha256=eTx1OE3HJjspFUQjGm6LBhaQiMKJnXjkdP-JUXknyQ0,1320
19
19
  gate/ccxt/base/decimal_to_precision.py,sha256=fgWRBzRTtsf3r2INyS4f7WHlzgjB5YM1ekiwqD21aac,6634
20
20
  gate/ccxt/base/errors.py,sha256=MvCrL_sAM3de616T6RE0PSxiF2xV6Qqz5b1y1ghidbk,4888
21
- gate/ccxt/base/exchange.py,sha256=0eWsLPmC7XqT192_2CilEsKFbcNtDqQktuknty6v8zE,328021
21
+ gate/ccxt/base/exchange.py,sha256=NGY9v0WAuFqoAPgiDPVR87xTwsjeKE78GxTz0TZe23Q,328149
22
22
  gate/ccxt/base/precise.py,sha256=koce64Yrp6vFbGijJtUt-QQ6XhJgeGTCksZ871FPp_A,8886
23
23
  gate/ccxt/base/types.py,sha256=IbLO7Ni-plO36xlOdJQFqujSJBq0q9qll009ShZ0M_U,11468
24
- gate/ccxt/pro/__init__.py,sha256=3TIx2m35pZBl9G14_dytMx_fdz9xo8OiE4bDQIVF0s0,4179
24
+ gate/ccxt/pro/__init__.py,sha256=m6M-xURDAVK6DjrMQyk7TenHBGvDuxW_R0qHf96Qs4k,4209
25
25
  gate/ccxt/pro/gate.py,sha256=TImMphR9V8h9xqDJ541s3zb4NOppfLDc-XoBkntT1nA,89399
26
26
  gate/ccxt/static_dependencies/README.md,sha256=3TCvhhn09_Cqf9BDDpao1V7EfKHDpQ6k9oWRsLFixpU,18
27
27
  gate/ccxt/static_dependencies/__init__.py,sha256=tzFje8cloqmiIE6kola3EaYC0SnD1izWnri69hzHsSw,168
@@ -282,6 +282,6 @@ gate/ccxt/static_dependencies/toolz/curried/exceptions.py,sha256=gKFOHDIayAWnX2u
282
282
  gate/ccxt/static_dependencies/toolz/curried/operator.py,sha256=ML92mknkAwzBl2NCm-4werSUmJEtSHNY9NSzhseNM9s,525
283
283
  gate/ccxt/static_dependencies/typing_inspect/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
284
284
  gate/ccxt/static_dependencies/typing_inspect/typing_inspect.py,sha256=5gIWomLPfuDpgd3gX1GlnX0MuXM3VorR4j2W2qXORiQ,28269
285
- gate_io_api-0.0.65.dist-info/METADATA,sha256=UqslfjOThUou3zXZRpcKIjIT4qiO6sG-Hc9eEFaOjDg,26789
286
- gate_io_api-0.0.65.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
287
- gate_io_api-0.0.65.dist-info/RECORD,,
285
+ gate_io_api-0.0.66.dist-info/METADATA,sha256=VBBfZwr0zlAaz3ePx6mL9KuCBiqxE4niLPSLkTRwuG8,26789
286
+ gate_io_api-0.0.66.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
287
+ gate_io_api-0.0.66.dist-info/RECORD,,