bitget 0.0.71__py3-none-any.whl → 0.0.72__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.
bitget/ccxt/__init__.py CHANGED
@@ -26,7 +26,7 @@ sys.modules['ccxt'] = ccxt_module
26
26
 
27
27
  # ----------------------------------------------------------------------------
28
28
 
29
- __version__ = '4.4.92'
29
+ __version__ = '4.4.93'
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.92'
11
+ __version__ = '4.4.93'
12
12
 
13
13
  # -----------------------------------------------------------------------------
14
14
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  # -----------------------------------------------------------------------------
4
4
 
5
- __version__ = '4.4.92'
5
+ __version__ = '4.4.93'
6
6
 
7
7
  # -----------------------------------------------------------------------------
8
8
 
@@ -1573,6 +1573,9 @@ class Exchange(BaseExchange):
1573
1573
  async def fetch_greeks(self, symbol: str, params={}):
1574
1574
  raise NotSupported(self.id + ' fetchGreeks() is not supported yet')
1575
1575
 
1576
+ async def fetch_all_greeks(self, symbols: Strings = None, params={}):
1577
+ raise NotSupported(self.id + ' fetchAllGreeks() is not supported yet')
1578
+
1576
1579
  async def fetch_option_chain(self, code: str, params={}):
1577
1580
  raise NotSupported(self.id + ' fetchOptionChain() is not supported yet')
1578
1581
 
@@ -137,6 +137,9 @@ class Client(object):
137
137
  self.reject(error)
138
138
 
139
139
  task.add_done_callback(after_interrupt)
140
+ else:
141
+ # connection got terminated after the connection was made and before the receive loop ran
142
+ self.on_close(1006)
140
143
 
141
144
  async def open(self, session, backoff_delay=0):
142
145
  # exponential backoff for consequent connections if necessary
@@ -4,7 +4,7 @@
4
4
 
5
5
  # -----------------------------------------------------------------------------
6
6
 
7
- __version__ = '4.4.92'
7
+ __version__ = '4.4.93'
8
8
 
9
9
  # -----------------------------------------------------------------------------
10
10
 
@@ -4229,7 +4229,7 @@ class Exchange(object):
4229
4229
  return self.filter_by_since_limit(sorted, since, limit, 0, tail)
4230
4230
 
4231
4231
  def parse_leverage_tiers(self, response: Any, symbols: List[str] = None, marketIdKey=None):
4232
- # marketIdKey should only be None when response is a dictionary
4232
+ # marketIdKey should only be None when response is a dictionary.
4233
4233
  symbols = self.market_symbols(symbols)
4234
4234
  tiers = {}
4235
4235
  symbolsLength = 0
@@ -5450,6 +5450,9 @@ class Exchange(object):
5450
5450
  def fetch_greeks(self, symbol: str, params={}):
5451
5451
  raise NotSupported(self.id + ' fetchGreeks() is not supported yet')
5452
5452
 
5453
+ def fetch_all_greeks(self, symbols: Strings = None, params={}):
5454
+ raise NotSupported(self.id + ' fetchAllGreeks() is not supported yet')
5455
+
5453
5456
  def fetch_option_chain(self, code: str, params={}):
5454
5457
  raise NotSupported(self.id + ' fetchOptionChain() is not supported yet')
5455
5458
 
@@ -5703,10 +5706,16 @@ class Exchange(object):
5703
5706
  precisionNumber = int(precision)
5704
5707
  if precisionNumber == 0:
5705
5708
  return '1'
5706
- parsedPrecision = '0.'
5707
- for i in range(0, precisionNumber - 1):
5708
- parsedPrecision = parsedPrecision + '0'
5709
- return parsedPrecision + '1'
5709
+ if precisionNumber > 0:
5710
+ parsedPrecision = '0.'
5711
+ for i in range(0, precisionNumber - 1):
5712
+ parsedPrecision = parsedPrecision + '0'
5713
+ return parsedPrecision + '1'
5714
+ else:
5715
+ parsedPrecision = '1'
5716
+ for i in range(0, precisionNumber * -1 - 1):
5717
+ parsedPrecision = parsedPrecision + '0'
5718
+ return parsedPrecision + '0'
5710
5719
 
5711
5720
  def integer_precision_to_amount(self, precision: Str):
5712
5721
  """
@@ -6682,6 +6691,27 @@ class Exchange(object):
6682
6691
  def parse_greeks(self, greeks: dict, market: Market = None):
6683
6692
  raise NotSupported(self.id + ' parseGreeks() is not supported yet')
6684
6693
 
6694
+ def parse_all_greeks(self, greeks, symbols: Strings = None, params={}):
6695
+ #
6696
+ # the value of greeks is either a dict or a list
6697
+ #
6698
+ results = []
6699
+ if isinstance(greeks, list):
6700
+ for i in range(0, len(greeks)):
6701
+ parsedTicker = self.parse_greeks(greeks[i])
6702
+ greek = self.extend(parsedTicker, params)
6703
+ results.append(greek)
6704
+ else:
6705
+ marketIds = list(greeks.keys())
6706
+ for i in range(0, len(marketIds)):
6707
+ marketId = marketIds[i]
6708
+ market = self.safe_market(marketId)
6709
+ parsed = self.parse_greeks(greeks[marketId], market)
6710
+ greek = self.extend(parsed, params)
6711
+ results.append(greek)
6712
+ symbols = self.market_symbols(symbols)
6713
+ return self.filter_by_array(results, 'symbol', symbols)
6714
+
6685
6715
  def parse_option(self, chain: dict, currency: Currency = None, market: Market = None):
6686
6716
  raise NotSupported(self.id + ' parseOption() is not supported yet')
6687
6717
 
@@ -6883,14 +6913,27 @@ class Exchange(object):
6883
6913
  """
6884
6914
  raise NotSupported(self.id + ' fetchTransfers() is not supported yet')
6885
6915
 
6886
- def clean_unsubscription(self, client, subHash: str, unsubHash: str):
6916
+ def clean_unsubscription(self, client, subHash: str, unsubHash: str, subHashIsPrefix=False):
6887
6917
  if unsubHash in client.subscriptions:
6888
6918
  del client.subscriptions[unsubHash]
6889
- if subHash in client.subscriptions:
6890
- del client.subscriptions[subHash]
6891
- if subHash in client.futures:
6892
- error = UnsubscribeError(self.id + ' ' + subHash)
6893
- client.reject(error, subHash)
6919
+ if not subHashIsPrefix:
6920
+ if subHash in client.subscriptions:
6921
+ del client.subscriptions[subHash]
6922
+ if subHash in client.futures:
6923
+ error = UnsubscribeError(self.id + ' ' + subHash)
6924
+ client.reject(error, subHash)
6925
+ else:
6926
+ clientSubscriptions = list(client.subscriptions.keys())
6927
+ for i in range(0, len(clientSubscriptions)):
6928
+ sub = clientSubscriptions[i]
6929
+ if sub.startswith(subHash):
6930
+ del client.subscriptions[sub]
6931
+ clientFutures = list(client.futures.keys())
6932
+ for i in range(0, len(clientFutures)):
6933
+ future = clientFutures[i]
6934
+ if future.startswith(subHash):
6935
+ error = UnsubscribeError(self.id + ' ' + future)
6936
+ client.reject(error, future)
6894
6937
  client.resolve(True, unsubHash)
6895
6938
 
6896
6939
  def clean_cache(self, subscription: dict):
@@ -8,7 +8,7 @@ sys.modules['ccxt'] = ccxt_module
8
8
 
9
9
  # ----------------------------------------------------------------------------
10
10
 
11
- __version__ = '4.4.92'
11
+ __version__ = '4.4.93'
12
12
 
13
13
  # ----------------------------------------------------------------------------
14
14
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: bitget
3
- Version: 0.0.71
3
+ Version: 0.0.72
4
4
  Summary: bitget 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,15 +1,15 @@
1
1
  bitget/__init__.py,sha256=D5tG1_AjwXjMim3CPnCuWSheOXtq4vlSwVCS5ZG1bMQ,246
2
- bitget/ccxt/__init__.py,sha256=3dTMAmmGL3dyahJSJmNVGaqwvobV7zzTWpfuoVsP9n4,6048
2
+ bitget/ccxt/__init__.py,sha256=Q450UeYjxmWaFB_HcTDAd5EcfRzBBJQhiKOPWAGKwY4,6048
3
3
  bitget/ccxt/bitget.py,sha256=e6ssz20PaoHGhU9bL0fDs4q54HGB-_BkssQGelOOW_0,453846
4
4
  bitget/ccxt/abstract/bitget.py,sha256=6q34nW4J1Vfvls4tExxZRJt0Ct28hCO0TQja_Mb_bmI,99978
5
- bitget/ccxt/async_support/__init__.py,sha256=FEvaCVoFz0CeuLuQlX3e-WhbsTQ2bGxxzbJzT8ev3tY,4781
5
+ bitget/ccxt/async_support/__init__.py,sha256=ClqxRSV7I9qn3TuVBeukP3s7qjn8GfyeeKnTZsuYIHw,4781
6
6
  bitget/ccxt/async_support/bitget.py,sha256=sPHtswNgPICInGQshCx2B1FxTmzf71mHVFQIxImZeew,455589
7
7
  bitget/ccxt/async_support/base/__init__.py,sha256=aVYSsFi--b4InRs9zDN_wtCpj8odosAB726JdUHavrk,67
8
- bitget/ccxt/async_support/base/exchange.py,sha256=FQynGv0nHLJXfqiWThG1GFXUYqFMvMBdRkMYAxVGrqY,119286
8
+ bitget/ccxt/async_support/base/exchange.py,sha256=WRCIHpPMqJ4UpcL4x534QQWA1Bo4RFS1xJitRjKFViw,119440
9
9
  bitget/ccxt/async_support/base/throttler.py,sha256=tvDVcdRUVYi8fZRlEcnqtgzcgB_KMUMRs5Pu8tuU-tU,1847
10
10
  bitget/ccxt/async_support/base/ws/__init__.py,sha256=uockzpLuwntKGZbs5EOWFe-Zg-k6Cj7GhNJLc_RX0so,1791
11
11
  bitget/ccxt/async_support/base/ws/cache.py,sha256=xf2VOtfUwloxSlIQ39M1RGZHWQzyS9IGhB5NX6cDcAc,8370
12
- bitget/ccxt/async_support/base/ws/client.py,sha256=1N_ji0ekjViecIHdcT7a8DVbq8aB-ZVgjK6ccJZntMU,13476
12
+ bitget/ccxt/async_support/base/ws/client.py,sha256=ekIN5HNgeQgMG3tLZMsE889Aoxs960DLwQnwkTGhdi8,13624
13
13
  bitget/ccxt/async_support/base/ws/functions.py,sha256=qwvEnjtINWL5ZU-dbbeIunjyBxzFqbGWHfVhxqAcKug,1499
14
14
  bitget/ccxt/async_support/base/ws/future.py,sha256=9yFyxqT7cl-7ZFM6LM4b6UPXyO2FGIbAhs5uoJ3-Smo,1271
15
15
  bitget/ccxt/async_support/base/ws/order_book.py,sha256=uBUaIHhzMRykpmo4BCsdJ-t_HozS6VxhEs8x-Kbj-NI,2894
@@ -17,10 +17,10 @@ bitget/ccxt/async_support/base/ws/order_book_side.py,sha256=GhnGUt78pJ-AYL_Dq9pr
17
17
  bitget/ccxt/base/__init__.py,sha256=eTx1OE3HJjspFUQjGm6LBhaQiMKJnXjkdP-JUXknyQ0,1320
18
18
  bitget/ccxt/base/decimal_to_precision.py,sha256=fgWRBzRTtsf3r2INyS4f7WHlzgjB5YM1ekiwqD21aac,6634
19
19
  bitget/ccxt/base/errors.py,sha256=MvCrL_sAM3de616T6RE0PSxiF2xV6Qqz5b1y1ghidbk,4888
20
- bitget/ccxt/base/exchange.py,sha256=_2FOqAIq1yfzBic5QI4JMQseWYPIesZpubuSde7jxYk,328428
20
+ bitget/ccxt/base/exchange.py,sha256=64LNTmAxXu8gUG6n4pwCNjTmVZmV0otj7ceWXRB3G6o,330373
21
21
  bitget/ccxt/base/precise.py,sha256=koce64Yrp6vFbGijJtUt-QQ6XhJgeGTCksZ871FPp_A,8886
22
22
  bitget/ccxt/base/types.py,sha256=vMQfFDVntED4YHrRJt0Q98YaM7OtGhK-DkbkqXFTYHc,11485
23
- bitget/ccxt/pro/__init__.py,sha256=uM-Q6N_qoSchnZy0i-iMbtqL9QcDWr1Oda7JQ6IXftM,4095
23
+ bitget/ccxt/pro/__init__.py,sha256=NyLL43qjDL84uKp6zZs34l9T3RC0FxaBe1j7G3nzlhg,4095
24
24
  bitget/ccxt/pro/bitget.py,sha256=g8SkdhTze-idsChWiGIBi1twpiDfRlJyvnG2NL9VsR0,90372
25
25
  bitget/ccxt/static_dependencies/README.md,sha256=3TCvhhn09_Cqf9BDDpao1V7EfKHDpQ6k9oWRsLFixpU,18
26
26
  bitget/ccxt/static_dependencies/__init__.py,sha256=tzFje8cloqmiIE6kola3EaYC0SnD1izWnri69hzHsSw,168
@@ -281,6 +281,6 @@ bitget/ccxt/static_dependencies/toolz/curried/exceptions.py,sha256=gKFOHDIayAWnX
281
281
  bitget/ccxt/static_dependencies/toolz/curried/operator.py,sha256=ML92mknkAwzBl2NCm-4werSUmJEtSHNY9NSzhseNM9s,525
282
282
  bitget/ccxt/static_dependencies/typing_inspect/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
283
283
  bitget/ccxt/static_dependencies/typing_inspect/typing_inspect.py,sha256=5gIWomLPfuDpgd3gX1GlnX0MuXM3VorR4j2W2qXORiQ,28269
284
- bitget-0.0.71.dist-info/METADATA,sha256=5NO3q_tCMIm8py01gw8vYH52oy4FYzxog-PfPwKagyo,44111
285
- bitget-0.0.71.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
286
- bitget-0.0.71.dist-info/RECORD,,
284
+ bitget-0.0.72.dist-info/METADATA,sha256=KLzm_k_CoY6uzv43Pq3HOs7SC9CsM78jBZpdsXstuRA,44111
285
+ bitget-0.0.72.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
286
+ bitget-0.0.72.dist-info/RECORD,,