coinex-api 0.0.66__py3-none-any.whl → 0.0.69__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.
coinex/ccxt/__init__.py CHANGED
@@ -26,7 +26,7 @@ sys.modules['ccxt'] = ccxt_module
26
26
 
27
27
  # ----------------------------------------------------------------------------
28
28
 
29
- __version__ = '4.4.87'
29
+ __version__ = '4.4.90'
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.87'
11
+ __version__ = '4.4.90'
12
12
 
13
13
  # -----------------------------------------------------------------------------
14
14
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  # -----------------------------------------------------------------------------
4
4
 
5
- __version__ = '4.4.87'
5
+ __version__ = '4.4.90'
6
6
 
7
7
  # -----------------------------------------------------------------------------
8
8
 
@@ -282,7 +282,10 @@ class Exchange(BaseExchange):
282
282
  currencies = None
283
283
  if self.has['fetchCurrencies'] is True:
284
284
  currencies = await self.fetch_currencies()
285
+ self.options['cachedCurrencies'] = currencies
285
286
  markets = await self.fetch_markets(params)
287
+ if 'cachedCurrencies' in self.options:
288
+ del self.options['cachedCurrencies']
286
289
  return self.set_markets(markets, currencies)
287
290
 
288
291
 
@@ -4,7 +4,7 @@
4
4
 
5
5
  # -----------------------------------------------------------------------------
6
6
 
7
- __version__ = '4.4.87'
7
+ __version__ = '4.4.90'
8
8
 
9
9
  # -----------------------------------------------------------------------------
10
10
 
@@ -906,6 +906,10 @@ class Exchange(object):
906
906
  def keysort(dictionary):
907
907
  return collections.OrderedDict(sorted(dictionary.items(), key=lambda t: t[0]))
908
908
 
909
+ @staticmethod
910
+ def sort(array):
911
+ return sorted(array)
912
+
909
913
  @staticmethod
910
914
  def extend(*args):
911
915
  if args is not None:
@@ -956,6 +960,11 @@ class Exchange(object):
956
960
  def groupBy(array, key):
957
961
  return Exchange.group_by(array, key)
958
962
 
963
+
964
+ @staticmethod
965
+ def index_by_safe(array, key):
966
+ return Exchange.index_by(array, key) # wrapper for go
967
+
959
968
  @staticmethod
960
969
  def index_by(array, key):
961
970
  result = {}
@@ -1037,7 +1046,7 @@ class Exchange(object):
1037
1046
  return _urlencode.urlencode(result, quote_via=_urlencode.quote)
1038
1047
 
1039
1048
  @staticmethod
1040
- def rawencode(params={}):
1049
+ def rawencode(params={}, sort=False):
1041
1050
  return _urlencode.unquote(Exchange.urlencode(params))
1042
1051
 
1043
1052
  @staticmethod
@@ -1536,7 +1545,8 @@ class Exchange(object):
1536
1545
  currencies = self.fetch_currencies()
1537
1546
  self.options['cachedCurrencies'] = currencies
1538
1547
  markets = self.fetch_markets(params)
1539
- del self.options['cachedCurrencies']
1548
+ if 'cachedCurrencies' in self.options:
1549
+ del self.options['cachedCurrencies']
1540
1550
  return self.set_markets(markets, currencies)
1541
1551
 
1542
1552
  def fetch_markets(self, params={}):
@@ -3186,7 +3196,7 @@ class Exchange(object):
3186
3196
 
3187
3197
  def set_markets(self, markets, currencies=None):
3188
3198
  values = []
3189
- self.markets_by_id = {}
3199
+ self.markets_by_id = self.create_safe_dictionary()
3190
3200
  # handle marketId conflicts
3191
3201
  # we insert spot markets first
3192
3202
  marketValues = self.sort_by(self.to_array(markets), 'spot', True, True)
@@ -3261,7 +3271,7 @@ class Exchange(object):
3261
3271
  resultingCurrencies.append(highestPrecisionCurrency)
3262
3272
  sortedCurrencies = self.sort_by(resultingCurrencies, 'code')
3263
3273
  self.currencies = self.deep_extend(self.currencies, self.index_by(sortedCurrencies, 'code'))
3264
- self.currencies_by_id = self.index_by(self.currencies, 'id')
3274
+ self.currencies_by_id = self.index_by_safe(self.currencies, 'id')
3265
3275
  currenciesSortedByCode = self.keysort(self.currencies)
3266
3276
  self.codes = list(currenciesSortedByCode.keys())
3267
3277
  return self.markets
@@ -8,7 +8,7 @@ sys.modules['ccxt'] = ccxt_module
8
8
 
9
9
  # ----------------------------------------------------------------------------
10
10
 
11
- __version__ = '4.4.87'
11
+ __version__ = '4.4.90'
12
12
 
13
13
  # ----------------------------------------------------------------------------
14
14
 
@@ -60,124 +60,6 @@ from ccxt.base.errors import UnsubscribeError # noqa: F4
60
60
  from ccxt.base.errors import error_hierarchy # noqa: F401
61
61
  # DO_NOT_REMOVE__ERROR_IMPORTS_END
62
62
 
63
-
64
-
65
-
66
-
67
-
68
-
69
-
70
-
71
-
72
-
73
-
74
-
75
-
76
-
77
-
78
-
79
-
80
-
81
-
82
-
83
-
84
-
85
-
86
-
87
-
88
-
89
-
90
-
91
-
92
-
93
-
94
-
95
-
96
-
97
-
98
-
99
-
100
-
101
-
102
-
103
-
104
-
105
-
106
-
107
-
108
-
109
-
110
-
111
-
112
-
113
-
114
-
115
-
116
-
117
-
118
-
119
-
120
-
121
-
122
-
123
-
124
-
125
-
126
-
127
-
128
-
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
-
160
-
161
-
162
-
163
-
164
-
165
-
166
-
167
-
168
-
169
-
170
-
171
-
172
-
173
-
174
-
175
-
176
-
177
-
178
-
179
-
180
-
181
63
  from ccxt.pro.coinex import coinex # noqa: F401
182
64
 
183
65
  exchanges = [ 'coinex',]
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: coinex-api
3
- Version: 0.0.66
3
+ Version: 0.0.69
4
4
  Summary: coinex 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
  coinex/__init__.py,sha256=d633U2PpNFHvpDWLb3lItS0ObcBN0E2XgS5QkOEejI8,246
2
- coinex/ccxt/__init__.py,sha256=ew2Lm5eEntgt14KPwbU46bvCfg3JpRmotPTr1ebaPHQ,6048
2
+ coinex/ccxt/__init__.py,sha256=T_c8ubbO0URpgxghKteY6ZLaOaEsGrZpIwxDnXelYUw,6048
3
3
  coinex/ccxt/coinex.py,sha256=CoCBNE0SWXgXBurhdqcsMuMsj3TnYALKFUz-_gLz2XA,267281
4
4
  coinex/ccxt/abstract/coinex.py,sha256=4TRXtWgONqkm3eSL55Y5T7Q4QxJrnOTuhP0ugsKHAWo,34856
5
- coinex/ccxt/async_support/__init__.py,sha256=c7UUfIBP6-oiPfiszBNQRY_SoMNGxDCJApVeuAiY9aE,4781
5
+ coinex/ccxt/async_support/__init__.py,sha256=bzX_4j6m_CDvygCtjeR9PUktVz6--UYe5AJMDu0SE5I,4781
6
6
  coinex/ccxt/async_support/coinex.py,sha256=lj_2qf1gnqmXbVf_pXBZddBFsHeVmh_N2JIxBHhmPwM,268569
7
7
  coinex/ccxt/async_support/base/__init__.py,sha256=aVYSsFi--b4InRs9zDN_wtCpj8odosAB726JdUHavrk,67
8
- coinex/ccxt/async_support/base/exchange.py,sha256=pPVR10gnuBSN2R_vwgfnsqrvTXv7H30sXdPFls3skCk,119007
8
+ coinex/ccxt/async_support/base/exchange.py,sha256=3qo41BpgIc0nGYI3Fka9-_Wodr_xbzh47eW0jAuMsUQ,119161
9
9
  coinex/ccxt/async_support/base/throttler.py,sha256=tvDVcdRUVYi8fZRlEcnqtgzcgB_KMUMRs5Pu8tuU-tU,1847
10
10
  coinex/ccxt/async_support/base/ws/__init__.py,sha256=uockzpLuwntKGZbs5EOWFe-Zg-k6Cj7GhNJLc_RX0so,1791
11
11
  coinex/ccxt/async_support/base/ws/aiohttp_client.py,sha256=Y5HxAVXyyYduj6b6SbbUZETlq3GrVMzrkW1r-TMgpb8,6329
@@ -18,10 +18,10 @@ coinex/ccxt/async_support/base/ws/order_book_side.py,sha256=GhnGUt78pJ-AYL_Dq9pr
18
18
  coinex/ccxt/base/__init__.py,sha256=eTx1OE3HJjspFUQjGm6LBhaQiMKJnXjkdP-JUXknyQ0,1320
19
19
  coinex/ccxt/base/decimal_to_precision.py,sha256=fgWRBzRTtsf3r2INyS4f7WHlzgjB5YM1ekiwqD21aac,6634
20
20
  coinex/ccxt/base/errors.py,sha256=MvCrL_sAM3de616T6RE0PSxiF2xV6Qqz5b1y1ghidbk,4888
21
- coinex/ccxt/base/exchange.py,sha256=NGY9v0WAuFqoAPgiDPVR87xTwsjeKE78GxTz0TZe23Q,328149
21
+ coinex/ccxt/base/exchange.py,sha256=b6TLBQicsWseX5icZF9BC89wQfUaqN5IPBSEcNOq1SM,328431
22
22
  coinex/ccxt/base/precise.py,sha256=koce64Yrp6vFbGijJtUt-QQ6XhJgeGTCksZ871FPp_A,8886
23
23
  coinex/ccxt/base/types.py,sha256=IbLO7Ni-plO36xlOdJQFqujSJBq0q9qll009ShZ0M_U,11468
24
- coinex/ccxt/pro/__init__.py,sha256=jWKAFVO75g5QliIw83ZYF_ee94jFjiN1GMSb_6Rq5ks,4213
24
+ coinex/ccxt/pro/__init__.py,sha256=XsqfwQUcuIZcHsBnurz6OO6sjdH1cE5NEXVfJxwWMoA,4095
25
25
  coinex/ccxt/pro/coinex.py,sha256=aQ6Xa4ML0PTCgGleDJuhjqntspAREz6XxQwX9IcD6OY,56616
26
26
  coinex/ccxt/static_dependencies/README.md,sha256=3TCvhhn09_Cqf9BDDpao1V7EfKHDpQ6k9oWRsLFixpU,18
27
27
  coinex/ccxt/static_dependencies/__init__.py,sha256=tzFje8cloqmiIE6kola3EaYC0SnD1izWnri69hzHsSw,168
@@ -282,6 +282,6 @@ coinex/ccxt/static_dependencies/toolz/curried/exceptions.py,sha256=gKFOHDIayAWnX
282
282
  coinex/ccxt/static_dependencies/toolz/curried/operator.py,sha256=ML92mknkAwzBl2NCm-4werSUmJEtSHNY9NSzhseNM9s,525
283
283
  coinex/ccxt/static_dependencies/typing_inspect/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
284
284
  coinex/ccxt/static_dependencies/typing_inspect/typing_inspect.py,sha256=5gIWomLPfuDpgd3gX1GlnX0MuXM3VorR4j2W2qXORiQ,28269
285
- coinex_api-0.0.66.dist-info/METADATA,sha256=cjfSWqMRwIUjZtBvT3PU3Cxff4g8OASOn63Hv1PnRyA,19969
286
- coinex_api-0.0.66.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
287
- coinex_api-0.0.66.dist-info/RECORD,,
285
+ coinex_api-0.0.69.dist-info/METADATA,sha256=T_4RyLSLaFa_t3jio6YK4UxlERIb1zEzq9b1Tfdyi20,19969
286
+ coinex_api-0.0.69.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
287
+ coinex_api-0.0.69.dist-info/RECORD,,