ccxt 4.5.0__py2.py3-none-any.whl → 4.5.2__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 (64) hide show
  1. ccxt/__init__.py +1 -5
  2. ccxt/ascendex.py +1 -1
  3. ccxt/async_support/__init__.py +1 -5
  4. ccxt/async_support/ascendex.py +1 -1
  5. ccxt/async_support/base/exchange.py +1 -1
  6. ccxt/async_support/binance.py +17 -12
  7. ccxt/async_support/bitget.py +1 -1
  8. ccxt/async_support/coinbase.py +46 -34
  9. ccxt/async_support/gate.py +31 -17
  10. ccxt/async_support/gemini.py +1 -1
  11. ccxt/async_support/hibachi.py +1 -1
  12. ccxt/async_support/hyperliquid.py +13 -2
  13. ccxt/async_support/indodax.py +11 -12
  14. ccxt/async_support/kraken.py +1 -8
  15. ccxt/async_support/krakenfutures.py +25 -25
  16. ccxt/async_support/mexc.py +2 -1
  17. ccxt/async_support/okx.py +2 -2
  18. ccxt/async_support/poloniex.py +1 -1
  19. ccxt/async_support/timex.py +35 -0
  20. ccxt/async_support/tradeogre.py +32 -0
  21. ccxt/async_support/wavesexchange.py +33 -0
  22. ccxt/async_support/zonda.py +12 -0
  23. ccxt/base/exchange.py +7 -1
  24. ccxt/binance.py +17 -12
  25. ccxt/bitget.py +1 -1
  26. ccxt/coinbase.py +46 -34
  27. ccxt/gate.py +31 -17
  28. ccxt/gemini.py +1 -1
  29. ccxt/hibachi.py +1 -1
  30. ccxt/hyperliquid.py +13 -2
  31. ccxt/indodax.py +11 -12
  32. ccxt/kraken.py +1 -8
  33. ccxt/krakenfutures.py +25 -25
  34. ccxt/mexc.py +2 -1
  35. ccxt/okx.py +2 -2
  36. ccxt/poloniex.py +1 -1
  37. ccxt/pro/__init__.py +1 -3
  38. ccxt/pro/bitget.py +328 -75
  39. ccxt/pro/bitmart.py +1 -1
  40. ccxt/pro/bybit.py +8 -10
  41. ccxt/pro/gate.py +8 -1
  42. ccxt/pro/gemini.py +6 -2
  43. ccxt/pro/hyperliquid.py +6 -0
  44. ccxt/pro/kraken.py +4 -6
  45. ccxt/pro/lbank.py +56 -2
  46. ccxt/pro/mexc.py +1 -1
  47. ccxt/test/tests_async.py +2 -25
  48. ccxt/test/tests_sync.py +2 -25
  49. ccxt/timex.py +35 -0
  50. ccxt/tradeogre.py +32 -0
  51. ccxt/wavesexchange.py +33 -0
  52. ccxt/zonda.py +12 -0
  53. {ccxt-4.5.0.dist-info → ccxt-4.5.2.dist-info}/METADATA +111 -113
  54. {ccxt-4.5.0.dist-info → ccxt-4.5.2.dist-info}/RECORD +57 -64
  55. ccxt/abstract/ellipx.py +0 -25
  56. ccxt/abstract/vertex.py +0 -19
  57. ccxt/async_support/ellipx.py +0 -2029
  58. ccxt/async_support/vertex.py +0 -3050
  59. ccxt/ellipx.py +0 -2029
  60. ccxt/pro/vertex.py +0 -948
  61. ccxt/vertex.py +0 -3050
  62. {ccxt-4.5.0.dist-info → ccxt-4.5.2.dist-info}/LICENSE.txt +0 -0
  63. {ccxt-4.5.0.dist-info → ccxt-4.5.2.dist-info}/WHEEL +0 -0
  64. {ccxt-4.5.0.dist-info → ccxt-4.5.2.dist-info}/top_level.txt +0 -0
ccxt/__init__.py CHANGED
@@ -22,7 +22,7 @@
22
22
 
23
23
  # ----------------------------------------------------------------------------
24
24
 
25
- __version__ = '4.5.0'
25
+ __version__ = '4.5.2'
26
26
 
27
27
  # ----------------------------------------------------------------------------
28
28
 
@@ -137,7 +137,6 @@ from ccxt.delta import delta # noqa: F4
137
137
  from ccxt.deribit import deribit # noqa: F401
138
138
  from ccxt.derive import derive # noqa: F401
139
139
  from ccxt.digifinex import digifinex # noqa: F401
140
- from ccxt.ellipx import ellipx # noqa: F401
141
140
  from ccxt.exmo import exmo # noqa: F401
142
141
  from ccxt.fmfwio import fmfwio # noqa: F401
143
142
  from ccxt.foxbit import foxbit # noqa: F401
@@ -182,7 +181,6 @@ from ccxt.timex import timex # noqa: F4
182
181
  from ccxt.tokocrypto import tokocrypto # noqa: F401
183
182
  from ccxt.tradeogre import tradeogre # noqa: F401
184
183
  from ccxt.upbit import upbit # noqa: F401
185
- from ccxt.vertex import vertex # noqa: F401
186
184
  from ccxt.wavesexchange import wavesexchange # noqa: F401
187
185
  from ccxt.whitebit import whitebit # noqa: F401
188
186
  from ccxt.woo import woo # noqa: F401
@@ -246,7 +244,6 @@ exchanges = [
246
244
  'deribit',
247
245
  'derive',
248
246
  'digifinex',
249
- 'ellipx',
250
247
  'exmo',
251
248
  'fmfwio',
252
249
  'foxbit',
@@ -291,7 +288,6 @@ exchanges = [
291
288
  'tokocrypto',
292
289
  'tradeogre',
293
290
  'upbit',
294
- 'vertex',
295
291
  'wavesexchange',
296
292
  'whitebit',
297
293
  'woo',
ccxt/ascendex.py CHANGED
@@ -1583,7 +1583,7 @@ class ascendex(Exchange, ImplicitAPI):
1583
1583
  # "code": "0",
1584
1584
  # "data": {
1585
1585
  # "domain": "spot",
1586
- # "userUID": "U1479576458",
1586
+ # "userUID": "U1479576457",
1587
1587
  # "vipLevel": "0",
1588
1588
  # "fees": [
1589
1589
  # {symbol: 'HT/USDT', fee: {taker: '0.001', maker: "0.001"}},
@@ -4,7 +4,7 @@
4
4
 
5
5
  # -----------------------------------------------------------------------------
6
6
 
7
- __version__ = '4.5.0'
7
+ __version__ = '4.5.2'
8
8
 
9
9
  # -----------------------------------------------------------------------------
10
10
 
@@ -117,7 +117,6 @@ from ccxt.async_support.delta import delta
117
117
  from ccxt.async_support.deribit import deribit # noqa: F401
118
118
  from ccxt.async_support.derive import derive # noqa: F401
119
119
  from ccxt.async_support.digifinex import digifinex # noqa: F401
120
- from ccxt.async_support.ellipx import ellipx # noqa: F401
121
120
  from ccxt.async_support.exmo import exmo # noqa: F401
122
121
  from ccxt.async_support.fmfwio import fmfwio # noqa: F401
123
122
  from ccxt.async_support.foxbit import foxbit # noqa: F401
@@ -162,7 +161,6 @@ from ccxt.async_support.timex import timex
162
161
  from ccxt.async_support.tokocrypto import tokocrypto # noqa: F401
163
162
  from ccxt.async_support.tradeogre import tradeogre # noqa: F401
164
163
  from ccxt.async_support.upbit import upbit # noqa: F401
165
- from ccxt.async_support.vertex import vertex # noqa: F401
166
164
  from ccxt.async_support.wavesexchange import wavesexchange # noqa: F401
167
165
  from ccxt.async_support.whitebit import whitebit # noqa: F401
168
166
  from ccxt.async_support.woo import woo # noqa: F401
@@ -226,7 +224,6 @@ exchanges = [
226
224
  'deribit',
227
225
  'derive',
228
226
  'digifinex',
229
- 'ellipx',
230
227
  'exmo',
231
228
  'fmfwio',
232
229
  'foxbit',
@@ -271,7 +268,6 @@ exchanges = [
271
268
  'tokocrypto',
272
269
  'tradeogre',
273
270
  'upbit',
274
- 'vertex',
275
271
  'wavesexchange',
276
272
  'whitebit',
277
273
  'woo',
@@ -1584,7 +1584,7 @@ class ascendex(Exchange, ImplicitAPI):
1584
1584
  # "code": "0",
1585
1585
  # "data": {
1586
1586
  # "domain": "spot",
1587
- # "userUID": "U1479576458",
1587
+ # "userUID": "U1479576457",
1588
1588
  # "vipLevel": "0",
1589
1589
  # "fees": [
1590
1590
  # {symbol: 'HT/USDT', fee: {taker: '0.001', maker: "0.001"}},
@@ -2,7 +2,7 @@
2
2
 
3
3
  # -----------------------------------------------------------------------------
4
4
 
5
- __version__ = '4.5.0'
5
+ __version__ = '4.5.2'
6
6
 
7
7
  # -----------------------------------------------------------------------------
8
8
 
@@ -1309,6 +1309,7 @@ class binance(Exchange, ImplicitAPI):
1309
1309
  'defaultSubType': None, # 'linear', 'inverse'
1310
1310
  'hasAlreadyAuthenticatedSuccessfully': False,
1311
1311
  'warnOnFetchOpenOrdersWithoutSymbol': True,
1312
+ 'currencyToPrecisionRoundingMode': TRUNCATE,
1312
1313
  # not an error
1313
1314
  # https://github.com/ccxt/ccxt/issues/11268
1314
1315
  # https://github.com/ccxt/ccxt/pull/11624
@@ -2753,13 +2754,6 @@ class binance(Exchange, ImplicitAPI):
2753
2754
  def cost_to_precision(self, symbol, cost):
2754
2755
  return self.decimal_to_precision(cost, TRUNCATE, self.markets[symbol]['precision']['quote'], self.precisionMode, self.paddingMode)
2755
2756
 
2756
- def currency_to_precision(self, code, fee, networkCode=None):
2757
- # info is available in currencies only if the user has configured his api keys
2758
- if self.safe_value(self.currencies[code], 'precision') is not None:
2759
- return self.decimal_to_precision(fee, TRUNCATE, self.currencies[code]['precision'], self.precisionMode, self.paddingMode)
2760
- else:
2761
- return self.number_to_string(fee)
2762
-
2763
2757
  def nonce(self):
2764
2758
  return self.milliseconds() - self.options['timeDifference']
2765
2759
 
@@ -7366,6 +7360,7 @@ class binance(Exchange, ImplicitAPI):
7366
7360
  :param str[] ids: order ids
7367
7361
  :param str [symbol]: unified market symbol
7368
7362
  :param dict [params]: extra parameters specific to the exchange API endpoint
7363
+ :param str[] [params.clientOrderIds]: alternative to ids, array of client order ids
7369
7364
 
7370
7365
  EXCHANGE SPECIFIC PARAMETERS
7371
7366
  :param str[] [params.origClientOrderIdList]: max length 10 e.g. ["my_id_1","my_id_2"], encode the double quotes. No space after comma
@@ -7380,8 +7375,14 @@ class binance(Exchange, ImplicitAPI):
7380
7375
  raise BadRequest(self.id + ' cancelOrders is only supported for swap markets.')
7381
7376
  request: dict = {
7382
7377
  'symbol': market['id'],
7383
- 'orderidlist': ids,
7378
+ # 'orderidlist': ids,
7384
7379
  }
7380
+ origClientOrderIdList = self.safe_list_2(params, 'origClientOrderIdList', 'clientOrderIds')
7381
+ if origClientOrderIdList is not None:
7382
+ params = self.omit(params, ['clientOrderIds'])
7383
+ request['origClientOrderIdList'] = origClientOrderIdList
7384
+ else:
7385
+ request['orderidlist'] = ids
7385
7386
  response = None
7386
7387
  if market['linear']:
7387
7388
  response = await self.fapiPrivateDeleteBatchOrders(self.extend(request, params))
@@ -8864,7 +8865,6 @@ class binance(Exchange, ImplicitAPI):
8864
8865
  request: dict = {
8865
8866
  'coin': currency['id'],
8866
8867
  'address': address,
8867
- 'amount': self.currency_to_precision(code, amount),
8868
8868
  # issue sapiGetCapitalConfigGetall() to get networks for withdrawing USDT ERC20 vs USDT Omni
8869
8869
  # 'network': 'ETH', # 'BTC', 'TRX', etc, optional
8870
8870
  }
@@ -8876,6 +8876,7 @@ class binance(Exchange, ImplicitAPI):
8876
8876
  if network is not None:
8877
8877
  request['network'] = network
8878
8878
  params = self.omit(params, 'network')
8879
+ request['amount'] = self.currency_to_precision(code, amount, network)
8879
8880
  response = await self.sapiPostCapitalWithdrawApply(self.extend(request, params))
8880
8881
  # {id: '9a67628b16ba4988ae20d329333f16bc'}
8881
8882
  return self.parse_transaction(response, currency)
@@ -11253,15 +11254,19 @@ class binance(Exchange, ImplicitAPI):
11253
11254
  elif (path == 'batchOrders') or (path.find('sub-account') >= 0) or (path == 'capital/withdraw/apply') or (path.find('staking') >= 0) or (path.find('simple-earn') >= 0):
11254
11255
  if (method == 'DELETE') and (path == 'batchOrders'):
11255
11256
  orderidlist = self.safe_list(extendedParams, 'orderidlist', [])
11256
- origclientorderidlist = self.safe_list(extendedParams, 'origclientorderidlist', [])
11257
- extendedParams = self.omit(extendedParams, ['orderidlist', 'origclientorderidlist'])
11257
+ origclientorderidlist = self.safe_list_2(extendedParams, 'origclientorderidlist', 'origClientOrderIdList', [])
11258
+ extendedParams = self.omit(extendedParams, ['orderidlist', 'origclientorderidlist', 'origClientOrderIdList'])
11258
11259
  query = self.rawencode(extendedParams)
11259
11260
  orderidlistLength = len(orderidlist)
11260
11261
  origclientorderidlistLength = len(origclientorderidlist)
11261
11262
  if orderidlistLength > 0:
11262
11263
  query = query + '&' + 'orderidlist=%5B' + '%2C'.join(orderidlist) + '%5D'
11263
11264
  if origclientorderidlistLength > 0:
11264
- query = query + '&' + 'origclientorderidlist=%5B' + '%2C'.join(origclientorderidlist) + '%5D'
11265
+ # wrap clientOrderids around ""
11266
+ newClientOrderIds = []
11267
+ for i in range(0, origclientorderidlistLength):
11268
+ newClientOrderIds.append('%22' + origclientorderidlist[i] + '%22')
11269
+ query = query + '&' + 'origclientorderidlist=%5B' + '%2C'.join(newClientOrderIds) + '%5D'
11265
11270
  else:
11266
11271
  query = self.rawencode(extendedParams)
11267
11272
  else:
@@ -1917,7 +1917,7 @@ class bitget(Exchange, ImplicitAPI):
1917
1917
  res = self.safe_dict(results, i)
1918
1918
  data = self.safe_list(res, 'data', [])
1919
1919
  firstData = self.safe_dict(data, 0, {})
1920
- isBorrowable = self.safe_string(firstData, 'isBorrowable')
1920
+ isBorrowable = self.safe_bool(firstData, 'isBorrowable')
1921
1921
  if fetchMargins and isBorrowable is not None:
1922
1922
  keysList = list(self.index_by(data, 'symbol').keys())
1923
1923
  self.options['crossMarginPairsData'] = keysList
@@ -2193,34 +2193,44 @@ class coinbase(Exchange, ImplicitAPI):
2193
2193
  # fetchTickersV3
2194
2194
  #
2195
2195
  # [
2196
- # {
2197
- # "product_id": "TONE-USD",
2198
- # "price": "0.01523",
2199
- # "price_percentage_change_24h": "1.94109772423025",
2200
- # "volume_24h": "19773129",
2201
- # "volume_percentage_change_24h": "437.0170530929949",
2202
- # "base_increment": "1",
2203
- # "quote_increment": "0.00001",
2204
- # "quote_min_size": "1",
2205
- # "quote_max_size": "10000000",
2206
- # "base_min_size": "26.7187147229469674",
2207
- # "base_max_size": "267187147.2294696735908216",
2208
- # "base_name": "TE-FOOD",
2209
- # "quote_name": "US Dollar",
2210
- # "watched": False,
2211
- # "is_disabled": False,
2212
- # "new": False,
2213
- # "status": "online",
2214
- # "cancel_only": False,
2215
- # "limit_only": False,
2216
- # "post_only": False,
2217
- # "trading_disabled": False,
2218
- # "auction_mode": False,
2219
- # "product_type": "SPOT",
2220
- # "quote_currency_id": "USD",
2221
- # "base_currency_id": "TONE",
2222
- # "fcm_trading_session_details": null,
2223
- # "mid_market_price": ""
2196
+ # {
2197
+ # "product_id": "ETH-USD",
2198
+ # "price": "4471.59",
2199
+ # "price_percentage_change_24h": "0.14243387238731",
2200
+ # "volume_24h": "87329.92990204",
2201
+ # "volume_percentage_change_24h": "-60.7789801794578",
2202
+ # "base_increment": "0.00000001",
2203
+ # "quote_increment": "0.01",
2204
+ # "quote_min_size": "1",
2205
+ # "quote_max_size": "150000000",
2206
+ # "base_min_size": "0.00000001",
2207
+ # "base_max_size": "42000",
2208
+ # "base_name": "Ethereum",
2209
+ # "quote_name": "US Dollar",
2210
+ # "watched": False,
2211
+ # "is_disabled": False,
2212
+ # "new": False,
2213
+ # "status": "online",
2214
+ # "cancel_only": False,
2215
+ # "limit_only": False,
2216
+ # "post_only": False,
2217
+ # "trading_disabled": False,
2218
+ # "auction_mode": False,
2219
+ # "product_type": "SPOT",
2220
+ # "quote_currency_id": "USD",
2221
+ # "base_currency_id": "ETH",
2222
+ # "fcm_trading_session_details": null,
2223
+ # "mid_market_price": "",
2224
+ # "alias": "",
2225
+ # "alias_to": ["ETH-USDC"],
2226
+ # "base_display_symbol": "ETH",
2227
+ # "quote_display_symbol": "USD",
2228
+ # "view_only": False,
2229
+ # "price_increment": "0.01",
2230
+ # "display_name": "ETH-USD",
2231
+ # "product_venue": "CBE",
2232
+ # "approximate_quote_24h_volume": "390503641.25",
2233
+ # "new_at": "2023-01-01T00:00:00Z"
2224
2234
  # },
2225
2235
  # ...
2226
2236
  # ]
@@ -2251,10 +2261,12 @@ class coinbase(Exchange, ImplicitAPI):
2251
2261
  if ('bids' in ticker):
2252
2262
  bids = self.safe_list(ticker, 'bids', [])
2253
2263
  asks = self.safe_list(ticker, 'asks', [])
2254
- bid = self.safe_number(bids[0], 'price')
2255
- bidVolume = self.safe_number(bids[0], 'size')
2256
- ask = self.safe_number(asks[0], 'price')
2257
- askVolume = self.safe_number(asks[0], 'size')
2264
+ firstBid = self.safe_dict(bids, 0, {})
2265
+ firstAsk = self.safe_dict(asks, 0, {})
2266
+ bid = self.safe_number(firstBid, 'price')
2267
+ bidVolume = self.safe_number(firstBid, 'size')
2268
+ ask = self.safe_number(firstAsk, 'price')
2269
+ askVolume = self.safe_number(firstAsk, 'size')
2258
2270
  marketId = self.safe_string(ticker, 'product_id')
2259
2271
  market = self.safe_market(marketId, market)
2260
2272
  last = self.safe_number(ticker, 'price')
@@ -2277,8 +2289,8 @@ class coinbase(Exchange, ImplicitAPI):
2277
2289
  'change': None,
2278
2290
  'percentage': self.safe_number(ticker, 'price_percentage_change_24h'),
2279
2291
  'average': None,
2280
- 'baseVolume': None,
2281
- 'quoteVolume': None,
2292
+ 'baseVolume': self.safe_number(ticker, 'volume_24h'),
2293
+ 'quoteVolume': self.safe_number(ticker, 'approximate_quote_24h_volume'),
2282
2294
  'info': ticker,
2283
2295
  }, market)
2284
2296
 
@@ -765,6 +765,9 @@ class gate(Exchange, ImplicitAPI):
765
765
  'option': 'options',
766
766
  'options': 'options',
767
767
  },
768
+ 'fetchMarkets': {
769
+ 'types': ['spot', 'swap', 'future', 'option'],
770
+ },
768
771
  'swap': {
769
772
  'fetchMarkets': {
770
773
  'settlementCurrencies': ['usdt', 'btc'],
@@ -1234,21 +1237,24 @@ class gate(Exchange, ImplicitAPI):
1234
1237
  await self.load_time_difference()
1235
1238
  if self.check_required_credentials(False):
1236
1239
  await self.load_unified_status()
1240
+ rawPromises = []
1237
1241
  sandboxMode = self.safe_bool(self.options, 'sandboxMode', False)
1238
- rawPromises = [
1239
- self.fetch_contract_markets(params),
1240
- self.fetch_option_markets(params),
1241
- ]
1242
- if not sandboxMode:
1243
- # gate doesn't have a sandbox for spot markets
1244
- mainnetOnly = [self.fetch_spot_markets(params)]
1245
- rawPromises = self.array_concat(rawPromises, mainnetOnly)
1246
- promises = await asyncio.gather(*rawPromises)
1247
- spotMarkets = self.safe_value(promises, 0, [])
1248
- contractMarkets = self.safe_value(promises, 1, [])
1249
- optionMarkets = self.safe_value(promises, 2, [])
1250
- markets = self.array_concat(spotMarkets, contractMarkets)
1251
- return self.array_concat(markets, optionMarkets)
1242
+ fetchMarketsOptions = self.safe_dict(self.options, 'fetchMarkets')
1243
+ types = self.safe_list(fetchMarketsOptions, 'types', ['spot', 'swap', 'future', 'option'])
1244
+ for i in range(0, len(types)):
1245
+ marketType = types[i]
1246
+ if marketType == 'spot':
1247
+ if not sandboxMode:
1248
+ # gate doesn't have a sandbox for spot markets
1249
+ rawPromises.append(self.fetch_spot_markets(params))
1250
+ elif marketType == 'swap':
1251
+ rawPromises.append(self.fetch_swap_markets(params))
1252
+ elif marketType == 'future':
1253
+ rawPromises.append(self.fetch_future_markets(params))
1254
+ elif marketType == 'option':
1255
+ rawPromises.append(self.fetch_option_markets(params))
1256
+ results = await asyncio.gather(*rawPromises)
1257
+ return self.arrays_concat(results)
1252
1258
 
1253
1259
  async def fetch_spot_markets(self, params={}):
1254
1260
  marginPromise = self.publicMarginGetCurrencyPairs(params)
@@ -1363,10 +1369,9 @@ class gate(Exchange, ImplicitAPI):
1363
1369
  })
1364
1370
  return result
1365
1371
 
1366
- async def fetch_contract_markets(self, params={}):
1372
+ async def fetch_swap_markets(self, params={}):
1367
1373
  result = []
1368
1374
  swapSettlementCurrencies = self.get_settlement_currencies('swap', 'fetchMarkets')
1369
- futureSettlementCurrencies = self.get_settlement_currencies('future', 'fetchMarkets')
1370
1375
  for c in range(0, len(swapSettlementCurrencies)):
1371
1376
  settleId = swapSettlementCurrencies[c]
1372
1377
  request: dict = {
@@ -1376,6 +1381,11 @@ class gate(Exchange, ImplicitAPI):
1376
1381
  for i in range(0, len(response)):
1377
1382
  parsedMarket = self.parse_contract_market(response[i], settleId)
1378
1383
  result.append(parsedMarket)
1384
+ return result
1385
+
1386
+ async def fetch_future_markets(self, params={}):
1387
+ result = []
1388
+ futureSettlementCurrencies = self.get_settlement_currencies('future', 'fetchMarkets')
1379
1389
  for c in range(0, len(futureSettlementCurrencies)):
1380
1390
  settleId = futureSettlementCurrencies[c]
1381
1391
  request: dict = {
@@ -2543,7 +2553,11 @@ class gate(Exchange, ImplicitAPI):
2543
2553
  #
2544
2554
  request, query = self.prepare_request(market, market['type'], params)
2545
2555
  if limit is not None:
2546
- request['limit'] = limit # default 10, max 100
2556
+ if market['spot']:
2557
+ limit = min(limit, 1000)
2558
+ else:
2559
+ limit = min(limit, 300)
2560
+ request['limit'] = limit
2547
2561
  request['with_id'] = True
2548
2562
  response = None
2549
2563
  if market['spot'] or market['margin']:
@@ -276,7 +276,7 @@ class gemini(Exchange, ImplicitAPI):
276
276
  'fetchMarketFromWebRetries': 10,
277
277
  'fetchMarketsFromAPI': {
278
278
  'fetchDetailsForAllSymbols': False,
279
- 'quoteCurrencies': ['USDT', 'GUSD', 'USD', 'DAI', 'EUR', 'GBP', 'SGD', 'BTC', 'ETH', 'LTC', 'BCH', 'SOL'],
279
+ 'quoteCurrencies': ['USDT', 'GUSD', 'USD', 'DAI', 'EUR', 'GBP', 'SGD', 'BTC', 'ETH', 'LTC', 'BCH', 'SOL', 'USDC'],
280
280
  },
281
281
  'fetchMarkets': {
282
282
  'webApiEnable': True, # fetches from WEB
@@ -1562,7 +1562,7 @@ class hibachi(Exchange, ImplicitAPI):
1562
1562
  def sign(self, path, api='public', method='GET', params={}, headers=None, body=None):
1563
1563
  endpoint = '/' + self.implode_params(path, params)
1564
1564
  url = self.urls['api'][api] + endpoint
1565
- headers = {}
1565
+ headers = {'Hibachi-Client': 'HibachiCCXT/unversioned'}
1566
1566
  if method == 'GET':
1567
1567
  request = self.omit(params, self.extract_params(path))
1568
1568
  query = self.urlencode(request)
@@ -2284,6 +2284,7 @@ class hyperliquid(Exchange, ImplicitAPI):
2284
2284
  :param str id: order id
2285
2285
  :param str symbol: unified symbol of the market the order was made in
2286
2286
  :param dict [params]: extra parameters specific to the exchange API endpoint
2287
+ :param str [params.clientOrderId]: client order id,(optional 128 bit hex string e.g. 0x1234567890abcdef1234567890abcdef)
2287
2288
  :param str [params.user]: user address, will default to self.walletAddress if not provided
2288
2289
  :param str [params.subAccountAddress]: sub account user address
2289
2290
  :returns dict: An `order structure <https://docs.ccxt.com/#/?id=order-structure>`
@@ -2292,12 +2293,18 @@ class hyperliquid(Exchange, ImplicitAPI):
2292
2293
  userAddress, params = self.handle_public_address('fetchOrder', params)
2293
2294
  await self.load_markets()
2294
2295
  market = self.safe_market(symbol)
2295
- isClientOrderId = len(id) >= 34
2296
+ clientOrderId = self.safe_string(params, 'clientOrderId')
2296
2297
  request: dict = {
2297
2298
  'type': 'orderStatus',
2298
- 'oid': id if isClientOrderId else self.parse_to_numeric(id),
2299
+ # 'oid': id if isClientOrderId else self.parse_to_numeric(id),
2299
2300
  'user': userAddress,
2300
2301
  }
2302
+ if clientOrderId is not None:
2303
+ params = self.omit(params, 'clientOrderId')
2304
+ request['oid'] = clientOrderId
2305
+ else:
2306
+ isClientOrderId = len(id) >= 34
2307
+ request['oid'] = id if isClientOrderId else self.parse_to_numeric(id)
2301
2308
  response = await self.publicPostInfo(self.extend(request, params))
2302
2309
  #
2303
2310
  # {
@@ -3669,11 +3676,15 @@ class hyperliquid(Exchange, ImplicitAPI):
3669
3676
  # }
3670
3677
  # {"status":"ok","response":{"type":"order","data":{"statuses":[{"error":"Insufficient margin to place order. asset=84"}]}}}
3671
3678
  #
3679
+ # {"status":"unknownOid"}
3680
+ #
3672
3681
  status = self.safe_string(response, 'status', '')
3673
3682
  error = self.safe_string(response, 'error')
3674
3683
  message = None
3675
3684
  if status == 'err':
3676
3685
  message = self.safe_string(response, 'response')
3686
+ elif status == 'unknownOid':
3687
+ raise OrderNotFound(self.id + ' ' + body) # {"status":"unknownOid"}
3677
3688
  elif error is not None:
3678
3689
  message = error
3679
3690
  else:
@@ -204,6 +204,16 @@ class indodax(Exchange, ImplicitAPI):
204
204
  'Minimum order': InvalidOrder,
205
205
  },
206
206
  },
207
+ 'timeframes': {
208
+ '1m': '1',
209
+ '15m': '15',
210
+ '30m': '30',
211
+ '1h': '60',
212
+ '4h': '240',
213
+ '1d': '1D',
214
+ '3d': '3D',
215
+ '1w': '1W',
216
+ },
207
217
  # exchange-specific options
208
218
  'options': {
209
219
  'recvWindow': 5 * 1000, # default 5 sec
@@ -227,16 +237,6 @@ class indodax(Exchange, ImplicitAPI):
227
237
  # 'ETH': 'eth'
228
238
  # 'BASE': 'base'
229
239
  },
230
- 'timeframes': {
231
- '1m': '1',
232
- '15m': '15',
233
- '30m': '30',
234
- '1h': '60',
235
- '4h': '240',
236
- '1d': '1D',
237
- '3d': '3D',
238
- '1w': '1W',
239
- },
240
240
  },
241
241
  'features': {
242
242
  'spot': {
@@ -690,8 +690,7 @@ class indodax(Exchange, ImplicitAPI):
690
690
  """
691
691
  await self.load_markets()
692
692
  market = self.market(symbol)
693
- timeframes = self.options['timeframes']
694
- selectedTimeframe = self.safe_string(timeframes, timeframe, timeframe)
693
+ selectedTimeframe = self.safe_string(self.timeframes, timeframe, timeframe)
695
694
  now = self.seconds()
696
695
  until = self.safe_integer(params, 'until', now)
697
696
  params = self.omit(params, ['until'])
@@ -252,6 +252,7 @@ class kraken(Exchange, ImplicitAPI):
252
252
  'UST': 'USTC',
253
253
  'XBT': 'BTC',
254
254
  'XDG': 'DOGE',
255
+ 'FEE': 'KFEE',
255
256
  },
256
257
  'options': {
257
258
  'timeDifference': 0, # the difference between system clock and Binance clock
@@ -716,14 +717,6 @@ class kraken(Exchange, ImplicitAPI):
716
717
  self.options['marketsByAltname'] = self.index_by(result, 'altname')
717
718
  return result
718
719
 
719
- def safe_currency(self, currencyId, currency: Currency = None):
720
- if currencyId is not None:
721
- if len(currencyId) > 3:
722
- if (currencyId.find('X') == 0) or (currencyId.find('Z') == 0):
723
- if not (currencyId.find('.') > 0) and (currencyId != 'ZEUS'):
724
- currencyId = currencyId[1:]
725
- return super(kraken, self).safe_currency(currencyId, currency)
726
-
727
720
  async def fetch_status(self, params={}):
728
721
  """
729
722
  the latest known information on the availability of the exchange API