kucoin-api 0.0.88__py3-none-any.whl → 0.0.90__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 kucoin-api might be problematic. Click here for more details.

kucoin/ccxt/__init__.py CHANGED
@@ -26,7 +26,7 @@ sys.modules['ccxt'] = ccxt_module
26
26
 
27
27
  # ----------------------------------------------------------------------------
28
28
 
29
- __version__ = '4.5.2'
29
+ __version__ = '4.5.4'
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.2'
11
+ __version__ = '4.5.4'
12
12
 
13
13
  # -----------------------------------------------------------------------------
14
14
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  # -----------------------------------------------------------------------------
4
4
 
5
- __version__ = '4.5.2'
5
+ __version__ = '4.5.4'
6
6
 
7
7
  # -----------------------------------------------------------------------------
8
8
 
@@ -708,6 +708,9 @@ class Exchange(BaseExchange):
708
708
  async def un_watch_positions(self, symbols: Strings = None, params={}):
709
709
  raise NotSupported(self.id + ' unWatchPositions() is not supported yet')
710
710
 
711
+ async def un_watch_ticker(self, symbol: str, params={}):
712
+ raise NotSupported(self.id + ' unWatchTicker() is not supported yet')
713
+
711
714
  async def fetch_deposit_addresses(self, codes: Strings = None, params={}):
712
715
  raise NotSupported(self.id + ' fetchDepositAddresses() is not supported yet')
713
716
 
@@ -868,19 +871,19 @@ class Exchange(BaseExchange):
868
871
  async def repay_margin(self, code: str, amount: float, symbol: Str = None, params={}):
869
872
  raise NotSupported(self.id + ' repayMargin is deprecated, please use repayCrossMargin or repayIsolatedMargin instead')
870
873
 
871
- async def fetch_ohlcv(self, symbol: str, timeframe='1m', since: Int = None, limit: Int = None, params={}):
874
+ async def fetch_ohlcv(self, symbol: str, timeframe: str = '1m', since: Int = None, limit: Int = None, params={}):
872
875
  message = ''
873
876
  if self.has['fetchTrades']:
874
877
  message = '. If you want to build OHLCV candles from trade executions data, visit https://github.com/ccxt/ccxt/tree/master/examples/ and see "build-ohlcv-bars" file'
875
878
  raise NotSupported(self.id + ' fetchOHLCV() is not supported yet' + message)
876
879
 
877
- async def fetch_ohlcv_ws(self, symbol: str, timeframe='1m', since: Int = None, limit: Int = None, params={}):
880
+ async def fetch_ohlcv_ws(self, symbol: str, timeframe: str = '1m', since: Int = None, limit: Int = None, params={}):
878
881
  message = ''
879
882
  if self.has['fetchTradesWs']:
880
883
  message = '. If you want to build OHLCV candles from trade executions data, visit https://github.com/ccxt/ccxt/tree/master/examples/ and see "build-ohlcv-bars" file'
881
884
  raise NotSupported(self.id + ' fetchOHLCVWs() is not supported yet. Try using fetchOHLCV instead.' + message)
882
885
 
883
- async def watch_ohlcv(self, symbol: str, timeframe='1m', since: Int = None, limit: Int = None, params={}):
886
+ async def watch_ohlcv(self, symbol: str, timeframe: str = '1m', since: Int = None, limit: Int = None, params={}):
884
887
  raise NotSupported(self.id + ' watchOHLCV() is not supported yet')
885
888
 
886
889
  async def fetch_web_endpoint(self, method, endpointMethod, returnAsJson, startRegex=None, endRegex=None):
@@ -1850,7 +1853,7 @@ class Exchange(BaseExchange):
1850
1853
  else:
1851
1854
  raise NotSupported(self.id + ' fetchFundingInterval() is not supported yet')
1852
1855
 
1853
- async def fetch_mark_ohlcv(self, symbol: str, timeframe='1m', since: Int = None, limit: Int = None, params={}):
1856
+ async def fetch_mark_ohlcv(self, symbol: str, timeframe: str = '1m', since: Int = None, limit: Int = None, params={}):
1854
1857
  """
1855
1858
  fetches historical mark price candlestick data containing the open, high, low, and close price of a market
1856
1859
  :param str symbol: unified symbol of the market to fetch OHLCV data for
@@ -1868,7 +1871,7 @@ class Exchange(BaseExchange):
1868
1871
  else:
1869
1872
  raise NotSupported(self.id + ' fetchMarkOHLCV() is not supported yet')
1870
1873
 
1871
- async def fetch_index_ohlcv(self, symbol: str, timeframe='1m', since: Int = None, limit: Int = None, params={}):
1874
+ async def fetch_index_ohlcv(self, symbol: str, timeframe: str = '1m', since: Int = None, limit: Int = None, params={}):
1872
1875
  """
1873
1876
  fetches historical index price candlestick data containing the open, high, low, and close price of a market
1874
1877
  :param str symbol: unified symbol of the market to fetch OHLCV data for
@@ -1886,7 +1889,7 @@ class Exchange(BaseExchange):
1886
1889
  else:
1887
1890
  raise NotSupported(self.id + ' fetchIndexOHLCV() is not supported yet')
1888
1891
 
1889
- async def fetch_premium_index_ohlcv(self, symbol: str, timeframe='1m', since: Int = None, limit: Int = None, params={}):
1892
+ async def fetch_premium_index_ohlcv(self, symbol: str, timeframe: str = '1m', since: Int = None, limit: Int = None, params={}):
1890
1893
  """
1891
1894
  fetches historical premium index price candlestick data containing the open, high, low, and close price of a market
1892
1895
  :param str symbol: unified symbol of the market to fetch OHLCV data for
@@ -4,7 +4,7 @@
4
4
 
5
5
  # -----------------------------------------------------------------------------
6
6
 
7
- __version__ = '4.5.2'
7
+ __version__ = '4.5.4'
8
8
 
9
9
  # -----------------------------------------------------------------------------
10
10
 
@@ -1309,6 +1309,10 @@ class Exchange(object):
1309
1309
  elif algoType == 'ES':
1310
1310
  rawSignature = Exchange.ecdsa(token, secret, 'p256', algorithm)
1311
1311
  signature = Exchange.base16_to_binary(rawSignature['r'].rjust(64, "0") + rawSignature['s'].rjust(64, "0"))
1312
+ elif algoType == 'Ed':
1313
+ signature = Exchange.eddsa(token.encode('utf-8'), secret, 'ed25519', True)
1314
+ # here the signature is already a urlencoded base64-encoded string
1315
+ return token + '.' + signature
1312
1316
  else:
1313
1317
  signature = Exchange.hmac(Exchange.encode(token), secret, algos[algorithm], 'binary')
1314
1318
  return token + '.' + Exchange.urlencode_base64(signature)
@@ -1442,12 +1446,22 @@ class Exchange(object):
1442
1446
  'v': v,
1443
1447
  }
1444
1448
 
1449
+
1450
+ @staticmethod
1451
+ def binary_to_urlencoded_base64(data: bytes) -> str:
1452
+ encoded = base64.urlsafe_b64encode(data).decode("utf-8")
1453
+ return encoded.rstrip("=")
1454
+
1445
1455
  @staticmethod
1446
- def eddsa(request, secret, curve='ed25519'):
1456
+ def eddsa(request, secret, curve='ed25519', url_encode=False):
1447
1457
  if isinstance(secret, str):
1448
1458
  secret = Exchange.encode(secret)
1449
1459
  private_key = ed25519.Ed25519PrivateKey.from_private_bytes(secret) if len(secret) == 32 else load_pem_private_key(secret, None)
1450
- return Exchange.binary_to_base64(private_key.sign(request))
1460
+ signature = private_key.sign(request)
1461
+ if url_encode:
1462
+ return Exchange.binary_to_urlencoded_base64(signature)
1463
+
1464
+ return Exchange.binary_to_base64(signature)
1451
1465
 
1452
1466
  @staticmethod
1453
1467
  def axolotl(request, secret, curve='ed25519'):
@@ -2641,6 +2655,9 @@ class Exchange(object):
2641
2655
  def un_watch_positions(self, symbols: Strings = None, params={}):
2642
2656
  raise NotSupported(self.id + ' unWatchPositions() is not supported yet')
2643
2657
 
2658
+ def un_watch_ticker(self, symbol: str, params={}):
2659
+ raise NotSupported(self.id + ' unWatchTicker() is not supported yet')
2660
+
2644
2661
  def fetch_deposit_addresses(self, codes: Strings = None, params={}):
2645
2662
  raise NotSupported(self.id + ' fetchDepositAddresses() is not supported yet')
2646
2663
 
@@ -2862,9 +2879,9 @@ class Exchange(object):
2862
2879
  def parse_to_numeric(self, number):
2863
2880
  stringVersion = self.number_to_string(number) # self will convert 1.0 and 1 to "1" and 1.1 to "1.1"
2864
2881
  # keep self in mind:
2865
- # in JS: 1 == 1.0 is True; 1 == 1.0 is True
2882
+ # in JS: 1 == 1.0 is True
2866
2883
  # in Python: 1 == 1.0 is True
2867
- # in PHP 1 == 1.0 is True, but 1 == 1.0 is False.
2884
+ # in PHP: 1 == 1.0 is True, but 1 == 1.0 is False.
2868
2885
  if stringVersion.find('.') >= 0:
2869
2886
  return float(stringVersion)
2870
2887
  return int(stringVersion)
@@ -3310,6 +3327,24 @@ class Exchange(object):
3310
3327
  self.codes = list(currenciesSortedByCode.keys())
3311
3328
  return self.markets
3312
3329
 
3330
+ def set_markets_from_exchange(self, sourceExchange):
3331
+ # Validate that both exchanges are of the same type
3332
+ if self.id != sourceExchange.id:
3333
+ raise ArgumentsRequired(self.id + ' shareMarkets() can only share markets with exchanges of the same type(got ' + sourceExchange['id'] + ')')
3334
+ # Validate that source exchange has loaded markets
3335
+ if not sourceExchange.markets:
3336
+ raise ExchangeError('setMarketsFromExchange() source exchange must have loaded markets first. Can call by using loadMarkets function')
3337
+ # Set all market-related data
3338
+ self.markets = sourceExchange.markets
3339
+ self.markets_by_id = sourceExchange.markets_by_id
3340
+ self.symbols = sourceExchange.symbols
3341
+ self.ids = sourceExchange.ids
3342
+ self.currencies = sourceExchange.currencies
3343
+ self.baseCurrencies = sourceExchange.baseCurrencies
3344
+ self.quoteCurrencies = sourceExchange.quoteCurrencies
3345
+ self.codes = sourceExchange.codes
3346
+ return self
3347
+
3313
3348
  def get_describe_for_extended_ws_exchange(self, currentRestInstance: Any, parentRestInstance: Any, wsBaseDescribe: dict):
3314
3349
  extendedRestDescribe = self.deep_extend(parentRestInstance.describe(), currentRestInstance.describe())
3315
3350
  superWithRestDescribe = self.deep_extend(extendedRestDescribe, wsBaseDescribe)
@@ -3948,19 +3983,19 @@ class Exchange(object):
3948
3983
  def repay_margin(self, code: str, amount: float, symbol: Str = None, params={}):
3949
3984
  raise NotSupported(self.id + ' repayMargin is deprecated, please use repayCrossMargin or repayIsolatedMargin instead')
3950
3985
 
3951
- def fetch_ohlcv(self, symbol: str, timeframe='1m', since: Int = None, limit: Int = None, params={}):
3986
+ def fetch_ohlcv(self, symbol: str, timeframe: str = '1m', since: Int = None, limit: Int = None, params={}):
3952
3987
  message = ''
3953
3988
  if self.has['fetchTrades']:
3954
3989
  message = '. If you want to build OHLCV candles from trade executions data, visit https://github.com/ccxt/ccxt/tree/master/examples/ and see "build-ohlcv-bars" file'
3955
3990
  raise NotSupported(self.id + ' fetchOHLCV() is not supported yet' + message)
3956
3991
 
3957
- def fetch_ohlcv_ws(self, symbol: str, timeframe='1m', since: Int = None, limit: Int = None, params={}):
3992
+ def fetch_ohlcv_ws(self, symbol: str, timeframe: str = '1m', since: Int = None, limit: Int = None, params={}):
3958
3993
  message = ''
3959
3994
  if self.has['fetchTradesWs']:
3960
3995
  message = '. If you want to build OHLCV candles from trade executions data, visit https://github.com/ccxt/ccxt/tree/master/examples/ and see "build-ohlcv-bars" file'
3961
3996
  raise NotSupported(self.id + ' fetchOHLCVWs() is not supported yet. Try using fetchOHLCV instead.' + message)
3962
3997
 
3963
- def watch_ohlcv(self, symbol: str, timeframe='1m', since: Int = None, limit: Int = None, params={}):
3998
+ def watch_ohlcv(self, symbol: str, timeframe: str = '1m', since: Int = None, limit: Int = None, params={}):
3964
3999
  raise NotSupported(self.id + ' watchOHLCV() is not supported yet')
3965
4000
 
3966
4001
  def convert_trading_view_to_ohlcv(self, ohlcvs: List[List[float]], timestamp='t', open='o', high='h', low='l', close='c', volume='v', ms=False):
@@ -4372,16 +4407,27 @@ class Exchange(object):
4372
4407
  result.append(account)
4373
4408
  return result
4374
4409
 
4375
- def parse_trades(self, trades: List[Any], market: Market = None, since: Int = None, limit: Int = None, params={}):
4410
+ def parse_trades_helper(self, isWs: bool, trades: List[Any], market: Market = None, since: Int = None, limit: Int = None, params={}):
4376
4411
  trades = self.to_array(trades)
4377
4412
  result = []
4378
4413
  for i in range(0, len(trades)):
4379
- trade = self.extend(self.parse_trade(trades[i], market), params)
4414
+ parsed = None
4415
+ if isWs:
4416
+ parsed = self.parse_ws_trade(trades[i], market)
4417
+ else:
4418
+ parsed = self.parse_trade(trades[i], market)
4419
+ trade = self.extend(parsed, params)
4380
4420
  result.append(trade)
4381
4421
  result = self.sort_by_2(result, 'timestamp', 'id')
4382
4422
  symbol = market['symbol'] if (market is not None) else None
4383
4423
  return self.filter_by_symbol_since_limit(result, symbol, since, limit)
4384
4424
 
4425
+ def parse_trades(self, trades: List[Any], market: Market = None, since: Int = None, limit: Int = None, params={}):
4426
+ return self.parse_trades_helper(False, trades, market, since, limit, params)
4427
+
4428
+ def parse_ws_trades(self, trades: List[Any], market: Market = None, since: Int = None, limit: Int = None, params={}):
4429
+ return self.parse_trades_helper(True, trades, market, since, limit, params)
4430
+
4385
4431
  def parse_transactions(self, transactions: List[Any], currency: Currency = None, since: Int = None, limit: Int = None, params={}):
4386
4432
  transactions = self.to_array(transactions)
4387
4433
  result = []
@@ -4763,6 +4809,11 @@ class Exchange(object):
4763
4809
  return market
4764
4810
  return result
4765
4811
 
4812
+ def market_or_null(self, symbol: str):
4813
+ if symbol is None:
4814
+ return None
4815
+ return self.market(symbol)
4816
+
4766
4817
  def check_required_credentials(self, error=True):
4767
4818
  """
4768
4819
  @ignore
@@ -6048,6 +6099,29 @@ class Exchange(object):
6048
6099
  symbol = None if (market is None) else market['symbol']
6049
6100
  return self.filter_by_symbol_since_limit(sorted, symbol, since, limit)
6050
6101
 
6102
+ def handle_trigger_prices_and_params(self, symbol, params, omitParams=True):
6103
+ #
6104
+ triggerPrice = self.safe_string_2(params, 'triggerPrice', 'stopPrice')
6105
+ triggerPriceStr: Str = None
6106
+ stopLossPrice = self.safe_string(params, 'stopLossPrice')
6107
+ stopLossPriceStr: Str = None
6108
+ takeProfitPrice = self.safe_string(params, 'takeProfitPrice')
6109
+ takeProfitPriceStr: Str = None
6110
+ #
6111
+ if triggerPrice is not None:
6112
+ if omitParams:
6113
+ params = self.omit(params, ['triggerPrice', 'stopPrice'])
6114
+ triggerPriceStr = self.price_to_precision(symbol, float(triggerPrice))
6115
+ if stopLossPrice is not None:
6116
+ if omitParams:
6117
+ params = self.omit(params, 'stopLossPrice')
6118
+ stopLossPriceStr = self.price_to_precision(symbol, float(stopLossPrice))
6119
+ if takeProfitPrice is not None:
6120
+ if omitParams:
6121
+ params = self.omit(params, 'takeProfitPrice')
6122
+ takeProfitPriceStr = self.price_to_precision(symbol, float(takeProfitPrice))
6123
+ return [triggerPriceStr, stopLossPriceStr, takeProfitPriceStr, params]
6124
+
6051
6125
  def handle_trigger_direction_and_params(self, params, exchangeSpecificKey: Str = None, allowEmpty: Bool = False):
6052
6126
  """
6053
6127
  @ignore
@@ -6201,7 +6275,7 @@ class Exchange(object):
6201
6275
  else:
6202
6276
  raise NotSupported(self.id + ' fetchFundingInterval() is not supported yet')
6203
6277
 
6204
- def fetch_mark_ohlcv(self, symbol: str, timeframe='1m', since: Int = None, limit: Int = None, params={}):
6278
+ def fetch_mark_ohlcv(self, symbol: str, timeframe: str = '1m', since: Int = None, limit: Int = None, params={}):
6205
6279
  """
6206
6280
  fetches historical mark price candlestick data containing the open, high, low, and close price of a market
6207
6281
  :param str symbol: unified symbol of the market to fetch OHLCV data for
@@ -6219,7 +6293,7 @@ class Exchange(object):
6219
6293
  else:
6220
6294
  raise NotSupported(self.id + ' fetchMarkOHLCV() is not supported yet')
6221
6295
 
6222
- def fetch_index_ohlcv(self, symbol: str, timeframe='1m', since: Int = None, limit: Int = None, params={}):
6296
+ def fetch_index_ohlcv(self, symbol: str, timeframe: str = '1m', since: Int = None, limit: Int = None, params={}):
6223
6297
  """
6224
6298
  fetches historical index price candlestick data containing the open, high, low, and close price of a market
6225
6299
  :param str symbol: unified symbol of the market to fetch OHLCV data for
@@ -6237,7 +6311,7 @@ class Exchange(object):
6237
6311
  else:
6238
6312
  raise NotSupported(self.id + ' fetchIndexOHLCV() is not supported yet')
6239
6313
 
6240
- def fetch_premium_index_ohlcv(self, symbol: str, timeframe='1m', since: Int = None, limit: Int = None, params={}):
6314
+ def fetch_premium_index_ohlcv(self, symbol: str, timeframe: str = '1m', since: Int = None, limit: Int = None, params={}):
6241
6315
  """
6242
6316
  fetches historical premium index price candlestick data containing the open, high, low, and close price of a market
6243
6317
  :param str symbol: unified symbol of the market to fetch OHLCV data for
@@ -7036,7 +7110,7 @@ class Exchange(object):
7036
7110
  clients = list(self.clients.values())
7037
7111
  for i in range(0, len(clients)):
7038
7112
  client = clients[i]
7039
- futures = self.safe_dict(client, 'futures')
7113
+ futures = client.futures
7040
7114
  if (futures is not None) and ('fetchPositionsSnapshot' in futures):
7041
7115
  del futures['fetchPositionsSnapshot']
7042
7116
  elif topic == 'ticker' and (self.tickers is not None):
@@ -8,7 +8,7 @@ sys.modules['ccxt'] = ccxt_module
8
8
 
9
9
  # ----------------------------------------------------------------------------
10
10
 
11
- __version__ = '4.5.2'
11
+ __version__ = '4.5.4'
12
12
 
13
13
  # ----------------------------------------------------------------------------
14
14
 
kucoin/ccxt/pro/kucoin.py CHANGED
@@ -39,6 +39,11 @@ class kucoin(kucoinAsync):
39
39
  'watchOrderBookForSymbols': True,
40
40
  'watchBalance': True,
41
41
  'watchOHLCV': True,
42
+ 'unWatchTicker': True,
43
+ 'unWatchOHLCV': True,
44
+ 'unWatchOrderBook': True,
45
+ 'unWatchTrades': True,
46
+ 'unWatchhTradesForSymbols': True,
42
47
  },
43
48
  'options': {
44
49
  'tradesLimit': 1000,
@@ -140,6 +145,9 @@ class kucoin(kucoinAsync):
140
145
  client.subscriptions[requestId] = subscriptionHash
141
146
  return await self.watch(url, messageHash, message, subscriptionHash, subscription)
142
147
 
148
+ async def un_subscribe(self, url, messageHash, topic, subscriptionHash, params={}, subscription: dict = None):
149
+ return await self.un_subscribe_multiple(url, [messageHash], topic, [subscriptionHash], params, subscription)
150
+
143
151
  async def subscribe_multiple(self, url, messageHashes, topic, subscriptionHashes, params={}, subscription=None):
144
152
  requestId = str(self.request_id())
145
153
  request: dict = {
@@ -193,6 +201,34 @@ class kucoin(kucoinAsync):
193
201
  messageHash = 'ticker:' + symbol
194
202
  return await self.subscribe(url, messageHash, topic, query)
195
203
 
204
+ async def un_watch_ticker(self, symbol: str, params={}) -> Ticker:
205
+ """
206
+ unWatches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
207
+
208
+ https://www.kucoin.com/docs/websocket/spot-trading/public-channels/market-snapshot
209
+
210
+ :param str symbol: unified symbol of the market to fetch the ticker for
211
+ :param dict [params]: extra parameters specific to the exchange API endpoint
212
+ :returns dict: a `ticker structure <https://docs.ccxt.com/#/?id=ticker-structure>`
213
+ """
214
+ await self.load_markets()
215
+ market = self.market(symbol)
216
+ symbol = market['symbol']
217
+ url = await self.negotiate(False)
218
+ method = None
219
+ method, params = self.handle_option_and_params(params, 'watchTicker', 'method', '/market/snapshot')
220
+ topic = method + ':' + market['id']
221
+ messageHash = 'unsubscribe:ticker:' + symbol
222
+ subMessageHash = 'ticker:' + symbol
223
+ subscription = {
224
+ 'messageHashes': [messageHash],
225
+ 'subMessageHashes': [subMessageHash],
226
+ 'topic': 'trades',
227
+ 'unsubscribe': True,
228
+ 'symbols': [symbol],
229
+ }
230
+ return await self.un_subscribe(url, messageHash, topic, subMessageHash, params, subscription)
231
+
196
232
  async def watch_tickers(self, symbols: Strings = None, params={}) -> Tickers:
197
233
  """
198
234
 
@@ -420,6 +456,34 @@ class kucoin(kucoinAsync):
420
456
  limit = ohlcv.getLimit(symbol, limit)
421
457
  return self.filter_by_since_limit(ohlcv, since, limit, 0, True)
422
458
 
459
+ async def un_watch_ohlcv(self, symbol: str, timeframe='1m', params={}) -> List[list]:
460
+ """
461
+ unWatches historical candlestick data containing the open, high, low, and close price, and the volume of a market
462
+
463
+ https://www.kucoin.com/docs/websocket/spot-trading/public-channels/klines
464
+
465
+ :param str symbol: unified symbol of the market to fetch OHLCV data for
466
+ :param str timeframe: the length of time each candle represents
467
+ :param dict [params]: extra parameters specific to the exchange API endpoint
468
+ :returns int[][]: A list of candles ordered, open, high, low, close, volume
469
+ """
470
+ await self.load_markets()
471
+ url = await self.negotiate(False)
472
+ market = self.market(symbol)
473
+ symbol = market['symbol']
474
+ period = self.safe_string(self.timeframes, timeframe, timeframe)
475
+ topic = '/market/candles:' + market['id'] + '_' + period
476
+ messageHash = 'unsubscribe:candles:' + symbol + ':' + timeframe
477
+ subMessageHash = 'candles:' + symbol + ':' + timeframe
478
+ subscription = {
479
+ 'messageHashes': [messageHash],
480
+ 'subMessageHashes': [subMessageHash],
481
+ 'topic': 'ohlcv',
482
+ 'unsubscribe': True,
483
+ 'symbols': [symbol],
484
+ }
485
+ return await self.un_subscribe(url, messageHash, topic, messageHash, params, subscription)
486
+
423
487
  def handle_ohlcv(self, client: Client, message):
424
488
  #
425
489
  # {
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: kucoin-api
3
- Version: 0.0.88
3
+ Version: 0.0.90
4
4
  Summary: kucoin crypto exchange api client
5
5
  Project-URL: Homepage, https://github.com/ccxt/ccxt
6
6
  Project-URL: Issues, https://github.com/ccxt/ccxt
@@ -409,13 +409,16 @@ You can also construct custom requests to available "implicit" endpoints
409
409
  - `negotiate(self, privateChannel, params={})`
410
410
  - `negotiate_helper(self, privateChannel, params={})`
411
411
  - `subscribe(self, url, messageHash, subscriptionHash, params={}, subscription=None)`
412
+ - `un_subscribe(self, url, messageHash, topic, subscriptionHash, params={}, subscription: dict = None)`
412
413
  - `subscribe_multiple(self, url, messageHashes, topic, subscriptionHashes, params={}, subscription=None)`
413
414
  - `un_subscribe_multiple(self, url, messageHashes, topic, subscriptionHashes, params={}, subscription: dict = None)`
414
415
  - `watch_ticker(self, symbol: str, params={})`
416
+ - `un_watch_ticker(self, symbol: str, params={})`
415
417
  - `watch_tickers(self, symbols: Strings = None, params={})`
416
418
  - `watch_bids_asks(self, symbols: Strings = None, params={})`
417
419
  - `watch_multi_helper(self, methodName, channelName: str, symbols: Strings = None, params={})`
418
420
  - `watch_ohlcv(self, symbol: str, timeframe='1m', since: Int = None, limit: Int = None, params={})`
421
+ - `un_watch_ohlcv(self, symbol: str, timeframe='1m', params={})`
419
422
  - `watch_trades(self, symbol: str, since: Int = None, limit: Int = None, params={})`
420
423
  - `watch_trades_for_symbols(self, symbols: List[str], since: Int = None, limit: Int = None, params={})`
421
424
  - `un_watch_trades_for_symbols(self, symbols: List[str], params={})`
@@ -1,11 +1,11 @@
1
1
  kucoin/__init__.py,sha256=J1NNMLktlkCZKV82j8CFTVES3O3TCVk3so0ROi4E52o,246
2
- kucoin/ccxt/__init__.py,sha256=qUknlCaOkHiZHix_60rFwgNoM4rD8owIy0kWGXdf6BE,6130
2
+ kucoin/ccxt/__init__.py,sha256=-ermdo7dkx3yNfCFY2k2Y7PpmFSsOEma-vJUYZb-Ci8,6130
3
3
  kucoin/ccxt/kucoin.py,sha256=B0lAhQ5v49yhDJyD117FiLBJOX0XKhL2C9zz9YrrIUU,232486
4
4
  kucoin/ccxt/abstract/kucoin.py,sha256=kVrVEXiigc36arfbSS8lDUMnG7uFdKgUKHIhVb0Am_8,28626
5
- kucoin/ccxt/async_support/__init__.py,sha256=6lHyL7827mVP1qe_dViLzrgIPYSruRk0TlvYL607WZA,4863
5
+ kucoin/ccxt/async_support/__init__.py,sha256=r2-lMbhe8aQbNkulzj-bddKEO2lS4Up4Oq3RKBseXv8,4863
6
6
  kucoin/ccxt/async_support/kucoin.py,sha256=1g5zjnf_ad1TiIpaRfc86m6ieBTvrp9V_UcUv3oIHHE,233636
7
7
  kucoin/ccxt/async_support/base/__init__.py,sha256=aVYSsFi--b4InRs9zDN_wtCpj8odosAB726JdUHavrk,67
8
- kucoin/ccxt/async_support/base/exchange.py,sha256=f8NMSn7dvE2ZuL71iRKyinVbyafvacm5Zj4WcQ4TWck,121268
8
+ kucoin/ccxt/async_support/base/exchange.py,sha256=yg4s0ITgw7YAAbfTHxBzRQo2cZtJj7BCvaUgMiUuvnw,121450
9
9
  kucoin/ccxt/async_support/base/throttler.py,sha256=tvDVcdRUVYi8fZRlEcnqtgzcgB_KMUMRs5Pu8tuU-tU,1847
10
10
  kucoin/ccxt/async_support/base/ws/__init__.py,sha256=uockzpLuwntKGZbs5EOWFe-Zg-k6Cj7GhNJLc_RX0so,1791
11
11
  kucoin/ccxt/async_support/base/ws/cache.py,sha256=xf2VOtfUwloxSlIQ39M1RGZHWQzyS9IGhB5NX6cDcAc,8370
@@ -17,11 +17,11 @@ kucoin/ccxt/async_support/base/ws/order_book_side.py,sha256=GhnGUt78pJ-AYL_Dq9pr
17
17
  kucoin/ccxt/base/__init__.py,sha256=eTx1OE3HJjspFUQjGm6LBhaQiMKJnXjkdP-JUXknyQ0,1320
18
18
  kucoin/ccxt/base/decimal_to_precision.py,sha256=3XI30u9YudHbTA438397u5rkdlXa3atxwZEfUus3C4k,6803
19
19
  kucoin/ccxt/base/errors.py,sha256=OGhWNvNtRlJOzFx-n1x3ZjTnaPpfWH0Vc0xACS-MeDw,5012
20
- kucoin/ccxt/base/exchange.py,sha256=wXcblsdBqxUWtSbKu1hDTey2mOUhXe05MT7b91Mztno,334337
20
+ kucoin/ccxt/base/exchange.py,sha256=-Kn1sp6UDgjrpACqsX-mYpp-e3amK3UoMFSCai7exkM,337938
21
21
  kucoin/ccxt/base/precise.py,sha256=koce64Yrp6vFbGijJtUt-QQ6XhJgeGTCksZ871FPp_A,8886
22
22
  kucoin/ccxt/base/types.py,sha256=Gvbogh9i7pPH7Z18xesYeDPribqqwq8uKpOv-YODFBs,11505
23
- kucoin/ccxt/pro/__init__.py,sha256=0CcZQlfgRX4pcsZ9U-cl5qK52E7S1YASR4z8fgI5rqI,4177
24
- kucoin/ccxt/pro/kucoin.py,sha256=AacUqON1B3r0R-CCNVIJd3sz8EV7YfQp3b2hTPtpldI,60816
23
+ kucoin/ccxt/pro/__init__.py,sha256=qbws-FFnDZKPQ7w7QXcr8WGd-5pEV_wR2GxPRA1ZJXE,4177
24
+ kucoin/ccxt/pro/kucoin.py,sha256=mTVpGOorIGDGl-iKw0SL0EBTj6Abr0cjcPATI5LcXak,63971
25
25
  kucoin/ccxt/static_dependencies/README.md,sha256=3TCvhhn09_Cqf9BDDpao1V7EfKHDpQ6k9oWRsLFixpU,18
26
26
  kucoin/ccxt/static_dependencies/__init__.py,sha256=tzFje8cloqmiIE6kola3EaYC0SnD1izWnri69hzHsSw,168
27
27
  kucoin/ccxt/static_dependencies/ecdsa/__init__.py,sha256=Xaj0G79BLtBt2YZcOOMV8qOlQZ7fIJznNiHhiEEZfQA,594
@@ -281,6 +281,6 @@ kucoin/ccxt/static_dependencies/toolz/curried/exceptions.py,sha256=gKFOHDIayAWnX
281
281
  kucoin/ccxt/static_dependencies/toolz/curried/operator.py,sha256=ML92mknkAwzBl2NCm-4werSUmJEtSHNY9NSzhseNM9s,525
282
282
  kucoin/ccxt/static_dependencies/typing_inspect/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
283
283
  kucoin/ccxt/static_dependencies/typing_inspect/typing_inspect.py,sha256=5gIWomLPfuDpgd3gX1GlnX0MuXM3VorR4j2W2qXORiQ,28269
284
- kucoin_api-0.0.88.dist-info/METADATA,sha256=YWsNMguipkpEk_eBbZnz4d5cIUwoQxcUgwRcgrWxXhg,18578
285
- kucoin_api-0.0.88.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
286
- kucoin_api-0.0.88.dist-info/RECORD,,
284
+ kucoin_api-0.0.90.dist-info/METADATA,sha256=7H7ZcVJJ0cl6PMVp6vG3U0lXfVT1Bv8gpeAPrKZS_ug,18797
285
+ kucoin_api-0.0.90.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
286
+ kucoin_api-0.0.90.dist-info/RECORD,,