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
ccxt/cex.py CHANGED
@@ -118,6 +118,63 @@ class cex(Exchange, ImplicitAPI):
118
118
  },
119
119
  },
120
120
  },
121
+ 'features': {
122
+ 'spot': {
123
+ 'sandbox': False,
124
+ 'createOrder': {
125
+ 'marginMode': False,
126
+ 'triggerPrice': True,
127
+ 'triggerPriceType': None,
128
+ 'triggerDirection': False,
129
+ 'stopLossPrice': False, # todo
130
+ 'takeProfitPrice': False, # todo
131
+ 'attachedStopLossTakeProfit': None,
132
+ 'timeInForce': {
133
+ 'IOC': True,
134
+ 'FOK': True,
135
+ 'PO': False, # todo check
136
+ 'GTD': True,
137
+ },
138
+ 'hedged': False,
139
+ 'leverage': False,
140
+ 'marketBuyRequiresPrice': False,
141
+ 'marketBuyByCost': True, # todo check
142
+ 'selfTradePrevention': False,
143
+ 'trailing': False,
144
+ 'iceberg': False,
145
+ },
146
+ 'createOrders': None,
147
+ 'fetchMyTrades': None,
148
+ 'fetchOrder': None,
149
+ 'fetchOpenOrders': {
150
+ 'marginMode': False,
151
+ 'limit': 1000,
152
+ 'trigger': False,
153
+ 'trailing': False,
154
+ },
155
+ 'fetchOrders': None,
156
+ 'fetchClosedOrders': {
157
+ 'marginMode': False,
158
+ 'limit': 1000,
159
+ 'daysBack': 100000,
160
+ 'daysBackCanceled': 1,
161
+ 'untilDays': 100000,
162
+ 'trigger': False,
163
+ 'trailing': False,
164
+ },
165
+ 'fetchOHLCV': {
166
+ 'limit': 1000,
167
+ },
168
+ },
169
+ 'swap': {
170
+ 'linear': None,
171
+ 'inverse': None,
172
+ },
173
+ 'future': {
174
+ 'linear': None,
175
+ 'inverse': None,
176
+ },
177
+ },
121
178
  'precisionMode': TICK_SIZE,
122
179
  'exceptions': {
123
180
  'exact': {},
ccxt/coinbase.py CHANGED
@@ -2382,7 +2382,7 @@ class coinbase(Exchange, ImplicitAPI):
2382
2382
  request, params = self.prepare_account_request_with_currency_code(code, limit, params)
2383
2383
  # for pagination use parameter 'starting_after'
2384
2384
  # the value for the next page can be obtained from the result of the previous call in the 'pagination' field
2385
- # eg: instance.last_json_response.pagination.next_starting_after
2385
+ # eg: instance.last_http_response -> pagination.next_starting_after
2386
2386
  response = self.v2PrivateGetAccountsAccountIdTransactions(self.extend(request, params))
2387
2387
  ledger = self.parse_ledger(response['data'], currency, since, limit)
2388
2388
  length = len(ledger)
ccxt/coinbaseexchange.py CHANGED
@@ -225,6 +225,82 @@ class coinbaseexchange(Exchange, ImplicitAPI):
225
225
  },
226
226
  },
227
227
  },
228
+ 'features': {
229
+ 'default': {
230
+ 'sandbox': True,
231
+ 'createOrder': {
232
+ 'marginMode': True,
233
+ 'triggerPrice': True,
234
+ 'triggerPriceType': None,
235
+ 'triggerDirection': False,
236
+ 'stopLossPrice': False, # todo
237
+ 'takeProfitPrice': False, # todo
238
+ 'attachedStopLossTakeProfit': None,
239
+ 'timeInForce': {
240
+ 'IOC': True,
241
+ 'FOK': True,
242
+ 'PO': True,
243
+ 'GTD': True,
244
+ },
245
+ 'hedged': False,
246
+ 'trailing': False,
247
+ 'leverage': False,
248
+ 'marketBuyByCost': False,
249
+ 'marketBuyRequiresPrice': False,
250
+ 'selfTradePrevention': False,
251
+ 'iceberg': True, # todo: implement
252
+ },
253
+ 'createOrders': None,
254
+ 'fetchMyTrades': {
255
+ 'marginMode': False,
256
+ 'limit': 100,
257
+ 'daysBack': 100000,
258
+ 'untilDays': 100000,
259
+ },
260
+ 'fetchOrder': {
261
+ 'marginMode': False,
262
+ 'trigger': False,
263
+ 'trailing': False,
264
+ },
265
+ 'fetchOpenOrders': {
266
+ 'marginMode': False,
267
+ 'limit': 100,
268
+ 'trigger': False,
269
+ 'trailing': False,
270
+ },
271
+ 'fetchOrders': {
272
+ 'marginMode': False,
273
+ 'limit': 100,
274
+ 'daysBack': 100000,
275
+ 'untilDays': 100000,
276
+ 'trigger': False,
277
+ 'trailing': False,
278
+ },
279
+ 'fetchClosedOrders': {
280
+ 'marginMode': False,
281
+ 'limit': 100,
282
+ 'daysBack': 100000,
283
+ 'daysBackCanceled': 1,
284
+ 'untilDays': 100000,
285
+ 'trigger': False,
286
+ 'trailing': False,
287
+ },
288
+ 'fetchOHLCV': {
289
+ 'limit': 300,
290
+ },
291
+ },
292
+ 'spot': {
293
+ 'extends': 'default',
294
+ },
295
+ 'swap': {
296
+ 'linear': None,
297
+ 'inverse': None,
298
+ },
299
+ 'future': {
300
+ 'linear': None,
301
+ 'inverse': None,
302
+ },
303
+ },
228
304
  'exceptions': {
229
305
  'exact': {
230
306
  'Insufficient funds': InsufficientFunds,
ccxt/coinex.py CHANGED
@@ -4588,8 +4588,7 @@ class coinex(Exchange, ImplicitAPI):
4588
4588
  # }
4589
4589
  #
4590
4590
  data = self.safe_list(response, 'data', [])
4591
- result = self.parse_funding_rates(data, market)
4592
- return self.filter_by_array(result, 'symbol', symbols)
4591
+ return self.parse_funding_rates(data, symbols)
4593
4592
 
4594
4593
  def withdraw(self, code: str, amount: float, address: str, tag=None, params={}) -> Transaction:
4595
4594
  """
ccxt/delta.py CHANGED
@@ -2463,8 +2463,7 @@ class delta(Exchange, ImplicitAPI):
2463
2463
  # }
2464
2464
  #
2465
2465
  rates = self.safe_list(response, 'result', [])
2466
- result = self.parse_funding_rates(rates)
2467
- return self.filter_by_array(result, 'symbol', symbols)
2466
+ return self.parse_funding_rates(rates, symbols)
2468
2467
 
2469
2468
  def parse_funding_rate(self, contract, market: Market = None) -> FundingRate:
2470
2469
  #
ccxt/gate.py CHANGED
@@ -1961,8 +1961,7 @@ class gate(Exchange, ImplicitAPI):
1961
1961
  # }
1962
1962
  # ]
1963
1963
  #
1964
- result = self.parse_funding_rates(response)
1965
- return self.filter_by_array(result, 'symbol', symbols)
1964
+ return self.parse_funding_rates(response, symbols)
1966
1965
 
1967
1966
  def parse_funding_rate(self, contract, market: Market = None) -> FundingRate:
1968
1967
  #
@@ -2376,7 +2375,8 @@ class gate(Exchange, ImplicitAPI):
2376
2375
  chainKeys = list(withdrawFixOnChains.keys())
2377
2376
  for i in range(0, len(chainKeys)):
2378
2377
  chainKey = chainKeys[i]
2379
- result['networks'][chainKey] = {
2378
+ networkCode = self.network_id_to_code(chainKey, self.safe_string(fee, 'currency'))
2379
+ result['networks'][networkCode] = {
2380
2380
  'withdraw': {
2381
2381
  'fee': self.parse_number(withdrawFixOnChains[chainKey]),
2382
2382
  'percentage': False,
ccxt/hashkey.py CHANGED
@@ -3623,8 +3623,7 @@ class hashkey(Exchange, ImplicitAPI):
3623
3623
  # {"symbol": "ETHUSDT-PERPETUAL", "rate": "0.0001", "nextSettleTime": "1722297600000"}
3624
3624
  # ]
3625
3625
  #
3626
- fundingRates = self.parse_funding_rates(response)
3627
- return self.filter_by_array(fundingRates, 'symbol', symbols)
3626
+ return self.parse_funding_rates(response, symbols)
3628
3627
 
3629
3628
  def parse_funding_rate(self, contract, market: Market = None) -> FundingRate:
3630
3629
  #
ccxt/hollaex.py CHANGED
@@ -353,7 +353,7 @@ class hollaex(Exchange, ImplicitAPI):
353
353
  # "verified":true,
354
354
  # "allow_deposit":true,
355
355
  # "allow_withdrawal":true,
356
- # "withdrawal_fee":0.0001,
356
+ # "withdrawal_fee":0.0002,
357
357
  # "min":0.001,
358
358
  # "max":100000,
359
359
  # "increment_unit":0.001,
ccxt/htx.py CHANGED
@@ -6779,8 +6779,7 @@ class htx(Exchange, ImplicitAPI):
6779
6779
  # }
6780
6780
  #
6781
6781
  data = self.safe_value(response, 'data', [])
6782
- result = self.parse_funding_rates(data)
6783
- return self.filter_by_array(result, 'symbol', symbols)
6782
+ return self.parse_funding_rates(data, symbols)
6784
6783
 
6785
6784
  def fetch_borrow_interest(self, code: Str = None, symbol: Str = None, since: Int = None, limit: Int = None, params={}) -> List[BorrowInterest]:
6786
6785
  """
@@ -8097,8 +8096,7 @@ class htx(Exchange, ImplicitAPI):
8097
8096
  # }
8098
8097
  #
8099
8098
  data = self.safe_list(response, 'data', [])
8100
- result = self.parse_open_interests(data)
8101
- return self.filter_by_array(result, 'symbol', symbols)
8099
+ return self.parse_open_interests(data, symbols)
8102
8100
 
8103
8101
  def fetch_open_interest(self, symbol: str, params={}):
8104
8102
  """
ccxt/hyperliquid.py CHANGED
@@ -966,8 +966,7 @@ class hyperliquid(Exchange, ImplicitAPI):
966
966
  self.safe_dict(assetCtxs, i, {})
967
967
  )
968
968
  result.append(data)
969
- funding_rates = self.parse_funding_rates(result)
970
- return self.filter_by_array(funding_rates, 'symbol', symbols)
969
+ return self.parse_funding_rates(result, symbols)
971
970
 
972
971
  def parse_funding_rate(self, info, market: Market = None) -> FundingRate:
973
972
  #
@@ -1858,6 +1857,8 @@ class hyperliquid(Exchange, ImplicitAPI):
1858
1857
  :returns dict[]: a list of `funding rate structures <https://docs.ccxt.com/#/?id=funding-rate-history-structure>`
1859
1858
  """
1860
1859
  self.load_markets()
1860
+ if symbol is None:
1861
+ raise ArgumentsRequired(self.id + ' fetchFundingRateHistory() requires a symbol argument')
1861
1862
  market = self.market(symbol)
1862
1863
  request: dict = {
1863
1864
  'type': 'fundingHistory',
@@ -3146,8 +3147,7 @@ class hyperliquid(Exchange, ImplicitAPI):
3146
3147
  self.load_markets()
3147
3148
  symbols = self.market_symbols(symbols)
3148
3149
  swapMarkets = self.fetch_swap_markets()
3149
- result = self.parse_open_interests(swapMarkets)
3150
- return self.filter_by_array(result, 'symbol', symbols)
3150
+ return self.parse_open_interests(swapMarkets, symbols)
3151
3151
 
3152
3152
  def fetch_open_interest(self, symbol: str, params={}):
3153
3153
  """
ccxt/krakenfutures.py CHANGED
@@ -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')
ccxt/lbank.py CHANGED
@@ -1248,8 +1248,7 @@ class lbank(Exchange, ImplicitAPI):
1248
1248
  # "success": True,
1249
1249
  # }
1250
1250
  data = self.safe_list(response, 'data', [])
1251
- result = self.parse_funding_rates(data)
1252
- return self.filter_by_array(result, 'symbol', symbols)
1251
+ return self.parse_funding_rates(data, symbols)
1253
1252
 
1254
1253
  def fetch_balance(self, params={}) -> Balances:
1255
1254
  """
ccxt/okx.py CHANGED
@@ -1020,7 +1020,7 @@ class okx(Exchange, ImplicitAPI):
1020
1020
  'BHP': 'BHP',
1021
1021
  'APT': 'Aptos',
1022
1022
  'ARBONE': 'Arbitrum One',
1023
- 'AVAXC': 'Avalanche C',
1023
+ 'AVAXC': 'Avalanche C-Chain',
1024
1024
  'AVAXX': 'Avalanche X-Chain',
1025
1025
  'ARK': 'ARK',
1026
1026
  'AR': 'Arweave',
@@ -1808,8 +1808,8 @@ class okx(Exchange, ImplicitAPI):
1808
1808
  currencyActive = active if (active) else currencyActive
1809
1809
  networkId = self.safe_string(chain, 'chain')
1810
1810
  if (networkId is not None) and (networkId.find('-') >= 0):
1811
- parts = networkId.split('-')
1812
- chainPart = self.safe_string(parts, 1, networkId)
1811
+ parts = networkId.split('-')[1:]
1812
+ chainPart = '-'.join(parts)
1813
1813
  networkCode = self.network_id_to_code(chainPart, currency['code'])
1814
1814
  precision = self.parse_precision(self.safe_string(chain, 'wdTickSz'))
1815
1815
  if maxPrecision is None:
@@ -2749,9 +2749,11 @@ class okx(Exchange, ImplicitAPI):
2749
2749
  market = self.market(symbol)
2750
2750
  if not market['spot']:
2751
2751
  raise NotSupported(self.id + ' createMarketBuyOrderWithCost() supports spot markets only')
2752
- params['createMarketBuyOrderRequiresPrice'] = False
2753
- params['tgtCcy'] = 'quote_ccy'
2754
- return self.create_order(symbol, 'market', 'buy', cost, None, params)
2752
+ req = {
2753
+ 'createMarketBuyOrderRequiresPrice': False,
2754
+ 'tgtCcy': 'quote_ccy',
2755
+ }
2756
+ return self.create_order(symbol, 'market', 'buy', cost, None, self.extend(req, params))
2755
2757
 
2756
2758
  def create_market_sell_order_with_cost(self, symbol: str, cost: float, params={}):
2757
2759
  """
@@ -2768,9 +2770,11 @@ class okx(Exchange, ImplicitAPI):
2768
2770
  market = self.market(symbol)
2769
2771
  if not market['spot']:
2770
2772
  raise NotSupported(self.id + ' createMarketSellOrderWithCost() supports spot markets only')
2771
- params['createMarketBuyOrderRequiresPrice'] = False
2772
- params['tgtCcy'] = 'quote_ccy'
2773
- return self.create_order(symbol, 'market', 'sell', cost, None, params)
2773
+ req = {
2774
+ 'createMarketBuyOrderRequiresPrice': False,
2775
+ 'tgtCcy': 'quote_ccy',
2776
+ }
2777
+ return self.create_order(symbol, 'market', 'sell', cost, None, self.extend(req, params))
2774
2778
 
2775
2779
  def create_order_request(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: Num = None, params={}):
2776
2780
  market = self.market(symbol)
ccxt/oxfun.py CHANGED
@@ -1032,8 +1032,7 @@ class oxfun(Exchange, ImplicitAPI):
1032
1032
  # }
1033
1033
  #
1034
1034
  data = self.safe_list(response, 'data', [])
1035
- result = self.parse_funding_rates(data)
1036
- return self.filter_by_array(result, 'symbol', symbols)
1035
+ return self.parse_funding_rates(data, symbols)
1037
1036
 
1038
1037
  def parse_funding_rate(self, fundingRate, market: Market = None) -> FundingRate:
1039
1038
  #
ccxt/pro/__init__.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
 
ccxt/pro/bingx.py CHANGED
@@ -12,7 +12,6 @@ from ccxt.base.errors import ArgumentsRequired
12
12
  from ccxt.base.errors import BadRequest
13
13
  from ccxt.base.errors import NotSupported
14
14
  from ccxt.base.errors import NetworkError
15
- from ccxt.base.precise import Precise
16
15
 
17
16
 
18
17
  class bingx(ccxt.async_support.bingx):
@@ -1386,11 +1385,10 @@ class bingx(ccxt.async_support.bingx):
1386
1385
  balance = data[i]
1387
1386
  currencyId = self.safe_string(balance, 'a')
1388
1387
  code = self.safe_currency_code(currencyId)
1389
- account = self.balance[type][code] if (code in self.balance[type]) else self.account()
1388
+ account = self.account()
1389
+ account['info'] = balance
1390
+ account['used'] = self.safe_string(balance, 'lk')
1390
1391
  account['free'] = self.safe_string(balance, 'wb')
1391
- balanceChange = self.safe_string(balance, 'bc')
1392
- if account['used'] is not None:
1393
- account['used'] = Precise.string_sub(self.safe_string(account, 'used'), balanceChange)
1394
1392
  self.balance[type][code] = account
1395
1393
  self.balance[type] = self.safe_balance(self.balance[type])
1396
1394
  client.resolve(self.balance[type], type + ':balance')
ccxt/pro/bitget.py CHANGED
@@ -984,13 +984,11 @@ class bitget(ccxt.async_support.bitget):
984
984
  instType = self.safe_string(arg, 'instType', '')
985
985
  if self.positions is None:
986
986
  self.positions = {}
987
- if not (instType in self.positions):
987
+ action = self.safe_string(message, 'action')
988
+ if not (instType in self.positions) or (action == 'snapshot'):
988
989
  self.positions[instType] = ArrayCacheBySymbolBySide()
989
990
  cache = self.positions[instType]
990
991
  rawPositions = self.safe_value(message, 'data', [])
991
- dataLength = len(rawPositions)
992
- if dataLength == 0:
993
- return
994
992
  newPositions = []
995
993
  for i in range(0, len(rawPositions)):
996
994
  rawPosition = rawPositions[i]
ccxt/pro/xt.py CHANGED
@@ -70,7 +70,7 @@ class xt(ccxt.async_support.xt):
70
70
  if not isContract:
71
71
  url = url + '/private'
72
72
  client = self.client(url)
73
- token = self.safe_dict(client.subscriptions, 'token')
73
+ token = self.safe_string(client.subscriptions, 'token')
74
74
  if token is None:
75
75
  if isContract:
76
76
  response = await self.privateLinearGetFutureUserV1UserListenKey()
ccxt/test/tests_async.py CHANGED
@@ -562,6 +562,8 @@ class testMainClass:
562
562
  'fetchBorrowRateHistory': [code],
563
563
  'fetchLedgerEntry': [code],
564
564
  }
565
+ if get_cli_arg_value('--fundedTests'):
566
+ tests['createOrder'] = [symbol]
565
567
  if self.ws_tests:
566
568
  tests = {
567
569
  'watchBalance': [code],
ccxt/test/tests_sync.py CHANGED
@@ -559,6 +559,8 @@ class testMainClass:
559
559
  'fetchBorrowRateHistory': [code],
560
560
  'fetchLedgerEntry': [code],
561
561
  }
562
+ if get_cli_arg_value('--fundedTests'):
563
+ tests['createOrder'] = [symbol]
562
564
  if self.ws_tests:
563
565
  tests = {
564
566
  'watchBalance': [code],
ccxt/whitebit.py CHANGED
@@ -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/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
  def fetch_funding_rate_history(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
2832
2831
  """
ccxt/woofipro.py CHANGED
@@ -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
  def fetch_funding_rate_history(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
969
968
  """
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: ccxt
3
- Version: 4.4.46
3
+ Version: 4.4.47
4
4
  Summary: A JavaScript / TypeScript / Python / C# / PHP cryptocurrency trading library with support for 100+ exchanges
5
5
  Home-page: https://ccxt.com
6
6
  Author: Igor Kroitor
@@ -70,7 +70,6 @@ Current feature list:
70
70
 
71
71
 
72
72
  ## Sponsored Promotion
73
- [![bitmex-campaign](https://github.com/user-attachments/assets/f984bb77-7aca-482b-b5ec-a9ba6448aaa8)](https://www.bitmex.com/ccxt-trading-campaign)
74
73
 
75
74
  ## See Also
76
75
 
@@ -277,13 +276,13 @@ console.log(version, Object.keys(exchanges));
277
276
 
278
277
  All-in-one browser bundle (dependencies included), served from a CDN of your choice:
279
278
 
280
- * jsDelivr: https://cdn.jsdelivr.net/npm/ccxt@4.4.46/dist/ccxt.browser.min.js
281
- * unpkg: https://unpkg.com/ccxt@4.4.46/dist/ccxt.browser.min.js
279
+ * jsDelivr: https://cdn.jsdelivr.net/npm/ccxt@4.4.47/dist/ccxt.browser.min.js
280
+ * unpkg: https://unpkg.com/ccxt@4.4.47/dist/ccxt.browser.min.js
282
281
 
283
282
  CDNs are not updated in real-time and may have delays. Defaulting to the most recent version without specifying the version number is not recommended. Please, keep in mind that we are not responsible for the correct operation of those CDN servers.
284
283
 
285
284
  ```HTML
286
- <script type="text/javascript" src="https://cdn.jsdelivr.net/npm/ccxt@4.4.46/dist/ccxt.browser.min.js"></script>
285
+ <script type="text/javascript" src="https://cdn.jsdelivr.net/npm/ccxt@4.4.47/dist/ccxt.browser.min.js"></script>
287
286
  ```
288
287
 
289
288
  Creates a global `ccxt` object: