gate-io-api 0.0.91__py3-none-any.whl → 0.0.92__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.5.7'
29
+ __version__ = '4.5.8'
30
30
 
31
31
  # ----------------------------------------------------------------------------
32
32
 
@@ -8,7 +8,7 @@ sys.modules['ccxt'] = ccxt_module
8
8
 
9
9
  # -----------------------------------------------------------------------------
10
10
 
11
- __version__ = '4.5.7'
11
+ __version__ = '4.5.8'
12
12
 
13
13
  # -----------------------------------------------------------------------------
14
14
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  # -----------------------------------------------------------------------------
4
4
 
5
- __version__ = '4.5.7'
5
+ __version__ = '4.5.8'
6
6
 
7
7
  # -----------------------------------------------------------------------------
8
8
 
gate/ccxt/base/errors.py CHANGED
@@ -1,3 +1,9 @@
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
+
1
7
  error_hierarchy = {
2
8
  'BaseError': {
3
9
  'ExchangeError': {
@@ -4,7 +4,7 @@
4
4
 
5
5
  # -----------------------------------------------------------------------------
6
6
 
7
- __version__ = '4.5.7'
7
+ __version__ = '4.5.8'
8
8
 
9
9
  # -----------------------------------------------------------------------------
10
10
 
@@ -4739,9 +4739,12 @@ class Exchange(object):
4739
4739
  i_count = 6
4740
4740
  tradesLength = len(trades)
4741
4741
  oldest = min(tradesLength, limit)
4742
+ options = self.safe_dict(self.options, 'buildOHLCVC', {})
4743
+ skipZeroPrices = self.safe_bool(options, 'skipZeroPrices', True)
4742
4744
  for i in range(0, oldest):
4743
4745
  trade = trades[i]
4744
4746
  ts = trade['timestamp']
4747
+ price = trade['price']
4745
4748
  if ts < since:
4746
4749
  continue
4747
4750
  openingTime = int(math.floor(ts / ms)) * ms # shift to the edge of m/h/d(but not M)
@@ -4749,22 +4752,25 @@ class Exchange(object):
4749
4752
  continue
4750
4753
  ohlcv_length = len(ohlcvs)
4751
4754
  candle = ohlcv_length - 1
4752
- if (candle == -1) or (openingTime >= self.sum(ohlcvs[candle][i_timestamp], ms)):
4755
+ if skipZeroPrices and not (price > 0) and not (price < 0):
4756
+ continue
4757
+ isFirstCandle = candle == -1
4758
+ if isFirstCandle or openingTime >= self.sum(ohlcvs[candle][i_timestamp], ms):
4753
4759
  # moved to a new timeframe -> create a new candle from opening trade
4754
4760
  ohlcvs.append([
4755
4761
  openingTime, # timestamp
4756
- trade['price'], # O
4757
- trade['price'], # H
4758
- trade['price'], # L
4759
- trade['price'], # C
4762
+ price, # O
4763
+ price, # H
4764
+ price, # L
4765
+ price, # C
4760
4766
  trade['amount'], # V
4761
4767
  1, # count
4762
4768
  ])
4763
4769
  else:
4764
4770
  # still processing the same timeframe -> update opening trade
4765
- ohlcvs[candle][i_high] = max(ohlcvs[candle][i_high], trade['price'])
4766
- ohlcvs[candle][i_low] = min(ohlcvs[candle][i_low], trade['price'])
4767
- ohlcvs[candle][i_close] = trade['price']
4771
+ ohlcvs[candle][i_high] = max(ohlcvs[candle][i_high], price)
4772
+ ohlcvs[candle][i_low] = min(ohlcvs[candle][i_low], price)
4773
+ ohlcvs[candle][i_close] = price
4768
4774
  ohlcvs[candle][i_volume] = self.sum(ohlcvs[candle][i_volume], trade['amount'])
4769
4775
  ohlcvs[candle][i_count] = self.sum(ohlcvs[candle][i_count], 1)
4770
4776
  return ohlcvs
@@ -7186,9 +7192,9 @@ class Exchange(object):
7186
7192
  symbols = self.safe_list(subscription, 'symbols', [])
7187
7193
  symbolsLength = len(symbols)
7188
7194
  if topic == 'ohlcv':
7189
- symbolsAndTimeFrames = self.safe_list(subscription, 'symbolsAndTimeframes', [])
7190
- for i in range(0, len(symbolsAndTimeFrames)):
7191
- symbolAndTimeFrame = symbolsAndTimeFrames[i]
7195
+ symbolsAndTimeframes = self.safe_list(subscription, 'symbolsAndTimeframes', [])
7196
+ for i in range(0, len(symbolsAndTimeframes)):
7197
+ symbolAndTimeFrame = symbolsAndTimeframes[i]
7192
7198
  symbol = self.safe_string(symbolAndTimeFrame, 0)
7193
7199
  timeframe = self.safe_string(symbolAndTimeFrame, 1)
7194
7200
  if (self.ohlcvs is not None) and (symbol in self.ohlcvs):
@@ -7206,6 +7212,9 @@ class Exchange(object):
7206
7212
  elif topic == 'ticker':
7207
7213
  if symbol in self.tickers:
7208
7214
  del self.tickers[symbol]
7215
+ elif topic == 'bidsasks':
7216
+ if symbol in self.bidsasks:
7217
+ del self.bidsasks[symbol]
7209
7218
  else:
7210
7219
  if topic == 'myTrades' and (self.myTrades is not None):
7211
7220
  self.myTrades = None
@@ -7225,3 +7234,9 @@ class Exchange(object):
7225
7234
  tickerSymbol = tickerSymbols[i]
7226
7235
  if tickerSymbol in self.tickers:
7227
7236
  del self.tickers[tickerSymbol]
7237
+ elif topic == 'bidsasks' and (self.bidsasks is not None):
7238
+ bidsaskSymbols = list(self.bidsasks.keys())
7239
+ for i in range(0, len(bidsaskSymbols)):
7240
+ bidsaskSymbol = bidsaskSymbols[i]
7241
+ if bidsaskSymbol in self.bidsasks:
7242
+ del self.bidsasks[bidsaskSymbol]
gate/ccxt/pro/__init__.py CHANGED
@@ -8,7 +8,7 @@ sys.modules['ccxt'] = ccxt_module
8
8
 
9
9
  # ----------------------------------------------------------------------------
10
10
 
11
- __version__ = '4.5.7'
11
+ __version__ = '4.5.8'
12
12
 
13
13
  # ----------------------------------------------------------------------------
14
14
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: gate-io-api
3
- Version: 0.0.91
3
+ Version: 0.0.92
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=3x2DVNUOnPIuqf2M356syZ4ZK53q7aKXvj-nthaaQWk,6126
2
+ gate/ccxt/__init__.py,sha256=z75Sc0ATeZijKEdnNW_9orFQjicDnpT86PTAWxPAeRw,6126
3
3
  gate/ccxt/gate.py,sha256=XvGzHzLcCAoIJMq2olARLjY8D1lj4jQDOIFOx0pBmFw,354283
4
4
  gate/ccxt/abstract/gate.py,sha256=MrRMycFEpZKJ6yC7qi0p_qcwZtU9WJi5bBbVllskGoA,45044
5
- gate/ccxt/async_support/__init__.py,sha256=jPCHaCnylQzDS0grAG4AbSNa2uVsqUjE5CqN0JDlKlc,4859
5
+ gate/ccxt/async_support/__init__.py,sha256=jK_SIlzK6gdxF2M9gkpZfIwFm7I67TB-JdEck_Ppk_0,4859
6
6
  gate/ccxt/async_support/gate.py,sha256=1ryx6TLbpcBubkASNMDuYcBQSFhoPMBmLqxlWqiOPI4,356248
7
7
  gate/ccxt/async_support/base/__init__.py,sha256=aVYSsFi--b4InRs9zDN_wtCpj8odosAB726JdUHavrk,67
8
- gate/ccxt/async_support/base/exchange.py,sha256=oRegJjkuRKReYdiDlqBdVWelkzXoyKbCTI8lskWBCGw,121432
8
+ gate/ccxt/async_support/base/exchange.py,sha256=tZkYR9xQuda7xih3SWPb06AY060rzSNvChWAUGVLijE,121432
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
@@ -16,11 +16,11 @@ gate/ccxt/async_support/base/ws/order_book.py,sha256=uBUaIHhzMRykpmo4BCsdJ-t_Hoz
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
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=z1TCuTKRamNgP_fnQGegYtaE8xe9sFz51x8QyeKZmUI,343891
19
+ gate/ccxt/base/errors.py,sha256=OGhWNvNtRlJOzFx-n1x3ZjTnaPpfWH0Vc0xACS-MeDw,5012
20
+ gate/ccxt/base/exchange.py,sha256=yuPRnQ4rLdYg1JcwVKCjF-7dnQX1p328wCWdHXgALvQ,344628
21
21
  gate/ccxt/base/precise.py,sha256=koce64Yrp6vFbGijJtUt-QQ6XhJgeGTCksZ871FPp_A,8886
22
22
  gate/ccxt/base/types.py,sha256=Gvbogh9i7pPH7Z18xesYeDPribqqwq8uKpOv-YODFBs,11505
23
- gate/ccxt/pro/__init__.py,sha256=ix827NR-PWyQFY2n5V6l9JFi9-nw86sj481UNITS15Q,4173
23
+ gate/ccxt/pro/__init__.py,sha256=HiAdDpJ-_dR0knPw73HXndghlww-2se327dTk5cXfls,4173
24
24
  gate/ccxt/pro/gate.py,sha256=Pl64TJO43NcLrqDGs2oU16bPfFqIjOHllJTkpGMuErI,89805
25
25
  gate/ccxt/static_dependencies/README.md,sha256=3TCvhhn09_Cqf9BDDpao1V7EfKHDpQ6k9oWRsLFixpU,18
26
26
  gate/ccxt/static_dependencies/__init__.py,sha256=tzFje8cloqmiIE6kola3EaYC0SnD1izWnri69hzHsSw,168
@@ -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.91.dist-info/METADATA,sha256=Ej65v84tIZsfZOzKabJb1mvEyIGU-SwM5v-Fnz_8ai0,26827
285
- gate_io_api-0.0.91.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
286
- gate_io_api-0.0.91.dist-info/RECORD,,
284
+ gate_io_api-0.0.92.dist-info/METADATA,sha256=r2XdMunGPC3SaqEgE1gxH2t8kaxHhX2UtAoLVmMc1sk,26827
285
+ gate_io_api-0.0.92.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
286
+ gate_io_api-0.0.92.dist-info/RECORD,,