ccxt 4.4.43__py2.py3-none-any.whl → 4.4.45__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 (91) 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/blofin.py +22 -0
  7. ccxt/async_support/__init__.py +1 -1
  8. ccxt/async_support/base/exchange.py +1 -1
  9. ccxt/async_support/binance.py +235 -107
  10. ccxt/async_support/bingx.py +20 -9
  11. ccxt/async_support/bitfinex.py +7 -3
  12. ccxt/async_support/bitget.py +6 -4
  13. ccxt/async_support/bitmart.py +7 -10
  14. ccxt/async_support/bitmex.py +4 -6
  15. ccxt/async_support/bitstamp.py +5 -0
  16. ccxt/async_support/blofin.py +22 -0
  17. ccxt/async_support/bybit.py +12 -27
  18. ccxt/async_support/coinbase.py +14 -10
  19. ccxt/async_support/coinbaseinternational.py +13 -9
  20. ccxt/async_support/coincatch.py +2 -2
  21. ccxt/async_support/coinex.py +6 -6
  22. ccxt/async_support/cryptocom.py +5 -3
  23. ccxt/async_support/defx.py +2 -2
  24. ccxt/async_support/delta.py +1 -1
  25. ccxt/async_support/exmo.py +16 -8
  26. ccxt/async_support/gate.py +10 -5
  27. ccxt/async_support/gemini.py +5 -0
  28. ccxt/async_support/hashkey.py +15 -10
  29. ccxt/async_support/htx.py +103 -5
  30. ccxt/async_support/hyperliquid.py +6 -1
  31. ccxt/async_support/kraken.py +10 -3
  32. ccxt/async_support/krakenfutures.py +6 -1
  33. ccxt/async_support/kucoin.py +10 -8
  34. ccxt/async_support/kucoinfutures.py +7 -8
  35. ccxt/async_support/lykke.py +1 -1
  36. ccxt/async_support/mexc.py +20 -14
  37. ccxt/async_support/myokx.py +8 -0
  38. ccxt/async_support/ndax.py +1 -1
  39. ccxt/async_support/oceanex.py +1 -1
  40. ccxt/async_support/okx.py +9 -10
  41. ccxt/async_support/onetrading.py +2 -1
  42. ccxt/async_support/whitebit.py +35 -10
  43. ccxt/async_support/woo.py +6 -4
  44. ccxt/async_support/woofipro.py +7 -4
  45. ccxt/base/exchange.py +1 -1
  46. ccxt/binance.py +235 -107
  47. ccxt/bingx.py +20 -9
  48. ccxt/bitfinex.py +7 -3
  49. ccxt/bitget.py +6 -4
  50. ccxt/bitmart.py +7 -10
  51. ccxt/bitmex.py +4 -6
  52. ccxt/bitstamp.py +5 -0
  53. ccxt/blofin.py +22 -0
  54. ccxt/bybit.py +12 -27
  55. ccxt/coinbase.py +14 -10
  56. ccxt/coinbaseinternational.py +13 -9
  57. ccxt/coincatch.py +2 -2
  58. ccxt/coinex.py +6 -6
  59. ccxt/cryptocom.py +5 -3
  60. ccxt/defx.py +2 -2
  61. ccxt/delta.py +1 -1
  62. ccxt/exmo.py +16 -8
  63. ccxt/gate.py +10 -5
  64. ccxt/gemini.py +5 -0
  65. ccxt/hashkey.py +15 -10
  66. ccxt/htx.py +103 -5
  67. ccxt/hyperliquid.py +6 -1
  68. ccxt/kraken.py +10 -3
  69. ccxt/krakenfutures.py +6 -1
  70. ccxt/kucoin.py +10 -8
  71. ccxt/kucoinfutures.py +7 -8
  72. ccxt/lykke.py +1 -1
  73. ccxt/mexc.py +20 -14
  74. ccxt/myokx.py +8 -0
  75. ccxt/ndax.py +1 -1
  76. ccxt/oceanex.py +1 -1
  77. ccxt/okx.py +9 -10
  78. ccxt/onetrading.py +2 -1
  79. ccxt/pro/__init__.py +1 -1
  80. ccxt/pro/binance.py +2 -1
  81. ccxt/pro/bitcoincom.py +4 -1
  82. ccxt/pro/bitopro.py +1 -1
  83. ccxt/pro/myokx.py +5 -0
  84. ccxt/whitebit.py +35 -10
  85. ccxt/woo.py +6 -4
  86. ccxt/woofipro.py +7 -4
  87. {ccxt-4.4.43.dist-info → ccxt-4.4.45.dist-info}/METADATA +4 -4
  88. {ccxt-4.4.43.dist-info → ccxt-4.4.45.dist-info}/RECORD +91 -91
  89. {ccxt-4.4.43.dist-info → ccxt-4.4.45.dist-info}/LICENSE.txt +0 -0
  90. {ccxt-4.4.43.dist-info → ccxt-4.4.45.dist-info}/WHEEL +0 -0
  91. {ccxt-4.4.43.dist-info → ccxt-4.4.45.dist-info}/top_level.txt +0 -0
@@ -820,9 +820,22 @@ class whitebit(Exchange, ImplicitAPI):
820
820
  # "last": "55913.88",
821
821
  # "period": 86400
822
822
  # }
823
- market = self.safe_market(None, market)
823
+ # v2
824
+ # {
825
+ # lastUpdateTimestamp: '2025-01-02T09:16:36.000Z',
826
+ # tradingPairs: 'ARB_USDC',
827
+ # lastPrice: '0.7727',
828
+ # lowestAsk: '0.7735',
829
+ # highestBid: '0.7732',
830
+ # baseVolume24h: '1555793.74',
831
+ # quoteVolume24h: '1157602.622406',
832
+ # tradesEnabled: True
833
+ # }
834
+ #
835
+ marketId = self.safe_string(ticker, 'tradingPairs')
836
+ market = self.safe_market(marketId, market)
824
837
  # last price is provided as "last" or "last_price"
825
- last = self.safe_string_2(ticker, 'last', 'last_price')
838
+ last = self.safe_string_n(ticker, ['last', 'last_price', 'lastPrice'])
826
839
  # if "close" is provided, use it, otherwise use <last>
827
840
  close = self.safe_string(ticker, 'close', last)
828
841
  return self.safe_ticker({
@@ -831,9 +844,9 @@ class whitebit(Exchange, ImplicitAPI):
831
844
  'datetime': None,
832
845
  'high': self.safe_string(ticker, 'high'),
833
846
  'low': self.safe_string(ticker, 'low'),
834
- 'bid': self.safe_string(ticker, 'bid'),
847
+ 'bid': self.safe_string_2(ticker, 'bid', 'highestBid'),
835
848
  'bidVolume': None,
836
- 'ask': self.safe_string(ticker, 'ask'),
849
+ 'ask': self.safe_string_2(ticker, 'ask', 'lowestAsk'),
837
850
  'askVolume': None,
838
851
  'vwap': None,
839
852
  'open': self.safe_string(ticker, 'open'),
@@ -843,8 +856,8 @@ class whitebit(Exchange, ImplicitAPI):
843
856
  'change': None,
844
857
  'percentage': self.safe_string(ticker, 'change'),
845
858
  'average': None,
846
- 'baseVolume': self.safe_string_2(ticker, 'base_volume', 'volume'),
847
- 'quoteVolume': self.safe_string_2(ticker, 'quote_volume', 'deal'),
859
+ 'baseVolume': self.safe_string_n(ticker, ['base_volume', 'volume', 'baseVolume24h']),
860
+ 'quoteVolume': self.safe_string_n(ticker, ['quote_volume', 'deal', 'quoteVolume24h']),
848
861
  'info': ticker,
849
862
  }, market)
850
863
 
@@ -854,13 +867,20 @@ class whitebit(Exchange, ImplicitAPI):
854
867
 
855
868
  https://docs.whitebit.com/public/http-v4/#market-activity
856
869
 
857
- :param str[]|None symbols: unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned
870
+ :param str[] [symbols]: unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned
858
871
  :param dict [params]: extra parameters specific to the exchange API endpoint
872
+ :param str [params.method]: either v2PublicGetTicker or v4PublicGetTicker default is v4PublicGetTicker
859
873
  :returns dict: a dictionary of `ticker structures <https://docs.ccxt.com/#/?id=ticker-structure>`
860
874
  """
861
875
  await self.load_markets()
862
876
  symbols = self.market_symbols(symbols)
863
- response = await self.v4PublicGetTicker(params)
877
+ method = 'v4PublicGetTicker'
878
+ method, params = self.handle_option_and_params(params, 'fetchTickers', 'method', method)
879
+ response = None
880
+ if method == 'v4PublicGetTicker':
881
+ response = await self.v4PublicGetTicker(params)
882
+ else:
883
+ response = await self.v2PublicGetTicker(params)
864
884
  #
865
885
  # "BCH_RUB": {
866
886
  # "base_id":1831,
@@ -872,6 +892,9 @@ class whitebit(Exchange, ImplicitAPI):
872
892
  # "change":"2.12"
873
893
  # },
874
894
  #
895
+ resultList = self.safe_list(response, 'result')
896
+ if resultList is not None:
897
+ return self.parse_tickers(resultList, symbols)
875
898
  marketIds = list(response.keys())
876
899
  result: dict = {}
877
900
  for i in range(0, len(marketIds)):
@@ -1217,9 +1240,11 @@ class whitebit(Exchange, ImplicitAPI):
1217
1240
  :param dict [params]: extra parameters specific to the exchange API endpoint
1218
1241
  :returns dict: an `order structure <https://docs.ccxt.com/#/?id=order-structure>`
1219
1242
  """
1220
- params['cost'] = cost
1243
+ req = {
1244
+ 'cost': cost,
1245
+ }
1221
1246
  # only buy side is supported
1222
- return await self.create_order(symbol, 'market', side, 0, None, params)
1247
+ return await self.create_order(symbol, 'market', side, 0, None, self.extend(req, params))
1223
1248
 
1224
1249
  async def create_market_buy_order_with_cost(self, symbol: str, cost: float, params={}) -> Order:
1225
1250
  """
ccxt/async_support/woo.py CHANGED
@@ -344,9 +344,11 @@ class woo(Exchange, ImplicitAPI):
344
344
  },
345
345
  'hedged': False,
346
346
  'trailing': True,
347
- # exchange specific params:
348
- # 'iceberg': True,
349
- # 'oco': True,
347
+ 'leverage': False,
348
+ 'marketBuyByCost': True,
349
+ 'marketBuyRequiresPrice': False,
350
+ 'selfTradePrevention': False,
351
+ 'iceberg': True, # todo implement
350
352
  },
351
353
  'createOrders': None,
352
354
  'fetchMyTrades': {
@@ -377,7 +379,7 @@ class woo(Exchange, ImplicitAPI):
377
379
  'fetchClosedOrders': {
378
380
  'marginMode': False,
379
381
  'limit': 500,
380
- 'daysBackClosed': None,
382
+ 'daysBack': None,
381
383
  'daysBackCanceled': None,
382
384
  'untilDays': 100000,
383
385
  'trigger': True,
@@ -327,8 +327,11 @@ class woofipro(Exchange, ImplicitAPI):
327
327
  },
328
328
  'hedged': False,
329
329
  'trailing': True,
330
- # exchange specific
331
- # 'iceberg': True,
330
+ 'leverage': True, # todo implement
331
+ 'marketBuyByCost': False,
332
+ 'marketBuyRequiresPrice': False,
333
+ 'selfTradePrevention': False,
334
+ 'iceberg': True, # todo implement
332
335
  },
333
336
  'createOrders': {
334
337
  'max': 10,
@@ -354,7 +357,7 @@ class woofipro(Exchange, ImplicitAPI):
354
357
  'fetchClosedOrders': {
355
358
  'marginMode': False,
356
359
  'limit': 500,
357
- 'daysBackClosed': None,
360
+ 'daysBack': None,
358
361
  'daysBackCanceled': None,
359
362
  'untilDays': 100000,
360
363
  'trigger': True,
@@ -375,7 +378,7 @@ class woofipro(Exchange, ImplicitAPI):
375
378
  'attachedStopLossTakeProfit': {
376
379
  # todo: implementation needs unification
377
380
  'triggerPriceType': None,
378
- 'limitPrice': False,
381
+ 'price': False,
379
382
  },
380
383
  },
381
384
  },
ccxt/base/exchange.py CHANGED
@@ -4,7 +4,7 @@
4
4
 
5
5
  # -----------------------------------------------------------------------------
6
6
 
7
- __version__ = '4.4.43'
7
+ __version__ = '4.4.45'
8
8
 
9
9
  # -----------------------------------------------------------------------------
10
10