bitmex-api 0.0.70__py3-none-any.whl → 0.0.71__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.
- bitmex/ccxt/__init__.py +1 -1
- bitmex/ccxt/async_support/__init__.py +1 -1
- bitmex/ccxt/async_support/base/exchange.py +1 -1
- bitmex/ccxt/async_support/base/ws/client.py +1 -1
- bitmex/ccxt/base/exchange.py +15 -19
- bitmex/ccxt/base/types.py +1 -0
- bitmex/ccxt/pro/__init__.py +1 -1
- {bitmex_api-0.0.70.dist-info → bitmex_api-0.0.71.dist-info}/METADATA +1 -1
- {bitmex_api-0.0.70.dist-info → bitmex_api-0.0.71.dist-info}/RECORD +10 -10
- {bitmex_api-0.0.70.dist-info → bitmex_api-0.0.71.dist-info}/WHEEL +0 -0
bitmex/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.92'
|
30
30
|
|
31
31
|
# ----------------------------------------------------------------------------
|
32
32
|
|
@@ -134,7 +134,7 @@ class Client(object):
|
|
134
134
|
error = NetworkError(str(exception))
|
135
135
|
if self.verbose:
|
136
136
|
self.log(iso8601(milliseconds()), 'receive_loop', 'Exception', error)
|
137
|
-
self.
|
137
|
+
self.reject(error)
|
138
138
|
|
139
139
|
task.add_done_callback(after_interrupt)
|
140
140
|
|
bitmex/ccxt/base/exchange.py
CHANGED
@@ -4,7 +4,7 @@
|
|
4
4
|
|
5
5
|
# -----------------------------------------------------------------------------
|
6
6
|
|
7
|
-
__version__ = '4.4.
|
7
|
+
__version__ = '4.4.92'
|
8
8
|
|
9
9
|
# -----------------------------------------------------------------------------
|
10
10
|
|
@@ -1515,6 +1515,12 @@ class Exchange(object):
|
|
1515
1515
|
parts = re.sub(r'0+$', '', str).split('.')
|
1516
1516
|
return len(parts[1]) if len(parts) > 1 else 0
|
1517
1517
|
|
1518
|
+
def map_to_safe_map(self, dictionary):
|
1519
|
+
return dictionary # wrapper for go
|
1520
|
+
|
1521
|
+
def safe_map_to_map(self, dictionary):
|
1522
|
+
return dictionary # wrapper for go
|
1523
|
+
|
1518
1524
|
def load_markets(self, reload=False, params={}):
|
1519
1525
|
"""
|
1520
1526
|
Loads and prepares the markets for trading.
|
@@ -3222,14 +3228,14 @@ class Exchange(object):
|
|
3222
3228
|
else:
|
3223
3229
|
market['subType'] = None
|
3224
3230
|
values.append(market)
|
3225
|
-
self.markets = self.index_by(values, 'symbol')
|
3231
|
+
self.markets = self.map_to_safe_map(self.index_by(values, 'symbol'))
|
3226
3232
|
marketsSortedBySymbol = self.keysort(self.markets)
|
3227
3233
|
marketsSortedById = self.keysort(self.markets_by_id)
|
3228
3234
|
self.symbols = list(marketsSortedBySymbol.keys())
|
3229
3235
|
self.ids = list(marketsSortedById.keys())
|
3230
3236
|
if currencies is not None:
|
3231
3237
|
# currencies is always None when called in constructor but not when called from loadMarkets
|
3232
|
-
self.currencies = self.deep_extend(self.currencies, currencies)
|
3238
|
+
self.currencies = self.map_to_safe_map(self.deep_extend(self.currencies, currencies))
|
3233
3239
|
else:
|
3234
3240
|
baseCurrencies = []
|
3235
3241
|
quoteCurrencies = []
|
@@ -3255,8 +3261,8 @@ class Exchange(object):
|
|
3255
3261
|
quoteCurrencies.append(currency)
|
3256
3262
|
baseCurrencies = self.sort_by(baseCurrencies, 'code', False, '')
|
3257
3263
|
quoteCurrencies = self.sort_by(quoteCurrencies, 'code', False, '')
|
3258
|
-
self.baseCurrencies = self.index_by(baseCurrencies, 'code')
|
3259
|
-
self.quoteCurrencies = self.index_by(quoteCurrencies, 'code')
|
3264
|
+
self.baseCurrencies = self.map_to_safe_map(self.index_by(baseCurrencies, 'code'))
|
3265
|
+
self.quoteCurrencies = self.map_to_safe_map(self.index_by(quoteCurrencies, 'code'))
|
3260
3266
|
allCurrencies = self.array_concat(baseCurrencies, quoteCurrencies)
|
3261
3267
|
groupedCurrencies = self.group_by(allCurrencies, 'code')
|
3262
3268
|
codes = list(groupedCurrencies.keys())
|
@@ -3273,7 +3279,7 @@ class Exchange(object):
|
|
3273
3279
|
highestPrecisionCurrency = currentCurrency if (currentCurrency['precision'] > highestPrecisionCurrency['precision']) else highestPrecisionCurrency
|
3274
3280
|
resultingCurrencies.append(highestPrecisionCurrency)
|
3275
3281
|
sortedCurrencies = self.sort_by(resultingCurrencies, 'code')
|
3276
|
-
self.currencies = self.deep_extend(self.currencies, self.index_by(sortedCurrencies, 'code'))
|
3282
|
+
self.currencies = self.map_to_safe_map(self.deep_extend(self.currencies, self.index_by(sortedCurrencies, 'code')))
|
3277
3283
|
self.currencies_by_id = self.index_by_safe(self.currencies, 'id')
|
3278
3284
|
currenciesSortedByCode = self.keysort(self.currencies)
|
3279
3285
|
self.codes = list(currenciesSortedByCode.keys())
|
@@ -6792,7 +6798,7 @@ class Exchange(object):
|
|
6792
6798
|
return reconstructedDate
|
6793
6799
|
|
6794
6800
|
def convert_market_id_expire_date(self, date: str):
|
6795
|
-
# parse 03JAN24 to 240103
|
6801
|
+
# parse 03JAN24 to 240103.
|
6796
6802
|
monthMappping = {
|
6797
6803
|
'JAN': '01',
|
6798
6804
|
'FEB': '02',
|
@@ -6914,19 +6920,9 @@ class Exchange(object):
|
|
6914
6920
|
del self.tickers[symbol]
|
6915
6921
|
else:
|
6916
6922
|
if topic == 'myTrades' and (self.myTrades is not None):
|
6917
|
-
|
6918
|
-
# because in c# we need to use a different object(thread-safe dict)
|
6919
|
-
keys = list(self.myTrades.keys())
|
6920
|
-
for i in range(0, len(keys)):
|
6921
|
-
key = keys[i]
|
6922
|
-
if key in self.myTrades:
|
6923
|
-
del self.myTrades[key]
|
6923
|
+
self.myTrades = None
|
6924
6924
|
elif topic == 'orders' and (self.orders is not None):
|
6925
|
-
|
6926
|
-
for i in range(0, len(orderSymbols)):
|
6927
|
-
orderSymbol = orderSymbols[i]
|
6928
|
-
if orderSymbol in self.orders:
|
6929
|
-
del self.orders[orderSymbol]
|
6925
|
+
self.orders = None
|
6930
6926
|
elif topic == 'ticker' and (self.tickers is not None):
|
6931
6927
|
tickerSymbols = list(self.tickers.keys())
|
6932
6928
|
for i in range(0, len(tickerSymbols)):
|
bitmex/ccxt/base/types.py
CHANGED
bitmex/ccxt/pro/__init__.py
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
bitmex/__init__.py,sha256=YoXAuxG_VioYinNV_H2dBOxO7R1bhKl6aL_6s6TfuWg,246
|
2
|
-
bitmex/ccxt/__init__.py,sha256=
|
2
|
+
bitmex/ccxt/__init__.py,sha256=aEJyISXdcfVqLr5aEV8As2cwXDxAzseaaQzKY8py4vI,6048
|
3
3
|
bitmex/ccxt/bitmex.py,sha256=yfYWTE6n3KxcWIGrbEwus9Q4eOm5xGlmjapaBOjQfek,131832
|
4
4
|
bitmex/ccxt/abstract/bitmex.py,sha256=v15OP-vSO_eotD6KVf1BgKrbPxCPl2eXXYIuzWF1dl4,10774
|
5
|
-
bitmex/ccxt/async_support/__init__.py,sha256=
|
5
|
+
bitmex/ccxt/async_support/__init__.py,sha256=8F3ZBrf8hi2jBcKKKDe_XEpWrp6jl9ebmV_Dpp0l7KE,4781
|
6
6
|
bitmex/ccxt/async_support/bitmex.py,sha256=Nol7iGiAzcCom877VUrfsL0cobZ5DXPRmYmq6noBsoM,132410
|
7
7
|
bitmex/ccxt/async_support/base/__init__.py,sha256=aVYSsFi--b4InRs9zDN_wtCpj8odosAB726JdUHavrk,67
|
8
|
-
bitmex/ccxt/async_support/base/exchange.py,sha256=
|
8
|
+
bitmex/ccxt/async_support/base/exchange.py,sha256=FQynGv0nHLJXfqiWThG1GFXUYqFMvMBdRkMYAxVGrqY,119286
|
9
9
|
bitmex/ccxt/async_support/base/throttler.py,sha256=tvDVcdRUVYi8fZRlEcnqtgzcgB_KMUMRs5Pu8tuU-tU,1847
|
10
10
|
bitmex/ccxt/async_support/base/ws/__init__.py,sha256=uockzpLuwntKGZbs5EOWFe-Zg-k6Cj7GhNJLc_RX0so,1791
|
11
11
|
bitmex/ccxt/async_support/base/ws/cache.py,sha256=xf2VOtfUwloxSlIQ39M1RGZHWQzyS9IGhB5NX6cDcAc,8370
|
12
|
-
bitmex/ccxt/async_support/base/ws/client.py,sha256=
|
12
|
+
bitmex/ccxt/async_support/base/ws/client.py,sha256=1N_ji0ekjViecIHdcT7a8DVbq8aB-ZVgjK6ccJZntMU,13476
|
13
13
|
bitmex/ccxt/async_support/base/ws/functions.py,sha256=qwvEnjtINWL5ZU-dbbeIunjyBxzFqbGWHfVhxqAcKug,1499
|
14
14
|
bitmex/ccxt/async_support/base/ws/future.py,sha256=9yFyxqT7cl-7ZFM6LM4b6UPXyO2FGIbAhs5uoJ3-Smo,1271
|
15
15
|
bitmex/ccxt/async_support/base/ws/order_book.py,sha256=uBUaIHhzMRykpmo4BCsdJ-t_HozS6VxhEs8x-Kbj-NI,2894
|
@@ -17,10 +17,10 @@ bitmex/ccxt/async_support/base/ws/order_book_side.py,sha256=GhnGUt78pJ-AYL_Dq9pr
|
|
17
17
|
bitmex/ccxt/base/__init__.py,sha256=eTx1OE3HJjspFUQjGm6LBhaQiMKJnXjkdP-JUXknyQ0,1320
|
18
18
|
bitmex/ccxt/base/decimal_to_precision.py,sha256=fgWRBzRTtsf3r2INyS4f7WHlzgjB5YM1ekiwqD21aac,6634
|
19
19
|
bitmex/ccxt/base/errors.py,sha256=MvCrL_sAM3de616T6RE0PSxiF2xV6Qqz5b1y1ghidbk,4888
|
20
|
-
bitmex/ccxt/base/exchange.py,sha256=
|
20
|
+
bitmex/ccxt/base/exchange.py,sha256=_2FOqAIq1yfzBic5QI4JMQseWYPIesZpubuSde7jxYk,328428
|
21
21
|
bitmex/ccxt/base/precise.py,sha256=koce64Yrp6vFbGijJtUt-QQ6XhJgeGTCksZ871FPp_A,8886
|
22
|
-
bitmex/ccxt/base/types.py,sha256=
|
23
|
-
bitmex/ccxt/pro/__init__.py,sha256=
|
22
|
+
bitmex/ccxt/base/types.py,sha256=vMQfFDVntED4YHrRJt0Q98YaM7OtGhK-DkbkqXFTYHc,11485
|
23
|
+
bitmex/ccxt/pro/__init__.py,sha256=3KZOyC7YKnTsJEMTTiRvKjLX8-vWw6l1SwI5Jh65UAc,4095
|
24
24
|
bitmex/ccxt/pro/bitmex.py,sha256=5gpicgex_am9Km9ZsZpMKBSKX-SFFAD3PPuv9r-nNdA,74693
|
25
25
|
bitmex/ccxt/static_dependencies/README.md,sha256=3TCvhhn09_Cqf9BDDpao1V7EfKHDpQ6k9oWRsLFixpU,18
|
26
26
|
bitmex/ccxt/static_dependencies/__init__.py,sha256=tzFje8cloqmiIE6kola3EaYC0SnD1izWnri69hzHsSw,168
|
@@ -281,6 +281,6 @@ bitmex/ccxt/static_dependencies/toolz/curried/exceptions.py,sha256=gKFOHDIayAWnX
|
|
281
281
|
bitmex/ccxt/static_dependencies/toolz/curried/operator.py,sha256=ML92mknkAwzBl2NCm-4werSUmJEtSHNY9NSzhseNM9s,525
|
282
282
|
bitmex/ccxt/static_dependencies/typing_inspect/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
283
283
|
bitmex/ccxt/static_dependencies/typing_inspect/typing_inspect.py,sha256=5gIWomLPfuDpgd3gX1GlnX0MuXM3VorR4j2W2qXORiQ,28269
|
284
|
-
bitmex_api-0.0.
|
285
|
-
bitmex_api-0.0.
|
286
|
-
bitmex_api-0.0.
|
284
|
+
bitmex_api-0.0.71.dist-info/METADATA,sha256=JzM5mSY1O5atdt_4CH7nc_ufMMdRVG5r1tmMWbsNx1k,10822
|
285
|
+
bitmex_api-0.0.71.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
286
|
+
bitmex_api-0.0.71.dist-info/RECORD,,
|
File without changes
|