ccxt 4.5.0__py2.py3-none-any.whl → 4.5.1__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 CHANGED
@@ -22,7 +22,7 @@
22
22
 
23
23
  # ----------------------------------------------------------------------------
24
24
 
25
- __version__ = '4.5.0'
25
+ __version__ = '4.5.1'
26
26
 
27
27
  # ----------------------------------------------------------------------------
28
28
 
@@ -4,7 +4,7 @@
4
4
 
5
5
  # -----------------------------------------------------------------------------
6
6
 
7
- __version__ = '4.5.0'
7
+ __version__ = '4.5.1'
8
8
 
9
9
  # -----------------------------------------------------------------------------
10
10
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  # -----------------------------------------------------------------------------
4
4
 
5
- __version__ = '4.5.0'
5
+ __version__ = '4.5.1'
6
6
 
7
7
  # -----------------------------------------------------------------------------
8
8
 
@@ -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:
@@ -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
@@ -115,7 +115,7 @@ class krakenfutures(Exchange, ImplicitAPI):
115
115
  },
116
116
  'www': 'https://futures.kraken.com/',
117
117
  'doc': [
118
- 'https://docs.futures.kraken.com/#introduction',
118
+ 'https://docs.kraken.com/api/docs/futures-api/trading/market-data/',
119
119
  ],
120
120
  'fees': 'https://support.kraken.com/hc/en-us/articles/360022835771-Transaction-fees-and-rebates-for-Kraken-Futures',
121
121
  'referral': None,
@@ -378,7 +378,7 @@ class krakenfutures(Exchange, ImplicitAPI):
378
378
  """
379
379
  Fetches the available trading markets from the exchange, Multi-collateral markets are returned markets, but can be settled in multiple currencies
380
380
 
381
- https://docs.futures.kraken.com/#http-api-trading-v3-api-instrument-details-get-instruments
381
+ https://docs.kraken.com/api/docs/futures-api/trading/get-instruments
382
382
 
383
383
  :param dict [params]: exchange specific params
384
384
  :returns: An array of market structures
@@ -545,7 +545,7 @@ class krakenfutures(Exchange, ImplicitAPI):
545
545
  async def fetch_order_book(self, symbol: str, limit: Int = None, params={}) -> OrderBook:
546
546
  """
547
547
 
548
- https://docs.futures.kraken.com/#http-api-trading-v3-api-market-data-get-orderbook
548
+ https://docs.kraken.com/api/docs/futures-api/trading/get-orderbook
549
549
 
550
550
  Fetches a list of open orders in a market
551
551
  :param str symbol: Unified market symbol
@@ -596,7 +596,7 @@ class krakenfutures(Exchange, ImplicitAPI):
596
596
  """
597
597
  fetches price tickers for multiple markets, statistical information calculated over the past 24 hours for each market
598
598
 
599
- https://docs.futures.kraken.com/#http-api-trading-v3-api-market-data-get-tickers
599
+ https://docs.kraken.com/api/docs/futures-api/trading/get-tickers
600
600
 
601
601
  :param str[] symbols: unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned
602
602
  :param dict [params]: extra parameters specific to the exchange API endpoint
@@ -712,7 +712,7 @@ class krakenfutures(Exchange, ImplicitAPI):
712
712
  async def fetch_ohlcv(self, symbol: str, timeframe='1m', since: Int = None, limit: Int = None, params={}) -> List[list]:
713
713
  """
714
714
 
715
- https://docs.futures.kraken.com/#http-api-charts-candles
715
+ https://docs.kraken.com/api/docs/futures-api/charts/candles
716
716
 
717
717
  fetches historical candlestick data containing the open, high, low, and close price, and the volume of a market
718
718
  :param str symbol: unified symbol of the market to fetch OHLCV data for
@@ -791,8 +791,8 @@ class krakenfutures(Exchange, ImplicitAPI):
791
791
  async def fetch_trades(self, symbol: str, since: Int = None, limit: Int = None, params={}) -> List[Trade]:
792
792
  """
793
793
 
794
- https://docs.futures.kraken.com/#http-api-trading-v3-api-market-data-get-trade-history
795
- https://docs.futures.kraken.com/#http-api-history-market-history-get-public-execution-events
794
+ https://docs.kraken.com/api/docs/futures-api/trading/get-history
795
+ https://docs.kraken.com/api/docs/futures-api/history/get-public-execution-events
796
796
 
797
797
  Fetch a history of filled trades that self account has made
798
798
  :param str symbol: Unified CCXT market symbol
@@ -1205,7 +1205,7 @@ class krakenfutures(Exchange, ImplicitAPI):
1205
1205
  async def edit_order(self, id: str, symbol: str, type: OrderType, side: OrderSide, amount: Num = None, price: Num = None, params={}):
1206
1206
  """
1207
1207
 
1208
- https://docs.futures.kraken.com/#http-api-trading-v3-api-order-management-edit-order
1208
+ https://docs.kraken.com/api/docs/futures-api/trading/edit-order-spring
1209
1209
 
1210
1210
  Edit an open order on the exchange
1211
1211
  :param str id: order id
@@ -1235,7 +1235,7 @@ class krakenfutures(Exchange, ImplicitAPI):
1235
1235
  async def cancel_order(self, id: str, symbol: Str = None, params={}):
1236
1236
  """
1237
1237
 
1238
- https://docs.futures.kraken.com/#http-api-trading-v3-api-order-management-cancel-order
1238
+ https://docs.kraken.com/api/docs/futures-api/trading/cancel-order
1239
1239
 
1240
1240
  Cancel an open order on the exchange
1241
1241
  :param str id: Order id
@@ -1256,7 +1256,7 @@ class krakenfutures(Exchange, ImplicitAPI):
1256
1256
  """
1257
1257
  cancel multiple orders
1258
1258
 
1259
- https://docs.futures.kraken.com/#http-api-trading-v3-api-order-management-batch-order-management
1259
+ https://docs.kraken.com/api/docs/futures-api/trading/send-batch-order
1260
1260
 
1261
1261
  :param str[] ids: order ids
1262
1262
  :param str [symbol]: unified market symbol
@@ -1315,7 +1315,7 @@ class krakenfutures(Exchange, ImplicitAPI):
1315
1315
  async def cancel_all_orders(self, symbol: Str = None, params={}):
1316
1316
  """
1317
1317
 
1318
- https://docs.futures.kraken.com/#http-api-trading-v3-api-order-management-cancel-all-orders
1318
+ https://docs.kraken.com/api/docs/futures-api/trading/cancel-all-orders
1319
1319
 
1320
1320
  Cancels all orders on the exchange, including trigger orders
1321
1321
  :param str symbol: Unified market symbol
@@ -1370,7 +1370,7 @@ class krakenfutures(Exchange, ImplicitAPI):
1370
1370
  """
1371
1371
  dead man's switch, cancel all orders after the given timeout
1372
1372
 
1373
- https://docs.futures.kraken.com/#http-api-trading-v3-api-order-management-dead-man-39-s-switch
1373
+ https://docs.kraken.com/api/docs/futures-api/trading/cancel-all-orders-after
1374
1374
 
1375
1375
  :param number timeout: time in milliseconds, 0 represents cancel the timer
1376
1376
  :param dict [params]: extra parameters specific to the exchange API endpoint
@@ -1396,7 +1396,7 @@ class krakenfutures(Exchange, ImplicitAPI):
1396
1396
  async def fetch_open_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
1397
1397
  """
1398
1398
 
1399
- https://docs.futures.kraken.com/#http-api-trading-v3-api-order-management-get-open-orders
1399
+ https://docs.kraken.com/api/docs/futures-api/trading/get-open-orders
1400
1400
 
1401
1401
  Gets all open orders, including trigger orders, for an account from the exchange api
1402
1402
  :param str symbol: Unified market symbol
@@ -1452,7 +1452,7 @@ class krakenfutures(Exchange, ImplicitAPI):
1452
1452
  async def fetch_canceled_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
1453
1453
  """
1454
1454
 
1455
- https://docs.futures.kraken.com/#http-api-history-account-history-get-order-events
1455
+ https://docs.kraken.com/api/docs/futures-api/history/get-order-events
1456
1456
 
1457
1457
  Gets all canceled orders, including trigger orders, for an account from the exchange api
1458
1458
  :param str symbol: Unified market symbol
@@ -1905,7 +1905,7 @@ class krakenfutures(Exchange, ImplicitAPI):
1905
1905
  """
1906
1906
  fetch all trades made by the user
1907
1907
 
1908
- https://docs.futures.kraken.com/#http-api-trading-v3-api-historical-data-get-your-fills
1908
+ https://docs.kraken.com/api/docs/futures-api/trading/get-fills
1909
1909
 
1910
1910
  :param str symbol: unified market symbol
1911
1911
  :param int [since]: *not used by the api* the earliest time in ms to fetch trades for
@@ -1945,7 +1945,7 @@ class krakenfutures(Exchange, ImplicitAPI):
1945
1945
  async def fetch_balance(self, params={}) -> Balances:
1946
1946
  """
1947
1947
 
1948
- https://docs.futures.kraken.com/#http-api-trading-v3-api-account-information-get-wallets
1948
+ https://docs.kraken.com/api/docs/futures-api/trading/get-accounts
1949
1949
 
1950
1950
  Fetch the balance for a sub-account, all sub-account balances are inside 'info' in the response
1951
1951
  :param dict [params]: Exchange specific parameters
@@ -2160,7 +2160,7 @@ class krakenfutures(Exchange, ImplicitAPI):
2160
2160
  """
2161
2161
  fetch the current funding rates for multiple markets
2162
2162
 
2163
- https://docs.futures.kraken.com/#http-api-trading-v3-api-market-data-get-tickers
2163
+ https://docs.kraken.com/api/docs/futures-api/trading/get-tickers
2164
2164
 
2165
2165
  :param str[] symbols: unified market symbols
2166
2166
  :param dict [params]: extra parameters specific to the exchange API endpoint
@@ -2243,7 +2243,7 @@ class krakenfutures(Exchange, ImplicitAPI):
2243
2243
  """
2244
2244
  fetches historical funding rate prices
2245
2245
 
2246
- https://docs.futures.kraken.com/#http-api-trading-v3-api-historical-funding-rates-historical-funding-rates
2246
+ https://docs.kraken.com/api/docs/futures-api/trading/historical-funding-rates
2247
2247
 
2248
2248
  :param str symbol: unified symbol of the market to fetch the funding rate history for
2249
2249
  :param int [since]: timestamp in ms of the earliest funding rate to fetch
@@ -2291,7 +2291,7 @@ class krakenfutures(Exchange, ImplicitAPI):
2291
2291
  async def fetch_positions(self, symbols: Strings = None, params={}) -> List[Position]:
2292
2292
  """
2293
2293
 
2294
- https://docs.futures.kraken.com/#http-api-trading-v3-api-account-information-get-open-positions
2294
+ https://docs.kraken.com/api/docs/futures-api/trading/get-open-positions
2295
2295
 
2296
2296
  Fetches current contract trading positions
2297
2297
  :param str[] symbols: List of unified symbols
@@ -2386,7 +2386,7 @@ class krakenfutures(Exchange, ImplicitAPI):
2386
2386
  """
2387
2387
  retrieve information on the maximum leverage, and maintenance margin for trades of varying trade sizes
2388
2388
 
2389
- https://docs.futures.kraken.com/#http-api-trading-v3-api-instrument-details-get-instruments
2389
+ https://docs.kraken.com/api/docs/futures-api/trading/get-instruments
2390
2390
 
2391
2391
  :param str[]|None symbols: list of unified market symbols
2392
2392
  :param dict [params]: extra parameters specific to the exchange API endpoint
@@ -2565,8 +2565,8 @@ class krakenfutures(Exchange, ImplicitAPI):
2565
2565
  async def transfer(self, code: str, amount: float, fromAccount: str, toAccount: str, params={}) -> TransferEntry:
2566
2566
  """
2567
2567
 
2568
- https://docs.futures.kraken.com/#http-api-trading-v3-api-transfers-initiate-wallet-transfer
2569
- https://docs.futures.kraken.com/#http-api-trading-v3-api-transfers-initiate-withdrawal-to-spot-wallet
2568
+ https://docs.kraken.com/api/docs/futures-api/trading/transfer
2569
+ https://docs.kraken.com/api/docs/futures-api/trading/sub-account-transfer
2570
2570
 
2571
2571
  transfers currencies between sub-accounts
2572
2572
  :param str code: Unified currency code
@@ -2611,7 +2611,7 @@ class krakenfutures(Exchange, ImplicitAPI):
2611
2611
  """
2612
2612
  set the level of leverage for a market
2613
2613
 
2614
- https://docs.futures.kraken.com/#http-api-trading-v3-api-multi-collateral-set-the-leverage-setting-for-a-market
2614
+ https://docs.kraken.com/api/docs/futures-api/trading/set-leverage-setting
2615
2615
 
2616
2616
  :param float leverage: the rate of leverage
2617
2617
  :param str symbol: unified market symbol
@@ -2634,7 +2634,7 @@ class krakenfutures(Exchange, ImplicitAPI):
2634
2634
  """
2635
2635
  fetch the set leverage for all contract and margin markets
2636
2636
 
2637
- https://docs.futures.kraken.com/#http-api-trading-v3-api-multi-collateral-get-the-leverage-setting-for-a-market
2637
+ https://docs.kraken.com/api/docs/futures-api/trading/get-leverage-setting
2638
2638
 
2639
2639
  :param str[] [symbols]: a list of unified market symbols
2640
2640
  :param dict [params]: extra parameters specific to the exchange API endpoint
@@ -2661,7 +2661,7 @@ class krakenfutures(Exchange, ImplicitAPI):
2661
2661
  """
2662
2662
  fetch the set leverage for a market
2663
2663
 
2664
- https://docs.futures.kraken.com/#http-api-trading-v3-api-multi-collateral-get-the-leverage-setting-for-a-market
2664
+ https://docs.kraken.com/api/docs/futures-api/trading/get-leverage-setting
2665
2665
 
2666
2666
  :param str symbol: unified market symbol
2667
2667
  :param dict [params]: extra parameters specific to the exchange API endpoint
@@ -681,6 +681,7 @@ class mexc(Exchange, ImplicitAPI):
681
681
  'BNB Smart Chain(BEP20-RACAV1)': 'BSC',
682
682
  'BNB Smart Chain(BEP20-RACAV2)': 'BSC',
683
683
  'BNB Smart Chain(BEP20)': 'BSC',
684
+ 'Ethereum(ERC20)': 'ERC20',
684
685
  # TODO: uncomment below after deciding unified name
685
686
  # 'PEPE COIN BSC':
686
687
  # 'SMART BLOCKCHAIN':
@@ -4961,7 +4962,7 @@ class mexc(Exchange, ImplicitAPI):
4961
4962
  # positionShowStatus: 'CLOSED'
4962
4963
  # }
4963
4964
  #
4964
- market = self.safe_market(self.safe_string(position, 'symbol'), market)
4965
+ market = self.safe_market(self.safe_string(position, 'symbol'), market, None, 'swap')
4965
4966
  symbol = market['symbol']
4966
4967
  contracts = self.safe_string(position, 'holdVol')
4967
4968
  entryPrice = self.safe_number(position, 'openAvgPrice')
@@ -39,17 +39,27 @@ class timex(Exchange, ImplicitAPI):
39
39
  'future': False,
40
40
  'option': False,
41
41
  'addMargin': False,
42
+ 'borrowCrossMargin': False,
43
+ 'borrowIsolatedMargin': False,
44
+ 'borrowMargin': False,
42
45
  'cancelOrder': True,
43
46
  'cancelOrders': True,
47
+ 'closeAllPositions': False,
48
+ 'closePosition': False,
44
49
  'createOrder': True,
45
50
  'createReduceOnlyOrder': False,
46
51
  'createStopLimitOrder': False,
47
52
  'createStopMarketOrder': False,
48
53
  'createStopOrder': False,
49
54
  'editOrder': True,
55
+ 'fetchAllGreeks': False,
50
56
  'fetchBalance': True,
57
+ 'fetchBorrowInterest': False,
58
+ 'fetchBorrowRate': False,
51
59
  'fetchBorrowRateHistories': False,
52
60
  'fetchBorrowRateHistory': False,
61
+ 'fetchBorrowRates': False,
62
+ 'fetchBorrowRatesPerSymbol': False,
53
63
  'fetchClosedOrders': True,
54
64
  'fetchCrossBorrowRate': False,
55
65
  'fetchCrossBorrowRates': False,
@@ -60,21 +70,40 @@ class timex(Exchange, ImplicitAPI):
60
70
  'fetchDepositAddressesByNetwork': False,
61
71
  'fetchDeposits': True,
62
72
  'fetchFundingHistory': False,
73
+ 'fetchFundingInterval': False,
74
+ 'fetchFundingIntervals': False,
63
75
  'fetchFundingRate': False,
64
76
  'fetchFundingRateHistory': False,
65
77
  'fetchFundingRates': False,
78
+ 'fetchGreeks': False,
66
79
  'fetchIndexOHLCV': False,
67
80
  'fetchIsolatedBorrowRate': False,
68
81
  'fetchIsolatedBorrowRates': False,
82
+ 'fetchIsolatedPositions': False,
69
83
  'fetchLeverage': False,
84
+ 'fetchLeverages': False,
70
85
  'fetchLeverageTiers': False,
86
+ 'fetchLiquidations': False,
87
+ 'fetchLongShortRatio': False,
88
+ 'fetchLongShortRatioHistory': False,
89
+ 'fetchMarginAdjustmentHistory': False,
71
90
  'fetchMarginMode': False,
91
+ 'fetchMarginModes': False,
92
+ 'fetchMarketLeverageTiers': False,
72
93
  'fetchMarkets': True,
73
94
  'fetchMarkOHLCV': False,
95
+ 'fetchMarkPrice': False,
96
+ 'fetchMarkPrices': False,
97
+ 'fetchMyLiquidations': False,
98
+ 'fetchMySettlementHistory': False,
74
99
  'fetchMyTrades': True,
75
100
  'fetchOHLCV': True,
101
+ 'fetchOpenInterest': False,
76
102
  'fetchOpenInterestHistory': False,
103
+ 'fetchOpenInterests': False,
77
104
  'fetchOpenOrders': True,
105
+ 'fetchOption': False,
106
+ 'fetchOptionChain': False,
78
107
  'fetchOrder': True,
79
108
  'fetchOrderBook': True,
80
109
  'fetchPosition': False,
@@ -85,15 +114,21 @@ class timex(Exchange, ImplicitAPI):
85
114
  'fetchPositionsHistory': False,
86
115
  'fetchPositionsRisk': False,
87
116
  'fetchPremiumIndexOHLCV': False,
117
+ 'fetchSettlementHistory': False,
88
118
  'fetchTicker': True,
89
119
  'fetchTickers': True,
90
120
  'fetchTime': True,
91
121
  'fetchTrades': True,
92
122
  'fetchTradingFee': True, # maker fee only
123
+ 'fetchUnderlyingAssets': False,
124
+ 'fetchVolatilityHistory': False,
93
125
  'fetchWithdrawal': False,
94
126
  'fetchWithdrawals': True,
95
127
  'reduceMargin': False,
128
+ 'repayCrossMargin': False,
129
+ 'repayIsolatedMargin': False,
96
130
  'setLeverage': False,
131
+ 'setMargin': False,
97
132
  'setMarginMode': False,
98
133
  'setPositionMode': False,
99
134
  },