ccxt 4.2.20__py2.py3-none-any.whl → 4.2.22__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.

Potentially problematic release.


This version of ccxt might be problematic. Click here for more details.

Files changed (62) hide show
  1. ccxt/__init__.py +1 -1
  2. ccxt/abstract/binance.py +3 -0
  3. ccxt/abstract/binancecoinm.py +3 -0
  4. ccxt/abstract/binanceus.py +16 -12
  5. ccxt/abstract/binanceusdm.py +3 -0
  6. ccxt/abstract/gate.py +1 -0
  7. ccxt/abstract/gateio.py +1 -0
  8. ccxt/abstract/novadax.py +22 -18
  9. ccxt/abstract/phemex.py +1 -0
  10. ccxt/async_support/__init__.py +1 -1
  11. ccxt/async_support/base/exchange.py +16 -4
  12. ccxt/async_support/bigone.py +1 -0
  13. ccxt/async_support/binance.py +14 -3
  14. ccxt/async_support/bitget.py +11 -1
  15. ccxt/async_support/bitrue.py +1 -0
  16. ccxt/async_support/bitvavo.py +250 -152
  17. ccxt/async_support/blockchaincom.py +3 -1
  18. ccxt/async_support/bybit.py +49 -10
  19. ccxt/async_support/coinbasepro.py +1 -0
  20. ccxt/async_support/coinex.py +34 -12
  21. ccxt/async_support/deribit.py +145 -0
  22. ccxt/async_support/gate.py +30 -1
  23. ccxt/async_support/novadax.py +27 -23
  24. ccxt/async_support/okcoin.py +3 -0
  25. ccxt/async_support/phemex.py +7 -3
  26. ccxt/async_support/poloniex.py +1 -0
  27. ccxt/async_support/woo.py +1 -1
  28. ccxt/base/exchange.py +17 -5
  29. ccxt/bigone.py +1 -0
  30. ccxt/binance.py +14 -3
  31. ccxt/bitget.py +11 -1
  32. ccxt/bitrue.py +1 -0
  33. ccxt/bitvavo.py +250 -152
  34. ccxt/blockchaincom.py +3 -1
  35. ccxt/bybit.py +49 -10
  36. ccxt/coinbasepro.py +1 -0
  37. ccxt/coinex.py +34 -12
  38. ccxt/deribit.py +145 -0
  39. ccxt/gate.py +30 -1
  40. ccxt/novadax.py +27 -23
  41. ccxt/okcoin.py +3 -0
  42. ccxt/phemex.py +7 -3
  43. ccxt/poloniex.py +1 -0
  44. ccxt/pro/__init__.py +1 -1
  45. ccxt/pro/bequant.py +7 -1
  46. ccxt/pro/binance.py +7 -4
  47. ccxt/pro/binancecoinm.py +7 -1
  48. ccxt/pro/binanceus.py +7 -1
  49. ccxt/pro/bitcoincom.py +7 -1
  50. ccxt/pro/bitget.py +1 -1
  51. ccxt/pro/bitopro.py +7 -3
  52. ccxt/pro/bitrue.py +5 -1
  53. ccxt/pro/bitvavo.py +623 -19
  54. ccxt/pro/lbank.py +1 -1
  55. ccxt/pro/okx.py +10 -2
  56. ccxt/test/test_async.py +14 -1
  57. ccxt/test/test_sync.py +14 -1
  58. ccxt/woo.py +1 -1
  59. {ccxt-4.2.20.dist-info → ccxt-4.2.22.dist-info}/METADATA +4 -4
  60. {ccxt-4.2.20.dist-info → ccxt-4.2.22.dist-info}/RECORD +62 -62
  61. {ccxt-4.2.20.dist-info → ccxt-4.2.22.dist-info}/WHEEL +0 -0
  62. {ccxt-4.2.20.dist-info → ccxt-4.2.22.dist-info}/top_level.txt +0 -0
ccxt/pro/binancecoinm.py CHANGED
@@ -5,11 +5,17 @@
5
5
 
6
6
  from ccxt.pro.binance import binance
7
7
 
8
+ import ccxt.async_support.binancecoinm as binancecoinmRest
9
+
8
10
 
9
11
  class binancecoinm(binance):
10
12
 
11
13
  def describe(self):
12
- return self.deep_extend(super(binancecoinm, self).describe(), {
14
+ # eslint-disable-next-line new-cap
15
+ restInstance = binancecoinmRest()
16
+ restDescribe = restInstance.describe()
17
+ extended = self.deep_extend(super(binancecoinm, self).describe(), restDescribe)
18
+ return self.deep_extend(extended, {
13
19
  'id': 'binancecoinm',
14
20
  'name': 'Binance COIN-M',
15
21
  'urls': {
ccxt/pro/binanceus.py CHANGED
@@ -5,11 +5,17 @@
5
5
 
6
6
  from ccxt.pro.binance import binance
7
7
 
8
+ import ccxt.async_support.binanceus as binanceusRest
9
+
8
10
 
9
11
  class binanceus(binance):
10
12
 
11
13
  def describe(self):
12
- return self.deep_extend(super(binanceus, self).describe(), {
14
+ # eslint-disable-next-line new-cap
15
+ restInstance = binanceusRest()
16
+ restDescribe = restInstance.describe()
17
+ extended = self.deep_extend(super(binanceus, self).describe(), restDescribe)
18
+ return self.deep_extend(extended, {
13
19
  'id': 'binanceus',
14
20
  'name': 'Binance US',
15
21
  'countries': ['US'], # US
ccxt/pro/bitcoincom.py CHANGED
@@ -5,11 +5,17 @@
5
5
 
6
6
  from ccxt.pro.hitbtc import hitbtc
7
7
 
8
+ import ccxt.async_support.bequant as bequantRest
9
+
8
10
 
9
11
  class bitcoincom(hitbtc):
10
12
 
11
13
  def describe(self):
12
- return self.deep_extend(super(bitcoincom, self).describe(), {
14
+ # eslint-disable-next-line new-cap
15
+ restInstance = bequantRest()
16
+ restDescribe = restInstance.describe()
17
+ extended = self.deep_extend(super(bitcoincom, self).describe(), restDescribe)
18
+ return self.deep_extend(extended, {
13
19
  'id': 'bitcoincom',
14
20
  'name': 'bitcoin.com',
15
21
  'countries': ['KN'],
ccxt/pro/bitget.py CHANGED
@@ -1184,7 +1184,7 @@ class bitget(ccxt.async_support.bitget):
1184
1184
  'price': self.safe_string(order, 'price'),
1185
1185
  'stopPrice': triggerPrice,
1186
1186
  'triggerPrice': triggerPrice,
1187
- 'amount': self.safe_string_2(order, 'size', 'baseSize'),
1187
+ 'amount': self.safe_string(order, 'baseVolume'),
1188
1188
  'cost': self.safe_string_n(order, ['notional', 'notionalUsd', 'quoteSize']),
1189
1189
  'average': self.omit_zero(self.safe_string_2(order, 'priceAvg', 'fillPrice')),
1190
1190
  'filled': self.safe_string_2(order, 'accBaseVolume', 'baseVolume'),
ccxt/pro/bitopro.py CHANGED
@@ -29,8 +29,8 @@ class bitopro(ccxt.async_support.bitopro):
29
29
  },
30
30
  'urls': {
31
31
  'ws': {
32
- 'public': 'wss://stream.bitopro.com:9443/ws/v1/pub',
33
- 'private': 'wss://stream.bitopro.com:9443/ws/v1/pub/auth',
32
+ 'public': 'wss://stream.bitopro.com:443/ws/v1/pub',
33
+ 'private': 'wss://stream.bitopro.com:443/ws/v1/pub/auth',
34
34
  },
35
35
  },
36
36
  'requiredCredentials': {
@@ -57,6 +57,7 @@ class bitopro(ccxt.async_support.bitopro):
57
57
  async def watch_order_book(self, symbol: str, limit: Int = None, params={}) -> OrderBook:
58
58
  """
59
59
  watches information on open orders with bid(buy) and ask(sell) prices, volumes and other data
60
+ :see: https://github.com/bitoex/bitopro-offical-api-docs/blob/master/ws/public/order_book_stream.md
60
61
  :param str symbol: unified symbol of the market to fetch the order book for
61
62
  :param int [limit]: the maximum amount of order book entries to return
62
63
  :param dict [params]: extra parameters specific to the exchange API endpoint
@@ -115,6 +116,7 @@ class bitopro(ccxt.async_support.bitopro):
115
116
  async def watch_trades(self, symbol: str, since: Int = None, limit: Int = None, params={}) -> List[Trade]:
116
117
  """
117
118
  get the list of most recent trades for a particular symbol
119
+ :see: https://github.com/bitoex/bitopro-offical-api-docs/blob/master/ws/public/trade_stream.md
118
120
  :param str symbol: unified symbol of the market to fetch trades for
119
121
  :param int [since]: timestamp in ms of the earliest trade to fetch
120
122
  :param int [limit]: the maximum amount of trades to fetch
@@ -169,6 +171,7 @@ class bitopro(ccxt.async_support.bitopro):
169
171
  async def watch_ticker(self, symbol: str, params={}) -> Ticker:
170
172
  """
171
173
  watches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
174
+ :see: https://github.com/bitoex/bitopro-offical-api-docs/blob/master/ws/public/ticker_stream.md
172
175
  :param str symbol: unified symbol of the market to fetch the ticker for
173
176
  :param dict [params]: extra parameters specific to the exchange API endpoint
174
177
  :returns dict: a `ticker structure <https://docs.ccxt.com/#/?id=ticker-structure>`
@@ -221,7 +224,7 @@ class bitopro(ccxt.async_support.bitopro):
221
224
  'identity': self.login,
222
225
  })
223
226
  payload = self.string_to_base64(rawData)
224
- signature = self.hmac(payload, self.encode(self.secret), hashlib.sha384)
227
+ signature = self.hmac(self.encode(payload), self.encode(self.secret), hashlib.sha384)
225
228
  defaultOptions = {
226
229
  'ws': {
227
230
  'options': {
@@ -245,6 +248,7 @@ class bitopro(ccxt.async_support.bitopro):
245
248
  async def watch_balance(self, params={}) -> Balances:
246
249
  """
247
250
  watch balance and get the amount of funds available for trading or funds locked in orders
251
+ :see: https://github.com/bitoex/bitopro-offical-api-docs/blob/master/ws/private/user_balance_stream.md
248
252
  :param dict [params]: extra parameters specific to the exchange API endpoint
249
253
  :returns dict: a `balance structure <https://docs.ccxt.com/#/?id=balance-structure>`
250
254
  """
ccxt/pro/bitrue.py CHANGED
@@ -341,7 +341,11 @@ class bitrue(ccxt.async_support.bitrue):
341
341
  symbol = market['symbol']
342
342
  timestamp = self.safe_integer(message, 'ts')
343
343
  tick = self.safe_value(message, 'tick', {})
344
- orderbook = self.parse_order_book(tick, symbol, timestamp, 'buys', 'asks')
344
+ orderbook = self.safe_value(self.orderbooks, symbol)
345
+ if orderbook is None:
346
+ orderbook = self.order_book()
347
+ snapshot = self.parse_order_book(tick, symbol, timestamp, 'buys', 'asks')
348
+ orderbook.reset(snapshot)
345
349
  self.orderbooks[symbol] = orderbook
346
350
  messageHash = 'orderbook:' + symbol
347
351
  client.resolve(orderbook, messageHash)