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.
- ccxt/__init__.py +1 -1
- ccxt/abstract/binance.py +1 -0
- ccxt/abstract/binancecoinm.py +1 -0
- ccxt/abstract/binanceus.py +1 -0
- ccxt/abstract/binanceusdm.py +1 -0
- ccxt/abstract/blofin.py +22 -0
- ccxt/async_support/__init__.py +1 -1
- ccxt/async_support/base/exchange.py +1 -1
- ccxt/async_support/binance.py +235 -107
- ccxt/async_support/bingx.py +20 -9
- ccxt/async_support/bitfinex.py +7 -3
- ccxt/async_support/bitget.py +6 -4
- ccxt/async_support/bitmart.py +7 -10
- ccxt/async_support/bitmex.py +4 -6
- ccxt/async_support/bitstamp.py +5 -0
- ccxt/async_support/blofin.py +22 -0
- ccxt/async_support/bybit.py +12 -27
- ccxt/async_support/coinbase.py +14 -10
- ccxt/async_support/coinbaseinternational.py +13 -9
- ccxt/async_support/coincatch.py +2 -2
- ccxt/async_support/coinex.py +6 -6
- ccxt/async_support/cryptocom.py +5 -3
- ccxt/async_support/defx.py +2 -2
- ccxt/async_support/delta.py +1 -1
- ccxt/async_support/exmo.py +16 -8
- ccxt/async_support/gate.py +10 -5
- ccxt/async_support/gemini.py +5 -0
- ccxt/async_support/hashkey.py +15 -10
- ccxt/async_support/htx.py +103 -5
- ccxt/async_support/hyperliquid.py +6 -1
- ccxt/async_support/kraken.py +10 -3
- ccxt/async_support/krakenfutures.py +6 -1
- ccxt/async_support/kucoin.py +10 -8
- ccxt/async_support/kucoinfutures.py +7 -8
- ccxt/async_support/lykke.py +1 -1
- ccxt/async_support/mexc.py +20 -14
- ccxt/async_support/myokx.py +8 -0
- ccxt/async_support/ndax.py +1 -1
- ccxt/async_support/oceanex.py +1 -1
- ccxt/async_support/okx.py +9 -10
- ccxt/async_support/onetrading.py +2 -1
- ccxt/async_support/whitebit.py +35 -10
- ccxt/async_support/woo.py +6 -4
- ccxt/async_support/woofipro.py +7 -4
- ccxt/base/exchange.py +1 -1
- ccxt/binance.py +235 -107
- ccxt/bingx.py +20 -9
- ccxt/bitfinex.py +7 -3
- ccxt/bitget.py +6 -4
- ccxt/bitmart.py +7 -10
- ccxt/bitmex.py +4 -6
- ccxt/bitstamp.py +5 -0
- ccxt/blofin.py +22 -0
- ccxt/bybit.py +12 -27
- ccxt/coinbase.py +14 -10
- ccxt/coinbaseinternational.py +13 -9
- ccxt/coincatch.py +2 -2
- ccxt/coinex.py +6 -6
- ccxt/cryptocom.py +5 -3
- ccxt/defx.py +2 -2
- ccxt/delta.py +1 -1
- ccxt/exmo.py +16 -8
- ccxt/gate.py +10 -5
- ccxt/gemini.py +5 -0
- ccxt/hashkey.py +15 -10
- ccxt/htx.py +103 -5
- ccxt/hyperliquid.py +6 -1
- ccxt/kraken.py +10 -3
- ccxt/krakenfutures.py +6 -1
- ccxt/kucoin.py +10 -8
- ccxt/kucoinfutures.py +7 -8
- ccxt/lykke.py +1 -1
- ccxt/mexc.py +20 -14
- ccxt/myokx.py +8 -0
- ccxt/ndax.py +1 -1
- ccxt/oceanex.py +1 -1
- ccxt/okx.py +9 -10
- ccxt/onetrading.py +2 -1
- ccxt/pro/__init__.py +1 -1
- ccxt/pro/binance.py +2 -1
- ccxt/pro/bitcoincom.py +4 -1
- ccxt/pro/bitopro.py +1 -1
- ccxt/pro/myokx.py +5 -0
- ccxt/whitebit.py +35 -10
- ccxt/woo.py +6 -4
- ccxt/woofipro.py +7 -4
- {ccxt-4.4.43.dist-info → ccxt-4.4.45.dist-info}/METADATA +4 -4
- {ccxt-4.4.43.dist-info → ccxt-4.4.45.dist-info}/RECORD +91 -91
- {ccxt-4.4.43.dist-info → ccxt-4.4.45.dist-info}/LICENSE.txt +0 -0
- {ccxt-4.4.43.dist-info → ccxt-4.4.45.dist-info}/WHEEL +0 -0
- {ccxt-4.4.43.dist-info → ccxt-4.4.45.dist-info}/top_level.txt +0 -0
ccxt/async_support/whitebit.py
CHANGED
@@ -820,9 +820,22 @@ class whitebit(Exchange, ImplicitAPI):
|
|
820
820
|
# "last": "55913.88",
|
821
821
|
# "period": 86400
|
822
822
|
# }
|
823
|
-
|
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.
|
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.
|
847
|
+
'bid': self.safe_string_2(ticker, 'bid', 'highestBid'),
|
835
848
|
'bidVolume': None,
|
836
|
-
'ask': self.
|
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.
|
847
|
-
'quoteVolume': self.
|
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[]
|
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
|
-
|
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
|
-
|
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
|
-
|
348
|
-
|
349
|
-
|
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
|
-
'
|
382
|
+
'daysBack': None,
|
381
383
|
'daysBackCanceled': None,
|
382
384
|
'untilDays': 100000,
|
383
385
|
'trigger': True,
|
ccxt/async_support/woofipro.py
CHANGED
@@ -327,8 +327,11 @@ class woofipro(Exchange, ImplicitAPI):
|
|
327
327
|
},
|
328
328
|
'hedged': False,
|
329
329
|
'trailing': True,
|
330
|
-
#
|
331
|
-
|
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
|
-
'
|
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
|
-
'
|
381
|
+
'price': False,
|
379
382
|
},
|
380
383
|
},
|
381
384
|
},
|