ccxt 4.4.94__py2.py3-none-any.whl → 4.4.95__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.
Files changed (44) hide show
  1. ccxt/__init__.py +1 -1
  2. ccxt/abstract/bingx.py +3 -0
  3. ccxt/abstract/hyperliquid.py +1 -1
  4. ccxt/abstract/woo.py +59 -4
  5. ccxt/async_support/__init__.py +1 -1
  6. ccxt/async_support/base/exchange.py +1 -1
  7. ccxt/async_support/base/ws/future.py +2 -0
  8. ccxt/async_support/bingx.py +129 -92
  9. ccxt/async_support/bitget.py +1 -1
  10. ccxt/async_support/bitstamp.py +2 -0
  11. ccxt/async_support/blofin.py +6 -1
  12. ccxt/async_support/bybit.py +1 -1
  13. ccxt/async_support/coinbase.py +36 -0
  14. ccxt/async_support/coinmate.py +34 -0
  15. ccxt/async_support/coinone.py +34 -0
  16. ccxt/async_support/coinsph.py +29 -0
  17. ccxt/async_support/gate.py +1 -1
  18. ccxt/async_support/hyperliquid.py +2 -1
  19. ccxt/async_support/woo.py +1251 -875
  20. ccxt/base/errors.py +0 -6
  21. ccxt/base/exchange.py +3 -3
  22. ccxt/bingx.py +129 -92
  23. ccxt/bitget.py +1 -1
  24. ccxt/bitstamp.py +2 -0
  25. ccxt/blofin.py +6 -1
  26. ccxt/bybit.py +1 -1
  27. ccxt/coinbase.py +36 -0
  28. ccxt/coinmate.py +34 -0
  29. ccxt/coinone.py +34 -0
  30. ccxt/coinsph.py +29 -0
  31. ccxt/gate.py +1 -1
  32. ccxt/hyperliquid.py +2 -1
  33. ccxt/pro/__init__.py +1 -1
  34. ccxt/pro/hyperliquid.py +6 -6
  35. ccxt/pro/kraken.py +17 -16
  36. ccxt/pro/mexc.py +10 -10
  37. ccxt/test/tests_async.py +2 -2
  38. ccxt/test/tests_sync.py +2 -2
  39. ccxt/woo.py +1251 -875
  40. {ccxt-4.4.94.dist-info → ccxt-4.4.95.dist-info}/METADATA +4 -4
  41. {ccxt-4.4.94.dist-info → ccxt-4.4.95.dist-info}/RECORD +44 -44
  42. {ccxt-4.4.94.dist-info → ccxt-4.4.95.dist-info}/LICENSE.txt +0 -0
  43. {ccxt-4.4.94.dist-info → ccxt-4.4.95.dist-info}/WHEEL +0 -0
  44. {ccxt-4.4.94.dist-info → ccxt-4.4.95.dist-info}/top_level.txt +0 -0
ccxt/coinmate.py CHANGED
@@ -35,32 +35,60 @@ class coinmate(Exchange, ImplicitAPI):
35
35
  'future': False,
36
36
  'option': False,
37
37
  'addMargin': False,
38
+ 'borrowCrossMargin': False,
39
+ 'borrowIsolatedMargin': False,
40
+ 'borrowMargin': False,
38
41
  'cancelOrder': True,
39
42
  'closeAllPositions': False,
40
43
  'closePosition': False,
41
44
  'createOrder': True,
45
+ 'createOrderWithTakeProfitAndStopLoss': False,
46
+ 'createOrderWithTakeProfitAndStopLossWs': False,
47
+ 'createPostOnlyOrder': False,
42
48
  'createReduceOnlyOrder': False,
43
49
  'fetchBalance': True,
50
+ 'fetchBorrowInterest': False,
51
+ 'fetchBorrowRate': False,
44
52
  'fetchBorrowRateHistories': False,
45
53
  'fetchBorrowRateHistory': False,
54
+ 'fetchBorrowRates': False,
55
+ 'fetchBorrowRatesPerSymbol': False,
46
56
  'fetchCrossBorrowRate': False,
47
57
  'fetchCrossBorrowRates': False,
48
58
  'fetchDepositsWithdrawals': True,
49
59
  'fetchFundingHistory': False,
60
+ 'fetchFundingInterval': False,
61
+ 'fetchFundingIntervals': False,
50
62
  'fetchFundingRate': False,
51
63
  'fetchFundingRateHistory': False,
52
64
  'fetchFundingRates': False,
65
+ 'fetchGreeks': False,
53
66
  'fetchIndexOHLCV': False,
54
67
  'fetchIsolatedBorrowRate': False,
55
68
  'fetchIsolatedBorrowRates': False,
69
+ 'fetchIsolatedPositions': False,
56
70
  'fetchLeverage': False,
71
+ 'fetchLeverages': False,
57
72
  'fetchLeverageTiers': False,
73
+ 'fetchLiquidations': False,
74
+ 'fetchLongShortRatio': False,
75
+ 'fetchLongShortRatioHistory': False,
76
+ 'fetchMarginAdjustmentHistory': False,
58
77
  'fetchMarginMode': False,
78
+ 'fetchMarginModes': False,
79
+ 'fetchMarketLeverageTiers': False,
59
80
  'fetchMarkets': True,
60
81
  'fetchMarkOHLCV': False,
82
+ 'fetchMarkPrices': False,
83
+ 'fetchMyLiquidations': False,
84
+ 'fetchMySettlementHistory': False,
61
85
  'fetchMyTrades': True,
86
+ 'fetchOpenInterest': False,
62
87
  'fetchOpenInterestHistory': False,
88
+ 'fetchOpenInterests': False,
63
89
  'fetchOpenOrders': True,
90
+ 'fetchOption': False,
91
+ 'fetchOptionChain': False,
64
92
  'fetchOrder': True,
65
93
  'fetchOrderBook': True,
66
94
  'fetchOrders': True,
@@ -72,14 +100,20 @@ class coinmate(Exchange, ImplicitAPI):
72
100
  'fetchPositionsHistory': False,
73
101
  'fetchPositionsRisk': False,
74
102
  'fetchPremiumIndexOHLCV': False,
103
+ 'fetchSettlementHistory': False,
75
104
  'fetchTicker': True,
76
105
  'fetchTickers': True,
77
106
  'fetchTrades': True,
78
107
  'fetchTradingFee': True,
79
108
  'fetchTradingFees': False,
80
109
  'fetchTransactions': 'emulated',
110
+ 'fetchVolatilityHistory': False,
81
111
  'reduceMargin': False,
112
+ 'repayCrossMargin': False,
113
+ 'repayIsolatedMargin': False,
114
+ 'repayMargin': False,
82
115
  'setLeverage': False,
116
+ 'setMargin': False,
83
117
  'setMarginMode': False,
84
118
  'setPositionMode': False,
85
119
  'transfer': False,
ccxt/coinone.py CHANGED
@@ -36,18 +36,28 @@ class coinone(Exchange, ImplicitAPI):
36
36
  'future': False,
37
37
  'option': False,
38
38
  'addMargin': False,
39
+ 'borrowCrossMargin': False,
40
+ 'borrowIsolatedMargin': False,
41
+ 'borrowMargin': False,
39
42
  'cancelOrder': True,
40
43
  'closeAllPositions': False,
41
44
  'closePosition': False,
42
45
  'createMarketOrder': False,
43
46
  'createOrder': True,
47
+ 'createOrderWithTakeProfitAndStopLoss': False,
48
+ 'createOrderWithTakeProfitAndStopLossWs': False,
49
+ 'createPostOnlyOrder': False,
44
50
  'createReduceOnlyOrder': False,
45
51
  'createStopLimitOrder': False,
46
52
  'createStopMarketOrder': False,
47
53
  'createStopOrder': False,
48
54
  'fetchBalance': True,
55
+ 'fetchBorrowInterest': False,
56
+ 'fetchBorrowRate': False,
49
57
  'fetchBorrowRateHistories': False,
50
58
  'fetchBorrowRateHistory': False,
59
+ 'fetchBorrowRates': False,
60
+ 'fetchBorrowRatesPerSymbol': False,
51
61
  'fetchClosedOrders': False, # the endpoint that should return closed orders actually returns trades, https://github.com/ccxt/ccxt/pull/7067
52
62
  'fetchCrossBorrowRate': False,
53
63
  'fetchCrossBorrowRates': False,
@@ -56,20 +66,38 @@ class coinone(Exchange, ImplicitAPI):
56
66
  'fetchDepositAddresses': True,
57
67
  'fetchDepositAddressesByNetwork': False,
58
68
  'fetchFundingHistory': False,
69
+ 'fetchFundingInterval': False,
70
+ 'fetchFundingIntervals': False,
59
71
  'fetchFundingRate': False,
60
72
  'fetchFundingRateHistory': False,
61
73
  'fetchFundingRates': False,
74
+ 'fetchGreeks': False,
62
75
  'fetchIndexOHLCV': False,
63
76
  'fetchIsolatedBorrowRate': False,
64
77
  'fetchIsolatedBorrowRates': False,
78
+ 'fetchIsolatedPositions': False,
65
79
  'fetchLeverage': False,
80
+ 'fetchLeverages': False,
66
81
  'fetchLeverageTiers': False,
82
+ 'fetchLiquidations': False,
83
+ 'fetchLongShortRatio': False,
84
+ 'fetchLongShortRatioHistory': False,
85
+ 'fetchMarginAdjustmentHistory': False,
67
86
  'fetchMarginMode': False,
87
+ 'fetchMarginModes': False,
88
+ 'fetchMarketLeverageTiers': False,
68
89
  'fetchMarkets': True,
69
90
  'fetchMarkOHLCV': False,
91
+ 'fetchMarkPrices': False,
92
+ 'fetchMyLiquidations': False,
93
+ 'fetchMySettlementHistory': False,
70
94
  'fetchMyTrades': True,
95
+ 'fetchOpenInterest': False,
71
96
  'fetchOpenInterestHistory': False,
97
+ 'fetchOpenInterests': False,
72
98
  'fetchOpenOrders': True,
99
+ 'fetchOption': False,
100
+ 'fetchOptionChain': False,
73
101
  'fetchOrder': True,
74
102
  'fetchOrderBook': True,
75
103
  'fetchPosition': False,
@@ -80,11 +108,17 @@ class coinone(Exchange, ImplicitAPI):
80
108
  'fetchPositionsHistory': False,
81
109
  'fetchPositionsRisk': False,
82
110
  'fetchPremiumIndexOHLCV': False,
111
+ 'fetchSettlementHistory': False,
83
112
  'fetchTicker': True,
84
113
  'fetchTickers': True,
85
114
  'fetchTrades': True,
115
+ 'fetchVolatilityHistory': False,
86
116
  'reduceMargin': False,
117
+ 'repayCrossMargin': False,
118
+ 'repayIsolatedMargin': False,
119
+ 'repayMargin': False,
87
120
  'setLeverage': False,
121
+ 'setMargin': False,
88
122
  'setMarginMode': False,
89
123
  'setPositionMode': False,
90
124
  'ws': True,
ccxt/coinsph.py CHANGED
@@ -47,6 +47,9 @@ class coinsph(Exchange, ImplicitAPI):
47
47
  'future': False,
48
48
  'option': False,
49
49
  'addMargin': False,
50
+ 'borrowCrossMargin': False,
51
+ 'borrowIsolatedMargin': False,
52
+ 'borrowMargin': False,
50
53
  'cancelAllOrders': True,
51
54
  'cancelOrder': True,
52
55
  'cancelOrders': False,
@@ -57,6 +60,8 @@ class coinsph(Exchange, ImplicitAPI):
57
60
  'createMarketOrderWithCost': False,
58
61
  'createMarketSellOrderWithCost': False,
59
62
  'createOrder': True,
63
+ 'createOrderWithTakeProfitAndStopLoss': False,
64
+ 'createOrderWithTakeProfitAndStopLossWs': False,
60
65
  'createPostOnlyOrder': False,
61
66
  'createReduceOnlyOrder': False,
62
67
  'createStopLimitOrder': True,
@@ -68,8 +73,11 @@ class coinsph(Exchange, ImplicitAPI):
68
73
  'fetchBalance': True,
69
74
  'fetchBidsAsks': False,
70
75
  'fetchBorrowInterest': False,
76
+ 'fetchBorrowRate': False,
71
77
  'fetchBorrowRateHistories': False,
72
78
  'fetchBorrowRateHistory': False,
79
+ 'fetchBorrowRates': False,
80
+ 'fetchBorrowRatesPerSymbol': False,
73
81
  'fetchCanceledOrders': False,
74
82
  'fetchClosedOrder': False,
75
83
  'fetchClosedOrders': True,
@@ -84,24 +92,42 @@ class coinsph(Exchange, ImplicitAPI):
84
92
  'fetchDepositWithdrawFee': False,
85
93
  'fetchDepositWithdrawFees': False,
86
94
  'fetchFundingHistory': False,
95
+ 'fetchFundingInterval': False,
96
+ 'fetchFundingIntervals': False,
87
97
  'fetchFundingRate': False,
88
98
  'fetchFundingRateHistory': False,
89
99
  'fetchFundingRates': False,
100
+ 'fetchGreeks': False,
90
101
  'fetchIndexOHLCV': False,
91
102
  'fetchIsolatedBorrowRate': False,
92
103
  'fetchIsolatedBorrowRates': False,
104
+ 'fetchIsolatedPositions': False,
93
105
  'fetchL3OrderBook': False,
94
106
  'fetchLedger': False,
95
107
  'fetchLeverage': False,
108
+ 'fetchLeverages': False,
96
109
  'fetchLeverageTiers': False,
110
+ 'fetchLiquidations': False,
111
+ 'fetchLongShortRatio': False,
112
+ 'fetchLongShortRatioHistory': False,
113
+ 'fetchMarginAdjustmentHistory': False,
114
+ 'fetchMarginMode': False,
115
+ 'fetchMarginModes': False,
97
116
  'fetchMarketLeverageTiers': False,
98
117
  'fetchMarkets': True,
99
118
  'fetchMarkOHLCV': False,
119
+ 'fetchMarkPrices': False,
120
+ 'fetchMyLiquidations': False,
121
+ 'fetchMySettlementHistory': False,
100
122
  'fetchMyTrades': True,
101
123
  'fetchOHLCV': True,
124
+ 'fetchOpenInterest': False,
102
125
  'fetchOpenInterestHistory': False,
126
+ 'fetchOpenInterests': False,
103
127
  'fetchOpenOrder': None,
104
128
  'fetchOpenOrders': True,
129
+ 'fetchOption': False,
130
+ 'fetchOptionChain': False,
105
131
  'fetchOrder': True,
106
132
  'fetchOrderBook': True,
107
133
  'fetchOrderBooks': False,
@@ -115,6 +141,7 @@ class coinsph(Exchange, ImplicitAPI):
115
141
  'fetchPositionsHistory': False,
116
142
  'fetchPositionsRisk': False,
117
143
  'fetchPremiumIndexOHLCV': False,
144
+ 'fetchSettlementHistory': False,
118
145
  'fetchStatus': True,
119
146
  'fetchTicker': True,
120
147
  'fetchTickers': True,
@@ -127,12 +154,14 @@ class coinsph(Exchange, ImplicitAPI):
127
154
  'fetchTransactionFees': False,
128
155
  'fetchTransactions': False,
129
156
  'fetchTransfers': False,
157
+ 'fetchVolatilityHistory': False,
130
158
  'fetchWithdrawal': None,
131
159
  'fetchWithdrawals': True,
132
160
  'fetchWithdrawalWhitelist': False,
133
161
  'reduceMargin': False,
134
162
  'repayCrossMargin': False,
135
163
  'repayIsolatedMargin': False,
164
+ 'repayMargin': False,
136
165
  'setLeverage': False,
137
166
  'setMargin': False,
138
167
  'setMarginMode': False,
ccxt/gate.py CHANGED
@@ -3754,7 +3754,7 @@ class gate(Exchange, ImplicitAPI):
3754
3754
  start = self.parse_to_int(since / 1000)
3755
3755
  request['from'] = start
3756
3756
  request['to'] = self.sum(start, 30 * 24 * 60 * 60)
3757
- request, params = self.handle_until_option('to', request, params)
3757
+ request, params = self.handle_until_option('to', request, params, 0.001)
3758
3758
  response = self.privateWalletGetDeposits(self.extend(request, params))
3759
3759
  return self.parse_transactions(response, currency)
3760
3760
 
ccxt/hyperliquid.py CHANGED
@@ -173,6 +173,7 @@ class hyperliquid(Exchange, ImplicitAPI):
173
173
  'orderStatus': 2,
174
174
  'spotClearinghouseState': 2,
175
175
  'exchangeStatus': 2,
176
+ 'candleSnapshot': 3,
176
177
  },
177
178
  },
178
179
  },
@@ -3599,7 +3600,7 @@ class hyperliquid(Exchange, ImplicitAPI):
3599
3600
  def coin_to_market_id(self, coin: Str):
3600
3601
  if coin.find('/') > -1 or coin.find('@') > -1:
3601
3602
  return coin # spot
3602
- return coin + '/USDC:USDC'
3603
+ return self.safe_currency_code(coin) + '/USDC:USDC'
3603
3604
 
3604
3605
  def handle_errors(self, code: int, reason: str, url: str, method: str, headers: dict, body: str, response, requestHeaders, requestBody):
3605
3606
  if not response:
ccxt/pro/__init__.py CHANGED
@@ -4,7 +4,7 @@
4
4
 
5
5
  # ----------------------------------------------------------------------------
6
6
 
7
- __version__ = '4.4.94'
7
+ __version__ = '4.4.95'
8
8
 
9
9
  # ----------------------------------------------------------------------------
10
10
 
ccxt/pro/hyperliquid.py CHANGED
@@ -170,7 +170,7 @@ class hyperliquid(ccxt.async_support.hyperliquid):
170
170
  'method': 'subscribe',
171
171
  'subscription': {
172
172
  'type': 'l2Book',
173
- 'coin': market['base'] if market['swap'] else market['id'],
173
+ 'coin': market['baseName'] if market['swap'] else market['id'],
174
174
  },
175
175
  }
176
176
  message = self.extend(request, params)
@@ -199,7 +199,7 @@ class hyperliquid(ccxt.async_support.hyperliquid):
199
199
  'method': 'unsubscribe',
200
200
  'subscription': {
201
201
  'type': 'l2Book',
202
- 'coin': market['base'] if market['swap'] else market['id'],
202
+ 'coin': market['baseName'] if market['swap'] else market['id'],
203
203
  },
204
204
  }
205
205
  message = self.extend(request, params)
@@ -500,7 +500,7 @@ class hyperliquid(ccxt.async_support.hyperliquid):
500
500
  'method': 'subscribe',
501
501
  'subscription': {
502
502
  'type': 'trades',
503
- 'coin': market['base'] if market['swap'] else market['id'],
503
+ 'coin': market['baseName'] if market['swap'] else market['id'],
504
504
  },
505
505
  }
506
506
  message = self.extend(request, params)
@@ -529,7 +529,7 @@ class hyperliquid(ccxt.async_support.hyperliquid):
529
529
  'method': 'unsubscribe',
530
530
  'subscription': {
531
531
  'type': 'trades',
532
- 'coin': market['base'] if market['swap'] else market['id'],
532
+ 'coin': market['baseName'] if market['swap'] else market['id'],
533
533
  },
534
534
  }
535
535
  message = self.extend(request, params)
@@ -653,7 +653,7 @@ class hyperliquid(ccxt.async_support.hyperliquid):
653
653
  'method': 'subscribe',
654
654
  'subscription': {
655
655
  'type': 'candle',
656
- 'coin': market['base'] if market['swap'] else market['id'],
656
+ 'coin': market['baseName'] if market['swap'] else market['id'],
657
657
  'interval': timeframe,
658
658
  },
659
659
  }
@@ -683,7 +683,7 @@ class hyperliquid(ccxt.async_support.hyperliquid):
683
683
  'method': 'unsubscribe',
684
684
  'subscription': {
685
685
  'type': 'candle',
686
- 'coin': market['base'] if market['swap'] else market['id'],
686
+ 'coin': market['baseName'] if market['swap'] else market['id'],
687
687
  'interval': timeframe,
688
688
  },
689
689
  }
ccxt/pro/kraken.py CHANGED
@@ -745,15 +745,13 @@ class kraken(ccxt.async_support.kraken):
745
745
  :param dict [params]: extra parameters specific to the exchange API endpoint
746
746
  :returns dict: A dictionary of `order book structures <https://docs.ccxt.com/#/?id=order-book-structure>` indexed by market symbols
747
747
  """
748
- request: dict = {}
748
+ requiredParams: dict = {}
749
749
  if limit is not None:
750
750
  if self.in_array(limit, [10, 25, 100, 500, 1000]):
751
- request['params'] = {
752
- 'depth': limit, # default 10, valid options 10, 25, 100, 500, 1000
753
- }
751
+ requiredParams['depth'] = limit # default 10, valid options 10, 25, 100, 500, 1000
754
752
  else:
755
753
  raise NotSupported(self.id + ' watchOrderBook accepts limit values of 10, 25, 100, 500 and 1000 only')
756
- orderbook = await self.watch_multi_helper('orderbook', 'book', symbols, {'limit': limit}, self.extend(request, params))
754
+ orderbook = await self.watch_multi_helper('orderbook', 'book', symbols, {'limit': limit}, self.extend(requiredParams, params))
757
755
  return orderbook.limit()
758
756
 
759
757
  async def watch_ohlcv(self, symbol: str, timeframe='1m', since: Int = None, limit: Int = None, params={}) -> List[list]:
@@ -1614,17 +1612,20 @@ class kraken(ccxt.async_support.kraken):
1614
1612
  #
1615
1613
  errorMessage = self.safe_string_2(message, 'errorMessage', 'error')
1616
1614
  if errorMessage is not None:
1617
- requestId = self.safe_value_2(message, 'reqid', 'req_id')
1618
- if requestId is not None:
1619
- broad = self.exceptions['ws']['broad']
1620
- broadKey = self.find_broadly_matched_key(broad, errorMessage)
1621
- exception = None
1622
- if broadKey is None:
1623
- exception = ExchangeError(errorMessage) # c# requirement to convert the errorMessage to string
1624
- else:
1625
- exception = broad[broadKey](errorMessage)
1626
- client.reject(exception, requestId)
1627
- return False
1615
+ # requestId = self.safe_value_2(message, 'reqid', 'req_id')
1616
+ broad = self.exceptions['ws']['broad']
1617
+ broadKey = self.find_broadly_matched_key(broad, errorMessage)
1618
+ exception = None
1619
+ if broadKey is None:
1620
+ exception = ExchangeError(errorMessage) # c# requirement to convert the errorMessage to string
1621
+ else:
1622
+ exception = broad[broadKey](errorMessage)
1623
+ # if requestId is not None:
1624
+ # client.reject(exception, requestId)
1625
+ # else:
1626
+ client.reject(exception)
1627
+ # }
1628
+ return False
1628
1629
  return True
1629
1630
 
1630
1631
  def handle_message(self, client: Client, message):
ccxt/pro/mexc.py CHANGED
@@ -1377,14 +1377,14 @@ class mexc(ccxt.async_support.mexc):
1377
1377
  channel = 'spot@public.bookTicker.v3.api@' + market['id']
1378
1378
  url = self.urls['api']['ws']['spot']
1379
1379
  params['unsubscribed'] = True
1380
- self.watch_spot_public(channel, messageHash, params)
1380
+ await self.watch_spot_public(channel, messageHash, params)
1381
1381
  else:
1382
1382
  channel = 'unsub.ticker'
1383
1383
  requestParams: dict = {
1384
1384
  'symbol': market['id'],
1385
1385
  }
1386
1386
  url = self.urls['api']['ws']['swap']
1387
- self.watch_swap_public(channel, messageHash, requestParams, params)
1387
+ await self.watch_swap_public(channel, messageHash, requestParams, params)
1388
1388
  client = self.client(url)
1389
1389
  self.handle_unsubscriptions(client, [messageHash])
1390
1390
  return None
@@ -1435,7 +1435,7 @@ class mexc(ccxt.async_support.mexc):
1435
1435
  request['params'] = {}
1436
1436
  messageHashes.append('unsubscribe:ticker')
1437
1437
  client = self.client(url)
1438
- self.watch_multiple(url, messageHashes, self.extend(request, params), messageHashes)
1438
+ await self.watch_multiple(url, messageHashes, self.extend(request, params), messageHashes)
1439
1439
  self.handle_unsubscriptions(client, messageHashes)
1440
1440
  return None
1441
1441
 
@@ -1469,7 +1469,7 @@ class mexc(ccxt.async_support.mexc):
1469
1469
  'params': topics,
1470
1470
  }
1471
1471
  client = self.client(url)
1472
- self.watch_multiple(url, messageHashes, self.extend(request, params), messageHashes)
1472
+ await self.watch_multiple(url, messageHashes, self.extend(request, params), messageHashes)
1473
1473
  self.handle_unsubscriptions(client, messageHashes)
1474
1474
  return None
1475
1475
 
@@ -1493,7 +1493,7 @@ class mexc(ccxt.async_support.mexc):
1493
1493
  url = self.urls['api']['ws']['spot']
1494
1494
  channel = 'spot@public.kline.v3.api@' + market['id'] + '@' + timeframeId
1495
1495
  params['unsubscribed'] = True
1496
- self.watch_spot_public(channel, messageHash, params)
1496
+ await self.watch_spot_public(channel, messageHash, params)
1497
1497
  else:
1498
1498
  url = self.urls['api']['ws']['swap']
1499
1499
  channel = 'unsub.kline'
@@ -1501,7 +1501,7 @@ class mexc(ccxt.async_support.mexc):
1501
1501
  'symbol': market['id'],
1502
1502
  'interval': timeframeId,
1503
1503
  }
1504
- self.watch_swap_public(channel, messageHash, requestParams, params)
1504
+ await self.watch_swap_public(channel, messageHash, requestParams, params)
1505
1505
  client = self.client(url)
1506
1506
  self.handle_unsubscriptions(client, [messageHash])
1507
1507
  return None
@@ -1522,14 +1522,14 @@ class mexc(ccxt.async_support.mexc):
1522
1522
  url = self.urls['api']['ws']['spot']
1523
1523
  channel = 'spot@public.increase.depth.v3.api@' + market['id']
1524
1524
  params['unsubscribed'] = True
1525
- self.watch_spot_public(channel, messageHash, params)
1525
+ await self.watch_spot_public(channel, messageHash, params)
1526
1526
  else:
1527
1527
  url = self.urls['api']['ws']['swap']
1528
1528
  channel = 'unsub.depth'
1529
1529
  requestParams: dict = {
1530
1530
  'symbol': market['id'],
1531
1531
  }
1532
- self.watch_swap_public(channel, messageHash, requestParams, params)
1532
+ await self.watch_swap_public(channel, messageHash, requestParams, params)
1533
1533
  client = self.client(url)
1534
1534
  self.handle_unsubscriptions(client, [messageHash])
1535
1535
  return None
@@ -1551,14 +1551,14 @@ class mexc(ccxt.async_support.mexc):
1551
1551
  url = self.urls['api']['ws']['spot']
1552
1552
  channel = 'spot@public.deals.v3.api@' + market['id']
1553
1553
  params['unsubscribed'] = True
1554
- self.watch_spot_public(channel, messageHash, params)
1554
+ await self.watch_spot_public(channel, messageHash, params)
1555
1555
  else:
1556
1556
  url = self.urls['api']['ws']['swap']
1557
1557
  channel = 'unsub.deal'
1558
1558
  requestParams: dict = {
1559
1559
  'symbol': market['id'],
1560
1560
  }
1561
- self.watch_swap_public(channel, messageHash, requestParams, params)
1561
+ await self.watch_swap_public(channel, messageHash, requestParams, params)
1562
1562
  client = self.client(url)
1563
1563
  self.handle_unsubscriptions(client, [messageHash])
1564
1564
  return None
ccxt/test/tests_async.py CHANGED
@@ -622,7 +622,7 @@ class testMainClass:
622
622
  def check_constructor(self, exchange):
623
623
  # todo: this might be moved in base tests later
624
624
  if exchange.id == 'binance':
625
- assert exchange.hostname is None, 'binance.com hostname should be empty'
625
+ assert exchange.hostname is None or exchange.hostname == '', 'binance.com hostname should be empty'
626
626
  assert exchange.urls['api']['public'] == 'https://api.binance.com/api/v3', 'https://api.binance.com/api/v3 does not match: ' + exchange.urls['api']['public']
627
627
  assert ('lending/union/account' in exchange.api['sapi']['get']), 'SAPI should contain the endpoint lending/union/account, ' + json_stringify(exchange.api['sapi']['get'])
628
628
  elif exchange.id == 'binanceus':
@@ -1395,7 +1395,7 @@ class testMainClass:
1395
1395
  try:
1396
1396
  await exchange.create_order('BTC/USDT', 'limit', 'buy', 1, 20000)
1397
1397
  except Exception as e:
1398
- spot_order_request = self.urlencoded_to_dict(exchange.last_request_body)
1398
+ spot_order_request = json_parse(exchange.last_request_body)
1399
1399
  broker_id = spot_order_request['broker_id']
1400
1400
  id_string = str(id)
1401
1401
  assert broker_id.startswith(id_string), 'woo - broker_id: ' + broker_id + ' does not start with id: ' + id_string
ccxt/test/tests_sync.py CHANGED
@@ -619,7 +619,7 @@ class testMainClass:
619
619
  def check_constructor(self, exchange):
620
620
  # todo: this might be moved in base tests later
621
621
  if exchange.id == 'binance':
622
- assert exchange.hostname is None, 'binance.com hostname should be empty'
622
+ assert exchange.hostname is None or exchange.hostname == '', 'binance.com hostname should be empty'
623
623
  assert exchange.urls['api']['public'] == 'https://api.binance.com/api/v3', 'https://api.binance.com/api/v3 does not match: ' + exchange.urls['api']['public']
624
624
  assert ('lending/union/account' in exchange.api['sapi']['get']), 'SAPI should contain the endpoint lending/union/account, ' + json_stringify(exchange.api['sapi']['get'])
625
625
  elif exchange.id == 'binanceus':
@@ -1392,7 +1392,7 @@ class testMainClass:
1392
1392
  try:
1393
1393
  exchange.create_order('BTC/USDT', 'limit', 'buy', 1, 20000)
1394
1394
  except Exception as e:
1395
- spot_order_request = self.urlencoded_to_dict(exchange.last_request_body)
1395
+ spot_order_request = json_parse(exchange.last_request_body)
1396
1396
  broker_id = spot_order_request['broker_id']
1397
1397
  id_string = str(id)
1398
1398
  assert broker_id.startswith(id_string), 'woo - broker_id: ' + broker_id + ' does not start with id: ' + id_string