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.
- ccxt/__init__.py +1 -1
- ccxt/abstract/binance.py +3 -0
- ccxt/abstract/binancecoinm.py +3 -0
- ccxt/abstract/binanceus.py +16 -12
- ccxt/abstract/binanceusdm.py +3 -0
- ccxt/abstract/gate.py +1 -0
- ccxt/abstract/gateio.py +1 -0
- ccxt/abstract/novadax.py +22 -18
- ccxt/abstract/phemex.py +1 -0
- ccxt/async_support/__init__.py +1 -1
- ccxt/async_support/base/exchange.py +16 -4
- ccxt/async_support/bigone.py +1 -0
- ccxt/async_support/binance.py +14 -3
- ccxt/async_support/bitget.py +11 -1
- ccxt/async_support/bitrue.py +1 -0
- ccxt/async_support/bitvavo.py +250 -152
- ccxt/async_support/blockchaincom.py +3 -1
- ccxt/async_support/bybit.py +49 -10
- ccxt/async_support/coinbasepro.py +1 -0
- ccxt/async_support/coinex.py +34 -12
- ccxt/async_support/deribit.py +145 -0
- ccxt/async_support/gate.py +30 -1
- ccxt/async_support/novadax.py +27 -23
- ccxt/async_support/okcoin.py +3 -0
- ccxt/async_support/phemex.py +7 -3
- ccxt/async_support/poloniex.py +1 -0
- ccxt/async_support/woo.py +1 -1
- ccxt/base/exchange.py +17 -5
- ccxt/bigone.py +1 -0
- ccxt/binance.py +14 -3
- ccxt/bitget.py +11 -1
- ccxt/bitrue.py +1 -0
- ccxt/bitvavo.py +250 -152
- ccxt/blockchaincom.py +3 -1
- ccxt/bybit.py +49 -10
- ccxt/coinbasepro.py +1 -0
- ccxt/coinex.py +34 -12
- ccxt/deribit.py +145 -0
- ccxt/gate.py +30 -1
- ccxt/novadax.py +27 -23
- ccxt/okcoin.py +3 -0
- ccxt/phemex.py +7 -3
- ccxt/poloniex.py +1 -0
- ccxt/pro/__init__.py +1 -1
- ccxt/pro/bequant.py +7 -1
- ccxt/pro/binance.py +7 -4
- ccxt/pro/binancecoinm.py +7 -1
- ccxt/pro/binanceus.py +7 -1
- ccxt/pro/bitcoincom.py +7 -1
- ccxt/pro/bitget.py +1 -1
- ccxt/pro/bitopro.py +7 -3
- ccxt/pro/bitrue.py +5 -1
- ccxt/pro/bitvavo.py +623 -19
- ccxt/pro/lbank.py +1 -1
- ccxt/pro/okx.py +10 -2
- ccxt/test/test_async.py +14 -1
- ccxt/test/test_sync.py +14 -1
- ccxt/woo.py +1 -1
- {ccxt-4.2.20.dist-info → ccxt-4.2.22.dist-info}/METADATA +4 -4
- {ccxt-4.2.20.dist-info → ccxt-4.2.22.dist-info}/RECORD +62 -62
- {ccxt-4.2.20.dist-info → ccxt-4.2.22.dist-info}/WHEEL +0 -0
- {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
|
-
|
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
|
-
|
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
|
-
|
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.
|
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:
|
33
|
-
'private': 'wss://stream.bitopro.com:
|
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.
|
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)
|