ccxt 4.3.45__py2.py3-none-any.whl → 4.3.47__py2.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.
ccxt/pro/coinex.py CHANGED
@@ -631,12 +631,13 @@ class coinex(ccxt.async_support.coinex):
631
631
  # "id": null
632
632
  # }
633
633
  #
634
+ isSwap = client.url.find('perpetual') >= 0
635
+ marketType = 'swap' if isSwap else 'spot'
634
636
  params = self.safe_value(message, 'params', [])
635
637
  fullOrderBook = self.safe_value(params, 0)
636
638
  orderbook = self.safe_value(params, 1)
637
639
  marketId = self.safe_string(params, 2)
638
- defaultType = self.safe_string(self.options, 'defaultType')
639
- market = self.safe_market(marketId, None, None, defaultType)
640
+ market = self.safe_market(marketId, None, None, marketType)
640
641
  symbol = market['symbol']
641
642
  name = 'orderbook'
642
643
  messageHash = name + ':' + symbol
ccxt/tokocrypto.py CHANGED
@@ -31,7 +31,7 @@ from ccxt.base.errors import OnMaintenance
31
31
  from ccxt.base.errors import InvalidNonce
32
32
  from ccxt.base.errors import RequestTimeout
33
33
  from ccxt.base.decimal_to_precision import TRUNCATE
34
- from ccxt.base.decimal_to_precision import DECIMAL_PLACES
34
+ from ccxt.base.decimal_to_precision import TICK_SIZE
35
35
  from ccxt.base.precise import Precise
36
36
 
37
37
 
@@ -234,7 +234,7 @@ class tokocrypto(Exchange, ImplicitAPI):
234
234
  'maker': self.parse_number('0.0075'), # 0.1% trading fee, zero fees for all trading pairs before November 1
235
235
  },
236
236
  },
237
- 'precisionMode': DECIMAL_PLACES,
237
+ 'precisionMode': TICK_SIZE,
238
238
  'options': {
239
239
  # 'fetchTradesMethod': 'binanceGetTrades', # binanceGetTrades, binanceGetAggTrades
240
240
  'createMarketBuyOrderRequiresPrice': True,
@@ -734,10 +734,10 @@ class tokocrypto(Exchange, ImplicitAPI):
734
734
  'strike': None,
735
735
  'optionType': None,
736
736
  'precision': {
737
- 'amount': self.safe_integer(market, 'quantityPrecision'),
738
- 'price': self.safe_integer(market, 'pricePrecision'),
739
- 'base': self.safe_integer(market, 'baseAssetPrecision'),
740
- 'quote': self.safe_integer(market, 'quotePrecision'),
737
+ 'amount': self.parse_number(self.parse_precision(self.safe_string(market, 'quantityPrecision'))),
738
+ 'price': self.parse_number(self.parse_precision(self.safe_string(market, 'pricePrecision'))),
739
+ 'base': self.parse_number(self.parse_precision(self.safe_string(market, 'baseAssetPrecision'))),
740
+ 'quote': self.parse_number(self.parse_precision(self.safe_string(market, 'quotePrecision'))),
741
741
  },
742
742
  'limits': {
743
743
  'leverage': {
@@ -762,8 +762,7 @@ class tokocrypto(Exchange, ImplicitAPI):
762
762
  }
763
763
  if 'PRICE_FILTER' in filtersByType:
764
764
  filter = self.safe_value(filtersByType, 'PRICE_FILTER', {})
765
- tickSize = self.safe_string(filter, 'tickSize')
766
- entry['precision']['price'] = self.precision_from_string(tickSize)
765
+ entry['precision']['price'] = self.safe_number(filter, 'tickSize')
767
766
  # PRICE_FILTER reports zero values for maxPrice
768
767
  # since they updated filter types in November 2018
769
768
  # https://github.com/ccxt/ccxt/issues/4286
@@ -772,11 +771,10 @@ class tokocrypto(Exchange, ImplicitAPI):
772
771
  'min': self.safe_number(filter, 'minPrice'),
773
772
  'max': self.safe_number(filter, 'maxPrice'),
774
773
  }
775
- entry['precision']['price'] = self.precision_from_string(filter['tickSize'])
774
+ entry['precision']['price'] = filter['tickSize']
776
775
  if 'LOT_SIZE' in filtersByType:
777
776
  filter = self.safe_value(filtersByType, 'LOT_SIZE', {})
778
- stepSize = self.safe_string(filter, 'stepSize')
779
- entry['precision']['amount'] = self.precision_from_string(stepSize)
777
+ entry['precision']['amount'] = self.safe_number(filter, 'stepSize')
780
778
  entry['limits']['amount'] = {
781
779
  'min': self.safe_number(filter, 'minQty'),
782
780
  'max': self.safe_number(filter, 'maxQty'),
ccxt/wavesexchange.py CHANGED
@@ -33,6 +33,7 @@ class wavesexchange(Exchange, ImplicitAPI):
33
33
  'countries': ['CH'], # Switzerland
34
34
  'certified': False,
35
35
  'pro': False,
36
+ 'dex': True,
36
37
  'has': {
37
38
  'CORS': None,
38
39
  'spot': True,
ccxt/woofipro.py CHANGED
@@ -32,6 +32,7 @@ class woofipro(Exchange, ImplicitAPI):
32
32
  'version': 'v1',
33
33
  'certified': True,
34
34
  'pro': True,
35
+ 'dex': True,
35
36
  'hostname': 'dex.woo.org',
36
37
  'has': {
37
38
  'CORS': None,