ccxt 4.4.46__py2.py3-none-any.whl → 4.4.47__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 (113) hide show
  1. ccxt/__init__.py +1 -1
  2. ccxt/abstract/binance.py +1 -0
  3. ccxt/abstract/binancecoinm.py +1 -0
  4. ccxt/abstract/binanceus.py +1 -0
  5. ccxt/abstract/binanceusdm.py +1 -0
  6. ccxt/abstract/bybit.py +1 -0
  7. ccxt/ace.py +58 -0
  8. ccxt/alpaca.py +80 -0
  9. ccxt/ascendex.py +95 -2
  10. ccxt/async_support/__init__.py +1 -1
  11. ccxt/async_support/ace.py +58 -0
  12. ccxt/async_support/alpaca.py +80 -0
  13. ccxt/async_support/ascendex.py +95 -2
  14. ccxt/async_support/base/exchange.py +1 -1
  15. ccxt/async_support/bigone.py +113 -4
  16. ccxt/async_support/binance.py +3 -4
  17. ccxt/async_support/binanceus.py +10 -0
  18. ccxt/async_support/bingx.py +1 -2
  19. ccxt/async_support/bit2c.py +56 -0
  20. ccxt/async_support/bitbank.py +58 -0
  21. ccxt/async_support/bitbns.py +60 -0
  22. ccxt/async_support/bitfinex.py +2 -3
  23. ccxt/async_support/bitfinex1.py +8 -0
  24. ccxt/async_support/bitflyer.py +71 -0
  25. ccxt/async_support/bitget.py +1 -2
  26. ccxt/async_support/bithumb.py +54 -0
  27. ccxt/async_support/bitmex.py +1 -2
  28. ccxt/async_support/bitopro.py +74 -0
  29. ccxt/async_support/bitrue.py +97 -17
  30. ccxt/async_support/bitso.py +59 -0
  31. ccxt/async_support/bitteam.py +73 -0
  32. ccxt/async_support/bitvavo.py +70 -2
  33. ccxt/async_support/bl3p.py +42 -0
  34. ccxt/async_support/blockchaincom.py +66 -2
  35. ccxt/async_support/blofin.py +87 -1
  36. ccxt/async_support/btcalpha.py +73 -0
  37. ccxt/async_support/btcbox.py +58 -0
  38. ccxt/async_support/btcmarkets.py +73 -0
  39. ccxt/async_support/btcturk.py +61 -0
  40. ccxt/async_support/bybit.py +7 -3
  41. ccxt/async_support/cex.py +57 -0
  42. ccxt/async_support/coinbase.py +1 -1
  43. ccxt/async_support/coinbaseexchange.py +76 -0
  44. ccxt/async_support/coinex.py +1 -2
  45. ccxt/async_support/delta.py +1 -2
  46. ccxt/async_support/gate.py +3 -3
  47. ccxt/async_support/hashkey.py +1 -2
  48. ccxt/async_support/hollaex.py +1 -1
  49. ccxt/async_support/htx.py +2 -4
  50. ccxt/async_support/hyperliquid.py +4 -4
  51. ccxt/async_support/krakenfutures.py +2 -0
  52. ccxt/async_support/lbank.py +1 -2
  53. ccxt/async_support/okx.py +13 -9
  54. ccxt/async_support/oxfun.py +1 -2
  55. ccxt/async_support/whitebit.py +2 -2
  56. ccxt/async_support/woo.py +1 -2
  57. ccxt/async_support/woofipro.py +1 -2
  58. ccxt/base/errors.py +6 -0
  59. ccxt/base/exchange.py +16 -14
  60. ccxt/bigone.py +113 -4
  61. ccxt/binance.py +3 -4
  62. ccxt/binanceus.py +10 -0
  63. ccxt/bingx.py +1 -2
  64. ccxt/bit2c.py +56 -0
  65. ccxt/bitbank.py +58 -0
  66. ccxt/bitbns.py +60 -0
  67. ccxt/bitfinex.py +2 -3
  68. ccxt/bitfinex1.py +8 -0
  69. ccxt/bitflyer.py +71 -0
  70. ccxt/bitget.py +1 -2
  71. ccxt/bithumb.py +54 -0
  72. ccxt/bitmex.py +1 -2
  73. ccxt/bitopro.py +74 -0
  74. ccxt/bitrue.py +97 -17
  75. ccxt/bitso.py +59 -0
  76. ccxt/bitteam.py +73 -0
  77. ccxt/bitvavo.py +70 -2
  78. ccxt/bl3p.py +42 -0
  79. ccxt/blockchaincom.py +66 -2
  80. ccxt/blofin.py +87 -1
  81. ccxt/btcalpha.py +73 -0
  82. ccxt/btcbox.py +58 -0
  83. ccxt/btcmarkets.py +73 -0
  84. ccxt/btcturk.py +61 -0
  85. ccxt/bybit.py +7 -3
  86. ccxt/cex.py +57 -0
  87. ccxt/coinbase.py +1 -1
  88. ccxt/coinbaseexchange.py +76 -0
  89. ccxt/coinex.py +1 -2
  90. ccxt/delta.py +1 -2
  91. ccxt/gate.py +3 -3
  92. ccxt/hashkey.py +1 -2
  93. ccxt/hollaex.py +1 -1
  94. ccxt/htx.py +2 -4
  95. ccxt/hyperliquid.py +4 -4
  96. ccxt/krakenfutures.py +2 -0
  97. ccxt/lbank.py +1 -2
  98. ccxt/okx.py +13 -9
  99. ccxt/oxfun.py +1 -2
  100. ccxt/pro/__init__.py +1 -1
  101. ccxt/pro/bingx.py +3 -5
  102. ccxt/pro/bitget.py +2 -4
  103. ccxt/pro/xt.py +1 -1
  104. ccxt/test/tests_async.py +2 -0
  105. ccxt/test/tests_sync.py +2 -0
  106. ccxt/whitebit.py +2 -2
  107. ccxt/woo.py +1 -2
  108. ccxt/woofipro.py +1 -2
  109. {ccxt-4.4.46.dist-info → ccxt-4.4.47.dist-info}/METADATA +4 -5
  110. {ccxt-4.4.46.dist-info → ccxt-4.4.47.dist-info}/RECORD +113 -113
  111. {ccxt-4.4.46.dist-info → ccxt-4.4.47.dist-info}/LICENSE.txt +0 -0
  112. {ccxt-4.4.46.dist-info → ccxt-4.4.47.dist-info}/WHEEL +0 -0
  113. {ccxt-4.4.46.dist-info → ccxt-4.4.47.dist-info}/top_level.txt +0 -0
@@ -967,8 +967,7 @@ class hyperliquid(Exchange, ImplicitAPI):
967
967
  self.safe_dict(assetCtxs, i, {})
968
968
  )
969
969
  result.append(data)
970
- funding_rates = self.parse_funding_rates(result)
971
- return self.filter_by_array(funding_rates, 'symbol', symbols)
970
+ return self.parse_funding_rates(result, symbols)
972
971
 
973
972
  def parse_funding_rate(self, info, market: Market = None) -> FundingRate:
974
973
  #
@@ -1859,6 +1858,8 @@ class hyperliquid(Exchange, ImplicitAPI):
1859
1858
  :returns dict[]: a list of `funding rate structures <https://docs.ccxt.com/#/?id=funding-rate-history-structure>`
1860
1859
  """
1861
1860
  await self.load_markets()
1861
+ if symbol is None:
1862
+ raise ArgumentsRequired(self.id + ' fetchFundingRateHistory() requires a symbol argument')
1862
1863
  market = self.market(symbol)
1863
1864
  request: dict = {
1864
1865
  'type': 'fundingHistory',
@@ -3147,8 +3148,7 @@ class hyperliquid(Exchange, ImplicitAPI):
3147
3148
  await self.load_markets()
3148
3149
  symbols = self.market_symbols(symbols)
3149
3150
  swapMarkets = await self.fetch_swap_markets()
3150
- result = self.parse_open_interests(swapMarkets)
3151
- return self.filter_by_array(result, 'symbol', symbols)
3151
+ return self.parse_open_interests(swapMarkets, symbols)
3152
3152
 
3153
3153
  async def fetch_open_interest(self, symbol: str, params={}):
3154
3154
  """
@@ -2476,6 +2476,8 @@ class krakenfutures(Exchange, ImplicitAPI):
2476
2476
  marketId = self.safe_string(info, 'symbol')
2477
2477
  market = self.safe_market(marketId, market)
2478
2478
  tiers = []
2479
+ if marginLevels is None:
2480
+ return tiers
2479
2481
  for i in range(0, len(marginLevels)):
2480
2482
  tier = marginLevels[i]
2481
2483
  initialMargin = self.safe_string(tier, 'initialMargin')
@@ -1249,8 +1249,7 @@ class lbank(Exchange, ImplicitAPI):
1249
1249
  # "success": True,
1250
1250
  # }
1251
1251
  data = self.safe_list(response, 'data', [])
1252
- result = self.parse_funding_rates(data)
1253
- return self.filter_by_array(result, 'symbol', symbols)
1252
+ return self.parse_funding_rates(data, symbols)
1254
1253
 
1255
1254
  async def fetch_balance(self, params={}) -> Balances:
1256
1255
  """
ccxt/async_support/okx.py CHANGED
@@ -1021,7 +1021,7 @@ class okx(Exchange, ImplicitAPI):
1021
1021
  'BHP': 'BHP',
1022
1022
  'APT': 'Aptos',
1023
1023
  'ARBONE': 'Arbitrum One',
1024
- 'AVAXC': 'Avalanche C',
1024
+ 'AVAXC': 'Avalanche C-Chain',
1025
1025
  'AVAXX': 'Avalanche X-Chain',
1026
1026
  'ARK': 'ARK',
1027
1027
  'AR': 'Arweave',
@@ -1809,8 +1809,8 @@ class okx(Exchange, ImplicitAPI):
1809
1809
  currencyActive = active if (active) else currencyActive
1810
1810
  networkId = self.safe_string(chain, 'chain')
1811
1811
  if (networkId is not None) and (networkId.find('-') >= 0):
1812
- parts = networkId.split('-')
1813
- chainPart = self.safe_string(parts, 1, networkId)
1812
+ parts = networkId.split('-')[1:]
1813
+ chainPart = '-'.join(parts)
1814
1814
  networkCode = self.network_id_to_code(chainPart, currency['code'])
1815
1815
  precision = self.parse_precision(self.safe_string(chain, 'wdTickSz'))
1816
1816
  if maxPrecision is None:
@@ -2750,9 +2750,11 @@ class okx(Exchange, ImplicitAPI):
2750
2750
  market = self.market(symbol)
2751
2751
  if not market['spot']:
2752
2752
  raise NotSupported(self.id + ' createMarketBuyOrderWithCost() supports spot markets only')
2753
- params['createMarketBuyOrderRequiresPrice'] = False
2754
- params['tgtCcy'] = 'quote_ccy'
2755
- return await self.create_order(symbol, 'market', 'buy', cost, None, params)
2753
+ req = {
2754
+ 'createMarketBuyOrderRequiresPrice': False,
2755
+ 'tgtCcy': 'quote_ccy',
2756
+ }
2757
+ return await self.create_order(symbol, 'market', 'buy', cost, None, self.extend(req, params))
2756
2758
 
2757
2759
  async def create_market_sell_order_with_cost(self, symbol: str, cost: float, params={}):
2758
2760
  """
@@ -2769,9 +2771,11 @@ class okx(Exchange, ImplicitAPI):
2769
2771
  market = self.market(symbol)
2770
2772
  if not market['spot']:
2771
2773
  raise NotSupported(self.id + ' createMarketSellOrderWithCost() supports spot markets only')
2772
- params['createMarketBuyOrderRequiresPrice'] = False
2773
- params['tgtCcy'] = 'quote_ccy'
2774
- return await self.create_order(symbol, 'market', 'sell', cost, None, params)
2774
+ req = {
2775
+ 'createMarketBuyOrderRequiresPrice': False,
2776
+ 'tgtCcy': 'quote_ccy',
2777
+ }
2778
+ return await self.create_order(symbol, 'market', 'sell', cost, None, self.extend(req, params))
2775
2779
 
2776
2780
  def create_order_request(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: Num = None, params={}):
2777
2781
  market = self.market(symbol)
@@ -1033,8 +1033,7 @@ class oxfun(Exchange, ImplicitAPI):
1033
1033
  # }
1034
1034
  #
1035
1035
  data = self.safe_list(response, 'data', [])
1036
- result = self.parse_funding_rates(data)
1037
- return self.filter_by_array(result, 'symbol', symbols)
1036
+ return self.parse_funding_rates(data, symbols)
1038
1037
 
1039
1038
  def parse_funding_rate(self, fundingRate, market: Market = None) -> FundingRate:
1040
1039
  #
@@ -310,6 +310,7 @@ class whitebit(Exchange, ImplicitAPI):
310
310
  'broad': {
311
311
  'This action is unauthorized': PermissionDenied, # {"code":2,"message":"This action is unauthorized. Enable your key in API settings"}
312
312
  'Given amount is less than min amount': InvalidOrder, # {"code":0,"message":"Validation failed","errors":{"amount":["Given amount is less than min amount 200000"],"total":["Total is less than 5.05"]}}
313
+ 'Min amount step': InvalidOrder, # {"code":32,"errors":{"amount":["Min amount step = 0.01"]},"message":"Validation failed"}
313
314
  'Total is less than': InvalidOrder, # {"code":0,"message":"Validation failed","errors":{"amount":["Given amount is less than min amount 200000"],"total":["Total is less than 5.05"]}}
314
315
  'fee must be no less than': InvalidOrder, # {"code":0,"message":"Validation failed","errors":{"amount":["Total amount + fee must be no less than 5.05505"]}}
315
316
  'Enable your key in API settings': PermissionDenied, # {"code":2,"message":"This action is unauthorized. Enable your key in API settings"}
@@ -2376,8 +2377,7 @@ class whitebit(Exchange, ImplicitAPI):
2376
2377
  # ]
2377
2378
  #
2378
2379
  data = self.safe_list(response, 'result', [])
2379
- result = self.parse_funding_rates(data)
2380
- return self.filter_by_array(result, 'symbol', symbols)
2380
+ return self.parse_funding_rates(data, symbols)
2381
2381
 
2382
2382
  def parse_funding_rate(self, contract, market: Market = None) -> FundingRate:
2383
2383
  #
ccxt/async_support/woo.py CHANGED
@@ -2825,8 +2825,7 @@ class woo(Exchange, ImplicitAPI):
2825
2825
  # }
2826
2826
  #
2827
2827
  rows = self.safe_list(response, 'rows', [])
2828
- result = self.parse_funding_rates(rows)
2829
- return self.filter_by_array(result, 'symbol', symbols)
2828
+ return self.parse_funding_rates(rows, symbols)
2830
2829
 
2831
2830
  async def fetch_funding_rate_history(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
2832
2831
  """
@@ -962,8 +962,7 @@ class woofipro(Exchange, ImplicitAPI):
962
962
  #
963
963
  data = self.safe_dict(response, 'data', {})
964
964
  rows = self.safe_list(data, 'rows', [])
965
- result = self.parse_funding_rates(rows)
966
- return self.filter_by_array(result, 'symbol', symbols)
965
+ return self.parse_funding_rates(rows, symbols)
967
966
 
968
967
  async def fetch_funding_rate_history(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
969
968
  """
ccxt/base/errors.py CHANGED
@@ -1,3 +1,9 @@
1
+ # ----------------------------------------------------------------------------
2
+
3
+ # PLEASE DO NOT EDIT THIS FILE, IT IS GENERATED AND WILL BE OVERWRITTEN:
4
+ # https://github.com/ccxt/ccxt/blob/master/CONTRIBUTING.md#how-to-contribute-code
5
+ # EDIT THE CORRESPONDENT .ts FILE INSTEAD
6
+
1
7
  error_hierarchy = {
2
8
  'BaseError': {
3
9
  'ExchangeError': {
ccxt/base/exchange.py CHANGED
@@ -4,7 +4,7 @@
4
4
 
5
5
  # -----------------------------------------------------------------------------
6
6
 
7
- __version__ = '4.4.46'
7
+ __version__ = '4.4.47'
8
8
 
9
9
  # -----------------------------------------------------------------------------
10
10
 
@@ -343,7 +343,7 @@ class Exchange(object):
343
343
  rateLimitMaxTokens = 16
344
344
  rateLimitUpdateTime = 0
345
345
  enableLastHttpResponse = True
346
- enableLastJsonResponse = True
346
+ enableLastJsonResponse = False
347
347
  enableLastResponseHeaders = True
348
348
  last_http_response = None
349
349
  last_json_response = None
@@ -5640,19 +5640,13 @@ class Exchange(object):
5640
5640
  def parse_funding_rate(self, contract: str, market: Market = None):
5641
5641
  raise NotSupported(self.id + ' parseFundingRate() is not supported yet')
5642
5642
 
5643
- def parse_funding_rates(self, response, market: Market = None):
5644
- result = {}
5643
+ def parse_funding_rates(self, response, symbols: Strings = None):
5644
+ fundingRates = {}
5645
5645
  for i in range(0, len(response)):
5646
- parsed = self.parse_funding_rate(response[i], market)
5647
- result[parsed['symbol']] = parsed
5648
- return result
5649
-
5650
- def parse_open_interests(self, response, market: Market = None):
5651
- result = {}
5652
- for i in range(0, len(response)):
5653
- parsed = self.parse_open_interest(response[i], market)
5654
- result[parsed['symbol']] = parsed
5655
- return result
5646
+ entry = response[i]
5647
+ parsed = self.parse_funding_rate(entry)
5648
+ fundingRates[parsed['symbol']] = parsed
5649
+ return self.filter_by_array(fundingRates, 'symbol', symbols)
5656
5650
 
5657
5651
  def parse_long_short_ratio(self, info: dict, market: Market = None):
5658
5652
  raise NotSupported(self.id + ' parseLongShortRatio() is not supported yet')
@@ -5748,6 +5742,14 @@ class Exchange(object):
5748
5742
  def parse_open_interest(self, interest, market: Market = None):
5749
5743
  raise NotSupported(self.id + ' parseOpenInterest() is not supported yet')
5750
5744
 
5745
+ def parse_open_interests(self, response, symbols: Strings = None):
5746
+ result = {}
5747
+ for i in range(0, len(response)):
5748
+ entry = response[i]
5749
+ parsed = self.parse_open_interest(entry)
5750
+ result[parsed['symbol']] = parsed
5751
+ return self.filter_by_array(result, 'symbol', symbols)
5752
+
5751
5753
  def parse_open_interests_history(self, response, market=None, since: Int = None, limit: Int = None):
5752
5754
  interests = []
5753
5755
  for i in range(0, len(response)):
ccxt/bigone.py CHANGED
@@ -305,6 +305,105 @@ class bigone(Exchange, ImplicitAPI):
305
305
  # undetermined: XinFin, YAS, Ycash
306
306
  },
307
307
  },
308
+ 'features': {
309
+ 'default': {
310
+ 'sandbox': False,
311
+ 'createOrder': {
312
+ 'marginMode': False,
313
+ 'triggerPrice': True,
314
+ 'triggerPriceType': None,
315
+ 'triggerDirection': True, # todo implement
316
+ 'stopLossPrice': False, # todo by trigger
317
+ 'takeProfitPrice': False, # todo by trigger
318
+ 'attachedStopLossTakeProfit': None,
319
+ 'timeInForce': {
320
+ 'IOC': True,
321
+ 'FOK': False,
322
+ 'PO': True,
323
+ 'GTD': False,
324
+ },
325
+ 'hedged': False,
326
+ 'trailing': False,
327
+ 'leverage': False,
328
+ 'marketBuyRequiresPrice': True,
329
+ 'marketBuyByCost': True,
330
+ 'selfTradePrevention': False,
331
+ 'iceberg': False,
332
+ },
333
+ 'createOrders': None, # todo: implement
334
+ 'fetchMyTrades': {
335
+ 'marginMode': False,
336
+ 'limit': 200,
337
+ 'daysBack': None,
338
+ 'untilDays': None,
339
+ },
340
+ 'fetchOrder': {
341
+ 'marginMode': False,
342
+ 'trigger': False,
343
+ 'trailing': False,
344
+ },
345
+ 'fetchOpenOrders': {
346
+ 'marginMode': False,
347
+ 'limit': 200,
348
+ 'trigger': False,
349
+ 'trailing': False,
350
+ },
351
+ 'fetchOrders': {
352
+ 'marginMode': False,
353
+ 'limit': 200,
354
+ 'daysBack': None,
355
+ 'untilDays': None,
356
+ 'trigger': False,
357
+ 'trailing': False,
358
+ },
359
+ 'fetchClosedOrders': {
360
+ 'marginMode': False,
361
+ 'limit': 200,
362
+ 'daysBack': None,
363
+ 'daysBackCanceled': None,
364
+ 'untilDays': None,
365
+ 'trigger': False,
366
+ 'trailing': False,
367
+ },
368
+ 'fetchOHLCV': {
369
+ 'limit': 500,
370
+ },
371
+ },
372
+ 'spot': {
373
+ 'extends': 'default',
374
+ },
375
+ 'forDerivatives': {
376
+ 'extends': 'default',
377
+ 'createOrder': {
378
+ # todo: implement
379
+ 'triggerPriceType': {
380
+ 'mark': True,
381
+ 'index': True,
382
+ 'last': True,
383
+ },
384
+ },
385
+ 'fetchOrders': {
386
+ 'daysBack': 100000,
387
+ 'untilDays': 100000,
388
+ },
389
+ 'fetchClosedOrders': {
390
+ 'daysBack': 100000,
391
+ 'untilDays': 100000,
392
+ },
393
+ },
394
+ 'swap': {
395
+ 'linear': {
396
+ 'extends': 'forDerivatives',
397
+ },
398
+ 'inverse': {
399
+ 'extends': 'forDerivatives',
400
+ },
401
+ },
402
+ 'future': {
403
+ 'linear': None,
404
+ 'inverse': None,
405
+ },
406
+ },
308
407
  'precisionMode': TICK_SIZE,
309
408
  'exceptions': {
310
409
  'exact': {
@@ -1173,24 +1272,34 @@ class bigone(Exchange, ImplicitAPI):
1173
1272
  :param int [since]: timestamp in ms of the earliest candle to fetch
1174
1273
  :param int [limit]: the maximum amount of candles to fetch
1175
1274
  :param dict [params]: extra parameters specific to the exchange API endpoint
1275
+ :param int [params.until]: timestamp in ms of the earliest candle to fetch
1176
1276
  :returns int[][]: A list of candles ordered, open, high, low, close, volume
1177
1277
  """
1178
1278
  self.load_markets()
1179
1279
  market = self.market(symbol)
1180
1280
  if market['contract']:
1181
1281
  raise BadRequest(self.id + ' fetchOHLCV() can only fetch ohlcvs for spot markets')
1282
+ until = self.safe_integer(params, 'until')
1283
+ untilIsDefined = (until is not None)
1284
+ sinceIsDefined = (since is not None)
1182
1285
  if limit is None:
1183
- limit = 100 # default 100, max 500
1286
+ limit = 500 if (sinceIsDefined and untilIsDefined) else 100 # default 100, max 500, if since and limit defined then fetch all the candles between them unless it exceeds the max of 500
1184
1287
  request: dict = {
1185
1288
  'asset_pair_name': market['id'],
1186
1289
  'period': self.safe_string(self.timeframes, timeframe, timeframe),
1187
1290
  'limit': limit,
1188
1291
  }
1189
- if since is not None:
1292
+ if sinceIsDefined:
1190
1293
  # start = self.parse_to_int(since / 1000)
1191
1294
  duration = self.parse_timeframe(timeframe)
1192
- end = self.sum(since, limit * duration * 1000)
1193
- request['time'] = self.iso8601(end)
1295
+ endByLimit = self.sum(since, limit * duration * 1000)
1296
+ if untilIsDefined:
1297
+ request['time'] = self.iso8601(min(endByLimit, until + 1))
1298
+ else:
1299
+ request['time'] = self.iso8601(endByLimit)
1300
+ elif untilIsDefined:
1301
+ request['time'] = self.iso8601(until + 1)
1302
+ params = self.omit(params, 'until')
1194
1303
  response = self.publicGetAssetPairsAssetPairNameCandles(self.extend(request, params))
1195
1304
  #
1196
1305
  # {
ccxt/binance.py CHANGED
@@ -1148,6 +1148,7 @@ class binance(Exchange, ImplicitAPI):
1148
1148
  'um/symbolConfig': 1,
1149
1149
  'cm/accountConfig': 1,
1150
1150
  'cm/symbolConfig': 1,
1151
+ 'rateLimit/order': 1,
1151
1152
  },
1152
1153
  'post': {
1153
1154
  'um/order': 1,
@@ -9323,8 +9324,7 @@ class binance(Exchange, ImplicitAPI):
9323
9324
  response = self.dapiPublicGetPremiumIndex(query)
9324
9325
  else:
9325
9326
  raise NotSupported(self.id + ' fetchFundingRates() supports linear and inverse contracts only')
9326
- result = self.parse_funding_rates(response)
9327
- return self.filter_by_array(result, 'symbol', symbols)
9327
+ return self.parse_funding_rates(response, symbols)
9328
9328
 
9329
9329
  def parse_funding_rate(self, contract, market: Market = None) -> FundingRate:
9330
9330
  # ensure it matches with https://www.binance.com/en/futures/funding-history/0
@@ -13252,8 +13252,7 @@ class binance(Exchange, ImplicitAPI):
13252
13252
  # },
13253
13253
  # ]
13254
13254
  #
13255
- result = self.parse_funding_rates(response, market)
13256
- return self.filter_by_array(result, 'symbol', symbols)
13255
+ return self.parse_funding_rates(response, symbols)
13257
13256
 
13258
13257
  def fetch_long_short_ratio_history(self, symbol: Str = None, timeframe: Str = None, since: Int = None, limit: Int = None, params={}) -> List[LongShortRatio]:
13259
13258
  """
ccxt/binanceus.py CHANGED
@@ -209,4 +209,14 @@ class binanceus(binance, ImplicitAPI):
209
209
  },
210
210
  },
211
211
  },
212
+ 'features': {
213
+ 'swap': {
214
+ 'linear': None,
215
+ 'inverse': None,
216
+ },
217
+ 'future': {
218
+ 'linear': None,
219
+ 'inverse': None,
220
+ },
221
+ },
212
222
  })
ccxt/bingx.py CHANGED
@@ -1537,8 +1537,7 @@ class bingx(Exchange, ImplicitAPI):
1537
1537
  symbols = self.market_symbols(symbols, 'swap', True)
1538
1538
  response = self.swapV2PublicGetQuotePremiumIndex(self.extend(params))
1539
1539
  data = self.safe_list(response, 'data', [])
1540
- result = self.parse_funding_rates(data)
1541
- return self.filter_by_array(result, 'symbol', symbols)
1540
+ return self.parse_funding_rates(data, symbols)
1542
1541
 
1543
1542
  def parse_funding_rate(self, contract, market: Market = None) -> FundingRate:
1544
1543
  #
ccxt/bit2c.py CHANGED
@@ -178,6 +178,62 @@ class bit2c(Exchange, ImplicitAPI):
178
178
  'options': {
179
179
  'fetchTradesMethod': 'public_get_exchanges_pair_trades',
180
180
  },
181
+ 'features': {
182
+ 'spot': {
183
+ 'sandbox': False,
184
+ 'createOrder': {
185
+ 'marginMode': False,
186
+ 'triggerPrice': False,
187
+ 'triggerPriceType': None,
188
+ 'triggerDirection': False,
189
+ 'stopLossPrice': False,
190
+ 'takeProfitPrice': False,
191
+ 'attachedStopLossTakeProfit': None,
192
+ 'timeInForce': {
193
+ 'IOC': False,
194
+ 'FOK': False,
195
+ 'PO': False,
196
+ 'GTD': False,
197
+ },
198
+ 'hedged': False,
199
+ 'trailing': False,
200
+ 'leverage': False,
201
+ 'marketBuyRequiresPrice': False,
202
+ 'marketBuyByCost': False,
203
+ 'selfTradePrevention': False,
204
+ 'iceberg': False,
205
+ },
206
+ 'createOrders': None,
207
+ 'fetchMyTrades': {
208
+ 'marginMode': False,
209
+ 'limit': 100,
210
+ 'daysBack': 30,
211
+ 'untilDays': 30,
212
+ },
213
+ 'fetchOrder': {
214
+ 'marginMode': False,
215
+ 'trigger': False,
216
+ 'trailing': False,
217
+ },
218
+ 'fetchOpenOrders': {
219
+ 'marginMode': False,
220
+ 'limit': None,
221
+ 'trigger': False,
222
+ 'trailing': False,
223
+ },
224
+ 'fetchOrders': None,
225
+ 'fetchClosedOrders': None, # todo implement
226
+ 'fetchOHLCV': None,
227
+ },
228
+ 'swap': {
229
+ 'linear': None,
230
+ 'inverse': None,
231
+ },
232
+ 'future': {
233
+ 'linear': None,
234
+ 'inverse': None,
235
+ },
236
+ },
181
237
  'precisionMode': TICK_SIZE,
182
238
  'exceptions': {
183
239
  'exact': {
ccxt/bitbank.py CHANGED
@@ -154,6 +154,64 @@ class bitbank(Exchange, ImplicitAPI):
154
154
  ],
155
155
  },
156
156
  },
157
+ 'features': {
158
+ 'spot': {
159
+ 'sandbox': False,
160
+ 'createOrder': {
161
+ 'marginMode': False,
162
+ 'triggerPrice': True, # todo implement
163
+ 'triggerPriceType': None,
164
+ 'triggerDirection': False,
165
+ 'stopLossPrice': False,
166
+ 'takeProfitPrice': False,
167
+ 'attachedStopLossTakeProfit': None,
168
+ 'timeInForce': {
169
+ 'IOC': False,
170
+ 'FOK': False,
171
+ 'PO': True, # todo: implement
172
+ 'GTD': False,
173
+ },
174
+ 'hedged': False,
175
+ 'trailing': False,
176
+ 'leverage': False,
177
+ 'marketBuyRequiresPrice': False,
178
+ 'marketBuyByCost': False,
179
+ 'selfTradePrevention': False,
180
+ 'iceberg': False,
181
+ },
182
+ 'createOrders': None,
183
+ 'fetchMyTrades': {
184
+ 'marginMode': False,
185
+ 'limit': 1000,
186
+ 'daysBack': None,
187
+ 'untilDays': None,
188
+ },
189
+ 'fetchOrder': {
190
+ 'marginMode': False,
191
+ 'trigger': False,
192
+ 'trailing': False,
193
+ },
194
+ 'fetchOpenOrders': {
195
+ 'marginMode': False,
196
+ 'limit': 1000,
197
+ 'trigger': False,
198
+ 'trailing': False,
199
+ },
200
+ 'fetchOrders': None,
201
+ 'fetchClosedOrders': None,
202
+ 'fetchOHLCV': {
203
+ 'limit': 1000,
204
+ },
205
+ },
206
+ 'swap': {
207
+ 'linear': None,
208
+ 'inverse': None,
209
+ },
210
+ 'future': {
211
+ 'linear': None,
212
+ 'inverse': None,
213
+ },
214
+ },
157
215
  'precisionMode': TICK_SIZE,
158
216
  'exceptions': {
159
217
  'exact': {
ccxt/bitbns.py CHANGED
@@ -151,6 +151,66 @@ class bitbns(Exchange, ImplicitAPI):
151
151
  },
152
152
  },
153
153
  'precisionMode': TICK_SIZE,
154
+ 'features': {
155
+ 'spot': {
156
+ 'sandbox': False,
157
+ 'createOrder': {
158
+ 'marginMode': False,
159
+ 'triggerPrice': True,
160
+ 'triggerPriceType': None,
161
+ 'triggerDirection': False,
162
+ 'stopLossPrice': False, # todo with triggerPrice
163
+ 'takeProfitPrice': False, # todo with triggerPrice
164
+ 'attachedStopLossTakeProfit': None,
165
+ 'timeInForce': {
166
+ 'IOC': False,
167
+ 'FOK': False,
168
+ 'PO': False,
169
+ 'GTD': False,
170
+ },
171
+ 'hedged': False,
172
+ 'trailing': False, # todo recheck
173
+ 'leverage': False,
174
+ 'marketBuyRequiresPrice': False,
175
+ 'marketBuyByCost': False,
176
+ 'selfTradePrevention': False,
177
+ 'iceberg': False,
178
+ },
179
+ 'createOrders': None,
180
+ 'fetchMyTrades': {
181
+ 'marginMode': False,
182
+ 'limit': None,
183
+ 'daysBack': None,
184
+ 'untilDays': None,
185
+ },
186
+ 'fetchOrder': {
187
+ 'marginMode': False,
188
+ 'trigger': False,
189
+ 'trailing': False,
190
+ },
191
+ 'fetchOpenOrders': {
192
+ 'marginMode': False,
193
+ 'limit': None,
194
+ 'trigger': True,
195
+ 'trailing': False,
196
+ },
197
+ 'fetchOrders': None,
198
+ 'fetchClosedOrders': None,
199
+ # todo: implement fetchOHLCV
200
+ 'fetchOHLCV': {
201
+ 'limit': 100,
202
+ },
203
+ },
204
+ # todo: implement swap methods
205
+ 'swap': {
206
+ 'linear': None,
207
+ 'inverse': None,
208
+ },
209
+ 'future': {
210
+ 'linear': None,
211
+ 'inverse': None,
212
+ },
213
+ },
154
214
  'exceptions': {
155
215
  'exact': {
156
216
  '400': BadRequest, # {"msg":"Invalid Request","status":-1,"code":400}
ccxt/bitfinex.py CHANGED
@@ -3012,7 +3012,7 @@ class bitfinex(Exchange, ImplicitAPI):
3012
3012
  # ]
3013
3013
  # ]
3014
3014
  #
3015
- return self.parse_funding_rates(response)
3015
+ return self.parse_funding_rates(response, symbols)
3016
3016
 
3017
3017
  def fetch_funding_rate_history(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
3018
3018
  """
@@ -3239,8 +3239,7 @@ class bitfinex(Exchange, ImplicitAPI):
3239
3239
  # ]
3240
3240
  # ]
3241
3241
  #
3242
- result = self.parse_open_interests(response)
3243
- return self.filter_by_array(result, 'symbol', symbols)
3242
+ return self.parse_open_interests(response, symbols)
3244
3243
 
3245
3244
  def fetch_open_interest(self, symbol: str, params={}):
3246
3245
  """