ccxt 3.1.13__py2.py3-none-any.whl → 3.1.15__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/__init__.py +1 -1
- ccxt/async_support/__init__.py +1 -1
- ccxt/async_support/base/exchange.py +30 -13
- ccxt/async_support/huobi.py +4 -1
- ccxt/async_support/okx.py +1 -0
- ccxt/async_support/poloniex.py +1 -1
- ccxt/base/exchange.py +30 -13
- ccxt/huobi.py +4 -1
- ccxt/okx.py +1 -0
- ccxt/poloniex.py +1 -1
- ccxt/pro/__init__.py +3 -1
- ccxt/pro/alpaca.py +3 -3
- ccxt/pro/ascendex.py +2 -2
- ccxt/pro/binance.py +7 -5
- ccxt/pro/bitfinex.py +1 -1
- ccxt/pro/bitfinex2.py +3 -3
- ccxt/pro/bitget.py +3 -3
- ccxt/pro/bitmart.py +2 -2
- ccxt/pro/bitmex.py +3 -3
- ccxt/pro/bitopro.py +1 -1
- ccxt/pro/bitpanda.py +1 -1
- ccxt/pro/bitstamp.py +2 -2
- ccxt/pro/bittrex.py +3 -3
- ccxt/pro/bitvavo.py +3 -3
- ccxt/pro/blockchaincom.py +2 -2
- ccxt/pro/btcex.py +3 -3
- ccxt/pro/bybit.py +3 -3
- ccxt/pro/cex.py +2 -2
- ccxt/pro/coinbasepro.py +3 -3
- ccxt/pro/coinex.py +18 -12
- ccxt/pro/cryptocom.py +3 -3
- ccxt/pro/currencycom.py +2 -2
- ccxt/pro/deribit.py +3 -3
- ccxt/pro/exmo.py +2 -2
- ccxt/pro/gate.py +4 -4
- ccxt/pro/gemini.py +2 -2
- ccxt/pro/hitbtc.py +2 -2
- ccxt/pro/hollaex.py +2 -2
- ccxt/pro/huobi.py +4 -4
- ccxt/pro/huobijp.py +2 -2
- ccxt/pro/idex.py +3 -3
- ccxt/pro/independentreserve.py +1 -1
- ccxt/pro/kraken.py +2 -2
- ccxt/pro/krakenfutures.py +4 -4
- ccxt/pro/kucoin.py +3 -3
- ccxt/pro/kucoinfutures.py +1 -1
- ccxt/pro/luno.py +1 -1
- ccxt/pro/mexc.py +3 -3
- ccxt/pro/ndax.py +2 -2
- ccxt/pro/okcoin.py +3 -3
- ccxt/pro/okx.py +2 -2
- ccxt/pro/phemex.py +3 -3
- ccxt/pro/poloniex.py +973 -0
- ccxt/pro/poloniexfutures.py +1 -1
- ccxt/pro/probit.py +2 -2
- ccxt/pro/upbit.py +1 -1
- ccxt/pro/wazirx.py +3 -3
- ccxt/pro/whitebit.py +4 -4
- ccxt/pro/woo.py +2 -2
- ccxt/test/base/test_shared_methods.py +13 -13
- {ccxt-3.1.13.dist-info → ccxt-3.1.15.dist-info}/METADATA +5 -5
- {ccxt-3.1.13.dist-info → ccxt-3.1.15.dist-info}/RECORD +64 -63
- {ccxt-3.1.13.dist-info → ccxt-3.1.15.dist-info}/WHEEL +0 -0
- {ccxt-3.1.13.dist-info → ccxt-3.1.15.dist-info}/top_level.txt +0 -0
ccxt/pro/btcex.py
CHANGED
@@ -161,7 +161,7 @@ class btcex(ccxt.async_support.btcex):
|
|
161
161
|
ohlcv = await self.watch(url, messageHash, request, messageHash, request)
|
162
162
|
if self.newUpdates:
|
163
163
|
limit = ohlcv.getLimit(symbol, limit)
|
164
|
-
return self.filter_by_since_limit(ohlcv, since, limit, 0)
|
164
|
+
return self.filter_by_since_limit(ohlcv, since, limit, 0, True)
|
165
165
|
|
166
166
|
def handle_ohlcv(self, client: Client, message):
|
167
167
|
#
|
@@ -298,7 +298,7 @@ class btcex(ccxt.async_support.btcex):
|
|
298
298
|
trades = await self.watch(url, messageHash, request, messageHash, request)
|
299
299
|
if self.newUpdates:
|
300
300
|
limit = trades.getLimit(symbol, limit)
|
301
|
-
return self.filter_by_since_limit(trades, since, limit, 'timestamp')
|
301
|
+
return self.filter_by_since_limit(trades, since, limit, 'timestamp', True)
|
302
302
|
|
303
303
|
def handle_trades(self, client: Client, message):
|
304
304
|
#
|
@@ -371,7 +371,7 @@ class btcex(ccxt.async_support.btcex):
|
|
371
371
|
trades = await self.watch(url, messageHash, request, messageHash)
|
372
372
|
if self.newUpdates:
|
373
373
|
limit = trades.getLimit(symbol, limit)
|
374
|
-
return self.filter_by_symbol_since_limit(trades, symbol, since, limit)
|
374
|
+
return self.filter_by_symbol_since_limit(trades, symbol, since, limit, True)
|
375
375
|
|
376
376
|
def handle_my_trades(self, client: Client, message):
|
377
377
|
#
|
ccxt/pro/bybit.py
CHANGED
@@ -328,7 +328,7 @@ class bybit(ccxt.async_support.bybit):
|
|
328
328
|
ohlcv = await self.watch_topics(url, messageHash, topics, params)
|
329
329
|
if self.newUpdates:
|
330
330
|
limit = ohlcv.getLimit(symbol, limit)
|
331
|
-
return self.filter_by_since_limit(ohlcv, since, limit, 0)
|
331
|
+
return self.filter_by_since_limit(ohlcv, since, limit, 0, True)
|
332
332
|
|
333
333
|
def handle_ohlcv(self, client: Client, message):
|
334
334
|
#
|
@@ -519,7 +519,7 @@ class bybit(ccxt.async_support.bybit):
|
|
519
519
|
trades = await self.watch_topics(url, messageHash, [topic], params)
|
520
520
|
if self.newUpdates:
|
521
521
|
limit = trades.getLimit(symbol, limit)
|
522
|
-
return self.filter_by_since_limit(trades, since, limit, 'timestamp')
|
522
|
+
return self.filter_by_since_limit(trades, since, limit, 'timestamp', True)
|
523
523
|
|
524
524
|
def handle_trades(self, client: Client, message):
|
525
525
|
#
|
@@ -665,7 +665,7 @@ class bybit(ccxt.async_support.bybit):
|
|
665
665
|
trades = await self.watch_topics(url, messageHash, [topic], params)
|
666
666
|
if self.newUpdates:
|
667
667
|
limit = trades.getLimit(symbol, limit)
|
668
|
-
return self.filter_by_since_limit(trades, since, limit, 'timestamp')
|
668
|
+
return self.filter_by_since_limit(trades, since, limit, 'timestamp', True)
|
669
669
|
|
670
670
|
def handle_my_trades(self, client: Client, message):
|
671
671
|
#
|
ccxt/pro/cex.py
CHANGED
@@ -140,7 +140,7 @@ class cex(ccxt.async_support.cex):
|
|
140
140
|
# assing symbol to the trades does not contain symbol information
|
141
141
|
for i in range(0, len(trades)):
|
142
142
|
trades[i]['symbol'] = symbol
|
143
|
-
return self.filter_by_since_limit(trades, since, limit, 'timestamp')
|
143
|
+
return self.filter_by_since_limit(trades, since, limit, 'timestamp', True)
|
144
144
|
|
145
145
|
def handle_trades_snapshot(self, client: Client, message):
|
146
146
|
#
|
@@ -949,7 +949,7 @@ class cex(ccxt.async_support.cex):
|
|
949
949
|
ohlcv = await self.watch(url, messageHash, self.extend(request, params), messageHash)
|
950
950
|
if self.newUpdates:
|
951
951
|
limit = ohlcv.getLimit(symbol, limit)
|
952
|
-
return self.filter_by_since_limit(ohlcv, since, limit, 0)
|
952
|
+
return self.filter_by_since_limit(ohlcv, since, limit, 0, True)
|
953
953
|
|
954
954
|
def handle_init_ohlcv(self, client: Client, message):
|
955
955
|
#
|
ccxt/pro/coinbasepro.py
CHANGED
@@ -99,7 +99,7 @@ class coinbasepro(ccxt.async_support.coinbasepro):
|
|
99
99
|
trades = await self.subscribe(name, symbol, name, params)
|
100
100
|
if self.newUpdates:
|
101
101
|
limit = trades.getLimit(symbol, limit)
|
102
|
-
return self.filter_by_since_limit(trades, since, limit, 'timestamp')
|
102
|
+
return self.filter_by_since_limit(trades, since, limit, 'timestamp', True)
|
103
103
|
|
104
104
|
async def watch_my_trades(self, symbol: Optional[str] = None, since: Optional[int] = None, limit: Optional[int] = None, params={}):
|
105
105
|
"""
|
@@ -120,7 +120,7 @@ class coinbasepro(ccxt.async_support.coinbasepro):
|
|
120
120
|
trades = await self.subscribe(name, symbol, messageHash, self.extend(params, authentication))
|
121
121
|
if self.newUpdates:
|
122
122
|
limit = trades.getLimit(symbol, limit)
|
123
|
-
return self.filter_by_since_limit(trades, since, limit, 'timestamp')
|
123
|
+
return self.filter_by_since_limit(trades, since, limit, 'timestamp', True)
|
124
124
|
|
125
125
|
async def watch_orders(self, symbol: Optional[str] = None, since: Optional[int] = None, limit: Optional[int] = None, params={}):
|
126
126
|
"""
|
@@ -141,7 +141,7 @@ class coinbasepro(ccxt.async_support.coinbasepro):
|
|
141
141
|
orders = await self.subscribe(name, symbol, messageHash, self.extend(params, authentication))
|
142
142
|
if self.newUpdates:
|
143
143
|
limit = orders.getLimit(symbol, limit)
|
144
|
-
return self.filter_by_since_limit(orders, since, limit, 'timestamp')
|
144
|
+
return self.filter_by_since_limit(orders, since, limit, 'timestamp', True)
|
145
145
|
|
146
146
|
async def watch_order_book(self, symbol: str, limit: Optional[int] = None, params={}):
|
147
147
|
"""
|
ccxt/pro/coinex.py
CHANGED
@@ -145,10 +145,19 @@ class coinex(ccxt.async_support.coinex):
|
|
145
145
|
symbol = self.safe_symbol(marketId, None, None, defaultType)
|
146
146
|
market = self.safe_market(marketId, None, None, defaultType)
|
147
147
|
parsedTicker = self.parse_ws_ticker(rawTicker, market)
|
148
|
-
messageHash = 'ticker:' + symbol
|
149
148
|
self.tickers[symbol] = parsedTicker
|
150
149
|
newTickers.append(parsedTicker)
|
151
|
-
|
150
|
+
messageHashes = self.find_message_hashes(client, 'tickers::')
|
151
|
+
for i in range(0, len(messageHashes)):
|
152
|
+
messageHash = messageHashes[i]
|
153
|
+
parts = messageHash.split('::')
|
154
|
+
symbolsString = parts[1]
|
155
|
+
symbols = symbolsString.split(',')
|
156
|
+
tickers = self.filter_by_array(newTickers, 'symbol', symbols)
|
157
|
+
tickersSymbols = list(tickers.keys())
|
158
|
+
numTickers = len(tickersSymbols)
|
159
|
+
if numTickers > 0:
|
160
|
+
client.resolve(tickers, messageHash)
|
152
161
|
client.resolve(newTickers, 'tickers')
|
153
162
|
|
154
163
|
def parse_ws_ticker(self, ticker, market=None):
|
@@ -388,21 +397,18 @@ class coinex(ccxt.async_support.coinex):
|
|
388
397
|
type, params = self.handle_market_type_and_params('watchTickers', None, params)
|
389
398
|
url = self.urls['api']['ws'][type]
|
390
399
|
messageHash = 'tickers'
|
400
|
+
if symbols is not None:
|
401
|
+
messageHash = 'tickers::' + ','.join(symbols)
|
391
402
|
subscribe = {
|
392
403
|
'method': 'state.subscribe',
|
393
404
|
'id': self.request_id(),
|
394
405
|
'params': [],
|
395
406
|
}
|
396
407
|
request = self.deep_extend(subscribe, params)
|
397
|
-
|
398
|
-
|
399
|
-
|
400
|
-
|
401
|
-
if resultLength > 0:
|
402
|
-
if self.newUpdates:
|
403
|
-
return result
|
404
|
-
return self.filter_by_array(self.tickers, 'symbol', symbols)
|
405
|
-
return await self.watch_tickers(symbols, params)
|
408
|
+
newTickers = await self.watch(url, messageHash, request, messageHash)
|
409
|
+
if self.newUpdates:
|
410
|
+
return newTickers
|
411
|
+
return self.filter_by_array(self.tickers, 'symbol', symbols)
|
406
412
|
|
407
413
|
async def watch_trades(self, symbol: str, since: Optional[int] = None, limit: Optional[int] = None, params={}):
|
408
414
|
"""
|
@@ -432,7 +438,7 @@ class coinex(ccxt.async_support.coinex):
|
|
432
438
|
self.options['watchTradesSubscriptions'] = subscribedSymbols
|
433
439
|
request = self.deep_extend(message, params)
|
434
440
|
trades = await self.watch(url, messageHash, request, subscriptionHash)
|
435
|
-
return self.filter_by_since_limit(trades, since, limit, 'timestamp')
|
441
|
+
return self.filter_by_since_limit(trades, since, limit, 'timestamp', True)
|
436
442
|
|
437
443
|
async def watch_order_book(self, symbol: str, limit: Optional[int] = None, params={}):
|
438
444
|
"""
|
ccxt/pro/cryptocom.py
CHANGED
@@ -127,7 +127,7 @@ class cryptocom(ccxt.async_support.cryptocom):
|
|
127
127
|
trades = await self.watch_public(messageHash, params)
|
128
128
|
if self.newUpdates:
|
129
129
|
limit = trades.getLimit(symbol, limit)
|
130
|
-
return self.filter_by_since_limit(trades, since, limit, 'timestamp')
|
130
|
+
return self.filter_by_since_limit(trades, since, limit, 'timestamp', True)
|
131
131
|
|
132
132
|
def handle_trades(self, client: Client, message):
|
133
133
|
#
|
@@ -189,7 +189,7 @@ class cryptocom(ccxt.async_support.cryptocom):
|
|
189
189
|
trades = await self.watch_private(messageHash, params)
|
190
190
|
if self.newUpdates:
|
191
191
|
limit = trades.getLimit(symbol, limit)
|
192
|
-
return self.filter_by_symbol_since_limit(trades, symbol, since, limit)
|
192
|
+
return self.filter_by_symbol_since_limit(trades, symbol, since, limit, True)
|
193
193
|
|
194
194
|
async def watch_ticker(self, symbol: str, params={}):
|
195
195
|
"""
|
@@ -259,7 +259,7 @@ class cryptocom(ccxt.async_support.cryptocom):
|
|
259
259
|
ohlcv = await self.watch_public(messageHash, params)
|
260
260
|
if self.newUpdates:
|
261
261
|
limit = ohlcv.getLimit(symbol, limit)
|
262
|
-
return self.filter_by_since_limit(ohlcv, since, limit, 0)
|
262
|
+
return self.filter_by_since_limit(ohlcv, since, limit, 0, True)
|
263
263
|
|
264
264
|
def handle_ohlcv(self, client: Client, message):
|
265
265
|
#
|
ccxt/pro/currencycom.py
CHANGED
@@ -371,7 +371,7 @@ class currencycom(ccxt.async_support.currencycom):
|
|
371
371
|
trades = await self.watch_public('trades.subscribe', symbol, params)
|
372
372
|
if self.newUpdates:
|
373
373
|
limit = trades.getLimit(symbol, limit)
|
374
|
-
return self.filter_by_since_limit(trades, since, limit, 'timestamp')
|
374
|
+
return self.filter_by_since_limit(trades, since, limit, 'timestamp', True)
|
375
375
|
|
376
376
|
async def watch_order_book(self, symbol: str, limit: Optional[int] = None, params={}):
|
377
377
|
"""
|
@@ -412,7 +412,7 @@ class currencycom(ccxt.async_support.currencycom):
|
|
412
412
|
ohlcv = await self.watch_public(messageHash, symbol, self.extend(request, params))
|
413
413
|
if self.newUpdates:
|
414
414
|
limit = ohlcv.getLimit(symbol, limit)
|
415
|
-
return self.filter_by_since_limit(ohlcv, since, limit, 0)
|
415
|
+
return self.filter_by_since_limit(ohlcv, since, limit, 0, True)
|
416
416
|
|
417
417
|
def handle_deltas(self, bookside, deltas):
|
418
418
|
prices = list(deltas.keys())
|
ccxt/pro/deribit.py
CHANGED
@@ -241,7 +241,7 @@ class deribit(ccxt.async_support.deribit):
|
|
241
241
|
trades = await self.watch(url, channel, request, channel, request)
|
242
242
|
if self.newUpdates:
|
243
243
|
limit = trades.getLimit(symbol, limit)
|
244
|
-
return self.filter_by_since_limit(trades, since, limit, 'timestamp')
|
244
|
+
return self.filter_by_since_limit(trades, since, limit, 'timestamp', True)
|
245
245
|
|
246
246
|
def handle_trades(self, client: Client, message):
|
247
247
|
#
|
@@ -313,7 +313,7 @@ class deribit(ccxt.async_support.deribit):
|
|
313
313
|
}
|
314
314
|
request = self.deep_extend(message, params)
|
315
315
|
trades = await self.watch(url, channel, request, channel, request)
|
316
|
-
return self.filter_by_symbol_since_limit(trades, symbol, since, limit)
|
316
|
+
return self.filter_by_symbol_since_limit(trades, symbol, since, limit, True)
|
317
317
|
|
318
318
|
def handle_my_trades(self, client: Client, message):
|
319
319
|
#
|
@@ -601,7 +601,7 @@ class deribit(ccxt.async_support.deribit):
|
|
601
601
|
ohlcv = await self.watch(url, channel, request, channel, request)
|
602
602
|
if self.newUpdates:
|
603
603
|
limit = ohlcv.getLimit(market['symbol'], limit)
|
604
|
-
return self.filter_by_since_limit(ohlcv, since, limit, 0)
|
604
|
+
return self.filter_by_since_limit(ohlcv, since, limit, 0, True)
|
605
605
|
|
606
606
|
def handle_ohlcv(self, client: Client, message):
|
607
607
|
#
|
ccxt/pro/exmo.py
CHANGED
@@ -273,7 +273,7 @@ class exmo(ccxt.async_support.exmo):
|
|
273
273
|
}
|
274
274
|
request = self.deep_extend(message, params)
|
275
275
|
trades = await self.watch(url, messageHash, request, messageHash, request)
|
276
|
-
return self.filter_by_since_limit(trades, since, limit, 'timestamp')
|
276
|
+
return self.filter_by_since_limit(trades, since, limit, 'timestamp', True)
|
277
277
|
|
278
278
|
def handle_trades(self, client: Client, message):
|
279
279
|
#
|
@@ -339,7 +339,7 @@ class exmo(ccxt.async_support.exmo):
|
|
339
339
|
}
|
340
340
|
request = self.deep_extend(message, query)
|
341
341
|
trades = await self.watch(url, messageHash, request, messageHash, request)
|
342
|
-
return self.filter_by_symbol_since_limit(trades, symbol, since, limit)
|
342
|
+
return self.filter_by_symbol_since_limit(trades, symbol, since, limit, True)
|
343
343
|
|
344
344
|
def handle_my_trades(self, client: Client, message):
|
345
345
|
#
|
ccxt/pro/gate.py
CHANGED
@@ -367,7 +367,7 @@ class gate(ccxt.async_support.gate):
|
|
367
367
|
trades = await self.subscribe_public(url, messageHash, payload, channel, params)
|
368
368
|
if self.newUpdates:
|
369
369
|
limit = trades.getLimit(symbol, limit)
|
370
|
-
return self.filter_by_since_limit(trades, since, limit, 'timestamp')
|
370
|
+
return self.filter_by_since_limit(trades, since, limit, 'timestamp', True)
|
371
371
|
|
372
372
|
def handle_trades(self, client: Client, message):
|
373
373
|
#
|
@@ -425,7 +425,7 @@ class gate(ccxt.async_support.gate):
|
|
425
425
|
ohlcv = await self.subscribe_public(url, messageHash, payload, channel, params)
|
426
426
|
if self.newUpdates:
|
427
427
|
limit = ohlcv.getLimit(symbol, limit)
|
428
|
-
return self.filter_by_since_limit(ohlcv, since, limit, 0)
|
428
|
+
return self.filter_by_since_limit(ohlcv, since, limit, 0, True)
|
429
429
|
|
430
430
|
def handle_ohlcv(self, client: Client, message):
|
431
431
|
#
|
@@ -515,7 +515,7 @@ class gate(ccxt.async_support.gate):
|
|
515
515
|
trades = await self.subscribe_private(url, messageHash, payload, channel, params, requiresUid)
|
516
516
|
if self.newUpdates:
|
517
517
|
limit = trades.getLimit(symbol, limit)
|
518
|
-
return self.filter_by_symbol_since_limit(trades, symbol, since, limit)
|
518
|
+
return self.filter_by_symbol_since_limit(trades, symbol, since, limit, True)
|
519
519
|
|
520
520
|
def handle_my_trades(self, client: Client, message):
|
521
521
|
#
|
@@ -713,7 +713,7 @@ class gate(ccxt.async_support.gate):
|
|
713
713
|
orders = await self.subscribe_private(url, messageHash, payload, channel, query, requiresUid)
|
714
714
|
if self.newUpdates:
|
715
715
|
limit = orders.getLimit(symbol, limit)
|
716
|
-
return self.filter_by_since_limit(orders, since, limit, 'timestamp')
|
716
|
+
return self.filter_by_since_limit(orders, since, limit, 'timestamp', True)
|
717
717
|
|
718
718
|
def handle_order(self, client: Client, message):
|
719
719
|
#
|
ccxt/pro/gemini.py
CHANGED
@@ -67,7 +67,7 @@ class gemini(ccxt.async_support.gemini):
|
|
67
67
|
trades = await self.watch(url, messageHash, request, subscribeHash)
|
68
68
|
if self.newUpdates:
|
69
69
|
limit = trades.getLimit(market['symbol'], limit)
|
70
|
-
return self.filter_by_since_limit(trades, since, limit, 'timestamp')
|
70
|
+
return self.filter_by_since_limit(trades, since, limit, 'timestamp', True)
|
71
71
|
|
72
72
|
def parse_ws_trade(self, trade, market=None):
|
73
73
|
#
|
@@ -211,7 +211,7 @@ class gemini(ccxt.async_support.gemini):
|
|
211
211
|
ohlcv = await self.watch(url, messageHash, request, messageHash)
|
212
212
|
if self.newUpdates:
|
213
213
|
limit = ohlcv.getLimit(symbol, limit)
|
214
|
-
return self.filter_by_since_limit(ohlcv, since, limit, 0)
|
214
|
+
return self.filter_by_since_limit(ohlcv, since, limit, 0, True)
|
215
215
|
|
216
216
|
def handle_ohlcv(self, client: Client, message):
|
217
217
|
#
|
ccxt/pro/hitbtc.py
CHANGED
@@ -206,7 +206,7 @@ class hitbtc(ccxt.async_support.hitbtc):
|
|
206
206
|
trades = await self.watch_public(symbol, 'trades', None, params)
|
207
207
|
if self.newUpdates:
|
208
208
|
limit = trades.getLimit(symbol, limit)
|
209
|
-
return self.filter_by_since_limit(trades, since, limit, 'timestamp')
|
209
|
+
return self.filter_by_since_limit(trades, since, limit, 'timestamp', True)
|
210
210
|
|
211
211
|
def handle_trades(self, client: Client, message):
|
212
212
|
#
|
@@ -279,7 +279,7 @@ class hitbtc(ccxt.async_support.hitbtc):
|
|
279
279
|
ohlcv = await self.watch_public(symbol, 'ohlcv', period, requestParams)
|
280
280
|
if self.newUpdates:
|
281
281
|
limit = ohlcv.getLimit(symbol, limit)
|
282
|
-
return self.filter_by_since_limit(ohlcv, since, limit, 0)
|
282
|
+
return self.filter_by_since_limit(ohlcv, since, limit, 0, True)
|
283
283
|
|
284
284
|
def handle_ohlcv(self, client: Client, message):
|
285
285
|
#
|
ccxt/pro/hollaex.py
CHANGED
@@ -127,7 +127,7 @@ class hollaex(ccxt.async_support.hollaex):
|
|
127
127
|
trades = await self.watch_public(messageHash, params)
|
128
128
|
if self.newUpdates:
|
129
129
|
limit = trades.getLimit(symbol, limit)
|
130
|
-
return self.filter_by_since_limit(trades, since, limit, 'timestamp')
|
130
|
+
return self.filter_by_since_limit(trades, since, limit, 'timestamp', True)
|
131
131
|
|
132
132
|
def handle_trades(self, client: Client, message):
|
133
133
|
#
|
@@ -181,7 +181,7 @@ class hollaex(ccxt.async_support.hollaex):
|
|
181
181
|
trades = await self.watch_private(messageHash, params)
|
182
182
|
if self.newUpdates:
|
183
183
|
limit = trades.getLimit(symbol, limit)
|
184
|
-
return self.filter_by_symbol_since_limit(trades, symbol, since, limit)
|
184
|
+
return self.filter_by_symbol_since_limit(trades, symbol, since, limit, True)
|
185
185
|
|
186
186
|
def handle_my_trades(self, client: Client, message, subscription=None):
|
187
187
|
#
|
ccxt/pro/huobi.py
CHANGED
@@ -204,7 +204,7 @@ class huobi(ccxt.async_support.huobi):
|
|
204
204
|
trades = await self.subscribe_public(url, symbol, messageHash, None, params)
|
205
205
|
if self.newUpdates:
|
206
206
|
limit = trades.getLimit(symbol, limit)
|
207
|
-
return self.filter_by_since_limit(trades, since, limit, 'timestamp')
|
207
|
+
return self.filter_by_since_limit(trades, since, limit, 'timestamp', True)
|
208
208
|
|
209
209
|
def handle_trades(self, client: Client, message):
|
210
210
|
#
|
@@ -264,7 +264,7 @@ class huobi(ccxt.async_support.huobi):
|
|
264
264
|
ohlcv = await self.subscribe_public(url, symbol, messageHash, None, params)
|
265
265
|
if self.newUpdates:
|
266
266
|
limit = ohlcv.getLimit(symbol, limit)
|
267
|
-
return self.filter_by_since_limit(ohlcv, since, limit, 0)
|
267
|
+
return self.filter_by_since_limit(ohlcv, since, limit, 0, True)
|
268
268
|
|
269
269
|
def handle_ohlcv(self, client: Client, message):
|
270
270
|
#
|
@@ -650,7 +650,7 @@ class huobi(ccxt.async_support.huobi):
|
|
650
650
|
trades = await self.subscribe_private(channel, messageHash, type, subType, params)
|
651
651
|
if self.newUpdates:
|
652
652
|
limit = trades.getLimit(symbol, limit)
|
653
|
-
return self.filter_by_symbol_since_limit(trades, symbol, since, limit)
|
653
|
+
return self.filter_by_symbol_since_limit(trades, symbol, since, limit, True)
|
654
654
|
|
655
655
|
def get_order_channel_and_message_hash(self, type, subType, market=None, params={}):
|
656
656
|
messageHash = None
|
@@ -726,7 +726,7 @@ class huobi(ccxt.async_support.huobi):
|
|
726
726
|
orders = await self.subscribe_private(channel, messageHash, type, subType, params)
|
727
727
|
if self.newUpdates:
|
728
728
|
limit = orders.getLimit(symbol, limit)
|
729
|
-
return self.filter_by_since_limit(orders, since, limit, 'timestamp')
|
729
|
+
return self.filter_by_since_limit(orders, since, limit, 'timestamp', True)
|
730
730
|
|
731
731
|
def handle_order(self, client: Client, message):
|
732
732
|
#
|
ccxt/pro/huobijp.py
CHANGED
@@ -139,7 +139,7 @@ class huobijp(ccxt.async_support.huobijp):
|
|
139
139
|
trades = await self.watch(url, messageHash, self.extend(request, params), messageHash, subscription)
|
140
140
|
if self.newUpdates:
|
141
141
|
limit = trades.getLimit(symbol, limit)
|
142
|
-
return self.filter_by_since_limit(trades, since, limit, 'timestamp')
|
142
|
+
return self.filter_by_since_limit(trades, since, limit, 'timestamp', True)
|
143
143
|
|
144
144
|
def handle_trades(self, client: Client, message):
|
145
145
|
#
|
@@ -213,7 +213,7 @@ class huobijp(ccxt.async_support.huobijp):
|
|
213
213
|
ohlcv = await self.watch(url, messageHash, self.extend(request, params), messageHash, subscription)
|
214
214
|
if self.newUpdates:
|
215
215
|
limit = ohlcv.getLimit(symbol, limit)
|
216
|
-
return self.filter_by_since_limit(ohlcv, since, limit, 0)
|
216
|
+
return self.filter_by_since_limit(ohlcv, since, limit, 0, True)
|
217
217
|
|
218
218
|
def handle_ohlcv(self, client: Client, message):
|
219
219
|
#
|
ccxt/pro/idex.py
CHANGED
@@ -155,7 +155,7 @@ class idex(ccxt.async_support.idex):
|
|
155
155
|
trades = await self.subscribe(subscribeObject, messageHash)
|
156
156
|
if self.newUpdates:
|
157
157
|
limit = trades.getLimit(symbol, limit)
|
158
|
-
return self.filter_by_since_limit(trades, since, limit, 'timestamp')
|
158
|
+
return self.filter_by_since_limit(trades, since, limit, 'timestamp', True)
|
159
159
|
|
160
160
|
def handle_trade(self, client: Client, message):
|
161
161
|
type = self.safe_string(message, 'type')
|
@@ -248,7 +248,7 @@ class idex(ccxt.async_support.idex):
|
|
248
248
|
ohlcv = await self.subscribe(subscribeObject, messageHash)
|
249
249
|
if self.newUpdates:
|
250
250
|
limit = ohlcv.getLimit(symbol, limit)
|
251
|
-
return self.filter_by_since_limit(ohlcv, since, limit, 0)
|
251
|
+
return self.filter_by_since_limit(ohlcv, since, limit, 0, True)
|
252
252
|
|
253
253
|
def handle_ohlcv(self, client: Client, message):
|
254
254
|
# {type: 'candles',
|
@@ -494,7 +494,7 @@ class idex(ccxt.async_support.idex):
|
|
494
494
|
orders = await self.subscribe_private(subscribeObject, messageHash)
|
495
495
|
if self.newUpdates:
|
496
496
|
limit = orders.getLimit(symbol, limit)
|
497
|
-
return self.filter_by_since_limit(orders, since, limit, 'timestamp')
|
497
|
+
return self.filter_by_since_limit(orders, since, limit, 'timestamp', True)
|
498
498
|
|
499
499
|
def handle_order(self, client: Client, message):
|
500
500
|
# {
|
ccxt/pro/independentreserve.py
CHANGED
@@ -55,7 +55,7 @@ class independentreserve(ccxt.async_support.independentreserve):
|
|
55
55
|
url = self.urls['api']['ws'] + '?subscribe=ticker-' + market['base'] + '-' + market['quote']
|
56
56
|
messageHash = 'trades:' + symbol
|
57
57
|
trades = await self.watch(url, messageHash, None, messageHash)
|
58
|
-
return self.filter_by_since_limit(trades, since, limit, 'timestamp')
|
58
|
+
return self.filter_by_since_limit(trades, since, limit, 'timestamp', True)
|
59
59
|
|
60
60
|
def handle_trades(self, client: Client, message):
|
61
61
|
#
|
ccxt/pro/kraken.py
CHANGED
@@ -251,7 +251,7 @@ class kraken(ccxt.async_support.kraken):
|
|
251
251
|
trades = await self.watch_public(name, symbol, params)
|
252
252
|
if self.newUpdates:
|
253
253
|
limit = trades.getLimit(symbol, limit)
|
254
|
-
return self.filter_by_since_limit(trades, since, limit, 'timestamp')
|
254
|
+
return self.filter_by_since_limit(trades, since, limit, 'timestamp', True)
|
255
255
|
|
256
256
|
async def watch_order_book(self, symbol: str, limit: Optional[int] = None, params={}):
|
257
257
|
"""
|
@@ -306,7 +306,7 @@ class kraken(ccxt.async_support.kraken):
|
|
306
306
|
ohlcv = await self.watch(url, messageHash, request, messageHash)
|
307
307
|
if self.newUpdates:
|
308
308
|
limit = ohlcv.getLimit(symbol, limit)
|
309
|
-
return self.filter_by_since_limit(ohlcv, since, limit, 0)
|
309
|
+
return self.filter_by_since_limit(ohlcv, since, limit, 0, True)
|
310
310
|
|
311
311
|
async def load_markets(self, reload=False, params={}):
|
312
312
|
markets = await super(kraken, self).load_markets(reload, params)
|
ccxt/pro/krakenfutures.py
CHANGED
@@ -176,7 +176,7 @@ class krakenfutures(ccxt.async_support.krakenfutures):
|
|
176
176
|
trades = await self.subscribe_public(name, [symbol], params)
|
177
177
|
if self.newUpdates:
|
178
178
|
limit = trades.getLimit(symbol, limit)
|
179
|
-
return self.filter_by_since_limit(trades, since, limit, 'timestamp')
|
179
|
+
return self.filter_by_since_limit(trades, since, limit, 'timestamp', True)
|
180
180
|
|
181
181
|
async def watch_order_book(self, symbol: str, limit: Optional[int] = None, params={}):
|
182
182
|
"""
|
@@ -210,7 +210,7 @@ class krakenfutures(ccxt.async_support.krakenfutures):
|
|
210
210
|
orders = await self.subscribe_private(name, messageHash, params)
|
211
211
|
if self.newUpdates:
|
212
212
|
limit = orders.getLimit(symbol, limit)
|
213
|
-
return self.filter_by_since_limit(orders, since, limit, 'timestamp')
|
213
|
+
return self.filter_by_since_limit(orders, since, limit, 'timestamp', True)
|
214
214
|
|
215
215
|
async def watch_my_trades(self, symbol: Optional[str] = None, since: Optional[int] = None, limit: Optional[int] = None, params={}):
|
216
216
|
"""
|
@@ -231,7 +231,7 @@ class krakenfutures(ccxt.async_support.krakenfutures):
|
|
231
231
|
trades = await self.subscribe_private(name, messageHash, params)
|
232
232
|
if self.newUpdates:
|
233
233
|
limit = trades.getLimit(symbol, limit)
|
234
|
-
return self.filter_by_since_limit(trades, since, limit, 'timestamp')
|
234
|
+
return self.filter_by_since_limit(trades, since, limit, 'timestamp', True)
|
235
235
|
|
236
236
|
async def watch_balance(self, params={}):
|
237
237
|
"""
|
@@ -1191,7 +1191,7 @@ class krakenfutures(ccxt.async_support.krakenfutures):
|
|
1191
1191
|
if event == 'challenge':
|
1192
1192
|
self.handle_authenticate(client, message)
|
1193
1193
|
elif event == 'pong':
|
1194
|
-
|
1194
|
+
client.lastPong = self.milliseconds()
|
1195
1195
|
elif event is None:
|
1196
1196
|
feed = self.safe_string(message, 'feed')
|
1197
1197
|
methods = {
|
ccxt/pro/kucoin.py
CHANGED
@@ -218,7 +218,7 @@ class kucoin(ccxt.async_support.kucoin):
|
|
218
218
|
ohlcv = await self.subscribe(url, messageHash, topic, params)
|
219
219
|
if self.newUpdates:
|
220
220
|
limit = ohlcv.getLimit(symbol, limit)
|
221
|
-
return self.filter_by_since_limit(ohlcv, since, limit, 0)
|
221
|
+
return self.filter_by_since_limit(ohlcv, since, limit, 0, True)
|
222
222
|
|
223
223
|
def handle_ohlcv(self, client: Client, message):
|
224
224
|
#
|
@@ -280,7 +280,7 @@ class kucoin(ccxt.async_support.kucoin):
|
|
280
280
|
trades = await self.subscribe(url, messageHash, topic, params)
|
281
281
|
if self.newUpdates:
|
282
282
|
limit = trades.getLimit(symbol, limit)
|
283
|
-
return self.filter_by_since_limit(trades, since, limit, 'timestamp')
|
283
|
+
return self.filter_by_since_limit(trades, since, limit, 'timestamp', True)
|
284
284
|
|
285
285
|
def handle_trade(self, client: Client, message):
|
286
286
|
#
|
@@ -603,7 +603,7 @@ class kucoin(ccxt.async_support.kucoin):
|
|
603
603
|
trades = await self.subscribe(url, messageHash, topic, self.extend(request, params))
|
604
604
|
if self.newUpdates:
|
605
605
|
limit = trades.getLimit(symbol, limit)
|
606
|
-
return self.filter_by_symbol_since_limit(trades, symbol, since, limit)
|
606
|
+
return self.filter_by_symbol_since_limit(trades, symbol, since, limit, True)
|
607
607
|
|
608
608
|
def handle_my_trade(self, client: Client, message):
|
609
609
|
trades = self.myTrades
|
ccxt/pro/kucoinfutures.py
CHANGED
@@ -192,7 +192,7 @@ class kucoinfutures(ccxt.async_support.kucoinfutures):
|
|
192
192
|
trades = await self.subscribe(url, messageHash, topic, None, params)
|
193
193
|
if self.newUpdates:
|
194
194
|
limit = trades.getLimit(symbol, limit)
|
195
|
-
return self.filter_by_since_limit(trades, since, limit, 'timestamp')
|
195
|
+
return self.filter_by_since_limit(trades, since, limit, 'timestamp', True)
|
196
196
|
|
197
197
|
def handle_trade(self, client: Client, message):
|
198
198
|
#
|
ccxt/pro/luno.py
CHANGED
@@ -63,7 +63,7 @@ class luno(ccxt.async_support.luno):
|
|
63
63
|
trades = await self.watch(url, messageHash, request, subscriptionHash, subscription)
|
64
64
|
if self.newUpdates:
|
65
65
|
limit = trades.getLimit(symbol, limit)
|
66
|
-
return self.filter_by_since_limit(trades, since, limit, 'timestamp')
|
66
|
+
return self.filter_by_since_limit(trades, since, limit, 'timestamp', True)
|
67
67
|
|
68
68
|
def handle_trades(self, client: Client, message, subscription):
|
69
69
|
#
|
ccxt/pro/mexc.py
CHANGED
@@ -221,7 +221,7 @@ class mexc(ccxt.async_support.mexc):
|
|
221
221
|
ohlcv = await self.watch_swap_public(channel, messageHash, requestParams, params)
|
222
222
|
if self.newUpdates:
|
223
223
|
limit = ohlcv.getLimit(symbol, limit)
|
224
|
-
return self.filter_by_since_limit(ohlcv, since, limit, 0)
|
224
|
+
return self.filter_by_since_limit(ohlcv, since, limit, 0, True)
|
225
225
|
|
226
226
|
def handle_ohlcv(self, client: Client, message):
|
227
227
|
#
|
@@ -508,7 +508,7 @@ class mexc(ccxt.async_support.mexc):
|
|
508
508
|
trades = await self.watch_swap_public(channel, messageHash, requestParams, params)
|
509
509
|
if self.newUpdates:
|
510
510
|
limit = trades.getLimit(symbol, limit)
|
511
|
-
return self.filter_by_since_limit(trades, since, limit, 'timestamp')
|
511
|
+
return self.filter_by_since_limit(trades, since, limit, 'timestamp', True)
|
512
512
|
|
513
513
|
def handle_trades(self, client: Client, message):
|
514
514
|
#
|
@@ -589,7 +589,7 @@ class mexc(ccxt.async_support.mexc):
|
|
589
589
|
trades = await self.watch_swap_private(messageHash, params)
|
590
590
|
if self.newUpdates:
|
591
591
|
limit = trades.getLimit(symbol, limit)
|
592
|
-
return self.filter_by_symbol_since_limit(trades, symbol, since, limit)
|
592
|
+
return self.filter_by_symbol_since_limit(trades, symbol, since, limit, True)
|
593
593
|
|
594
594
|
def handle_my_trade(self, client: Client, message, subscription=None):
|
595
595
|
#
|
ccxt/pro/ndax.py
CHANGED
@@ -136,7 +136,7 @@ class ndax(ccxt.async_support.ndax):
|
|
136
136
|
trades = await self.watch(url, messageHash, message, messageHash)
|
137
137
|
if self.newUpdates:
|
138
138
|
limit = trades.getLimit(symbol, limit)
|
139
|
-
return self.filter_by_since_limit(trades, since, limit, 'timestamp')
|
139
|
+
return self.filter_by_since_limit(trades, since, limit, 'timestamp', True)
|
140
140
|
|
141
141
|
def handle_trades(self, client: Client, message):
|
142
142
|
payload = self.safe_value(message, 'o', [])
|
@@ -213,7 +213,7 @@ class ndax(ccxt.async_support.ndax):
|
|
213
213
|
ohlcv = await self.watch(url, messageHash, message, messageHash)
|
214
214
|
if self.newUpdates:
|
215
215
|
limit = ohlcv.getLimit(symbol, limit)
|
216
|
-
return self.filter_by_since_limit(ohlcv, since, limit, 0)
|
216
|
+
return self.filter_by_since_limit(ohlcv, since, limit, 0, True)
|
217
217
|
|
218
218
|
def handle_ohlcv(self, client: Client, message):
|
219
219
|
#
|
ccxt/pro/okcoin.py
CHANGED
@@ -82,7 +82,7 @@ class okcoin(ccxt.async_support.okcoin):
|
|
82
82
|
trades = await self.subscribe('trade', symbol, params)
|
83
83
|
if self.newUpdates:
|
84
84
|
limit = trades.getLimit(symbol, limit)
|
85
|
-
return self.filter_by_since_limit(trades, since, limit, 'timestamp')
|
85
|
+
return self.filter_by_since_limit(trades, since, limit, 'timestamp', True)
|
86
86
|
|
87
87
|
async def watch_orders(self, symbol: Optional[str] = None, since: Optional[int] = None, limit: Optional[int] = None, params={}):
|
88
88
|
"""
|
@@ -101,7 +101,7 @@ class okcoin(ccxt.async_support.okcoin):
|
|
101
101
|
trades = await self.subscribe(orderType, symbol, params)
|
102
102
|
if self.newUpdates:
|
103
103
|
limit = trades.getLimit(symbol, limit)
|
104
|
-
return self.filter_by_since_limit(trades, since, limit, 'timestamp')
|
104
|
+
return self.filter_by_since_limit(trades, since, limit, 'timestamp', True)
|
105
105
|
|
106
106
|
def handle_orders(self, client: Client, message, subscription=None):
|
107
107
|
#
|
@@ -254,7 +254,7 @@ class okcoin(ccxt.async_support.okcoin):
|
|
254
254
|
ohlcv = await self.subscribe(name, symbol, params)
|
255
255
|
if self.newUpdates:
|
256
256
|
limit = ohlcv.getLimit(symbol, limit)
|
257
|
-
return self.filter_by_since_limit(ohlcv, since, limit, 0)
|
257
|
+
return self.filter_by_since_limit(ohlcv, since, limit, 0, True)
|
258
258
|
|
259
259
|
def handle_ohlcv(self, client: Client, message):
|
260
260
|
#
|
ccxt/pro/okx.py
CHANGED
@@ -114,7 +114,7 @@ class okx(ccxt.async_support.okx):
|
|
114
114
|
trades = await self.subscribe('public', 'trades', symbol, params)
|
115
115
|
if self.newUpdates:
|
116
116
|
limit = trades.getLimit(symbol, limit)
|
117
|
-
return self.filter_by_since_limit(trades, since, limit, 'timestamp')
|
117
|
+
return self.filter_by_since_limit(trades, since, limit, 'timestamp', True)
|
118
118
|
|
119
119
|
def handle_trades(self, client: Client, message):
|
120
120
|
#
|
@@ -213,7 +213,7 @@ class okx(ccxt.async_support.okx):
|
|
213
213
|
ohlcv = await self.subscribe('public', name, symbol, params)
|
214
214
|
if self.newUpdates:
|
215
215
|
limit = ohlcv.getLimit(symbol, limit)
|
216
|
-
return self.filter_by_since_limit(ohlcv, since, limit, 0)
|
216
|
+
return self.filter_by_since_limit(ohlcv, since, limit, 0, True)
|
217
217
|
|
218
218
|
def handle_ohlcv(self, client: Client, message):
|
219
219
|
#
|