ccxt 4.4.70__py2.py3-none-any.whl → 4.4.72__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 (99) hide show
  1. ccxt/__init__.py +1 -3
  2. ccxt/abstract/bingx.py +1 -0
  3. ccxt/abstract/bitmart.py +1 -0
  4. ccxt/abstract/poloniex.py +36 -0
  5. ccxt/ascendex.py +1 -1
  6. ccxt/async_support/__init__.py +1 -3
  7. ccxt/async_support/ascendex.py +1 -1
  8. ccxt/async_support/base/exchange.py +3 -3
  9. ccxt/async_support/binance.py +107 -102
  10. ccxt/async_support/bingx.py +65 -43
  11. ccxt/async_support/bitfinex.py +1 -1
  12. ccxt/async_support/bitfinex1.py +1 -1
  13. ccxt/async_support/bitget.py +0 -3
  14. ccxt/async_support/bitmart.py +12 -1
  15. ccxt/async_support/bitopro.py +1 -0
  16. ccxt/async_support/bitrue.py +1 -0
  17. ccxt/async_support/bl3p.py +2 -2
  18. ccxt/async_support/cex.py +2 -0
  19. ccxt/async_support/coinbase.py +3 -2
  20. ccxt/async_support/coinbaseexchange.py +4 -2
  21. ccxt/async_support/coinbaseinternational.py +3 -2
  22. ccxt/async_support/coinex.py +1 -1
  23. ccxt/async_support/deribit.py +3 -1
  24. ccxt/async_support/derive.py +11 -7
  25. ccxt/async_support/gate.py +3 -0
  26. ccxt/async_support/gemini.py +2 -1
  27. ccxt/async_support/hashkey.py +4 -2
  28. ccxt/async_support/hitbtc.py +1 -1
  29. ccxt/async_support/hyperliquid.py +38 -0
  30. ccxt/async_support/kraken.py +78 -6
  31. ccxt/async_support/krakenfutures.py +4 -0
  32. ccxt/async_support/kucoin.py +5 -3
  33. ccxt/async_support/kuna.py +1 -1
  34. ccxt/async_support/mexc.py +9 -5
  35. ccxt/async_support/ndax.py +1 -1
  36. ccxt/async_support/okcoin.py +4 -0
  37. ccxt/async_support/okx.py +79 -76
  38. ccxt/async_support/paradex.py +65 -7
  39. ccxt/async_support/paymium.py +1 -1
  40. ccxt/async_support/poloniex.py +1265 -86
  41. ccxt/async_support/upbit.py +1 -1
  42. ccxt/async_support/whitebit.py +102 -4
  43. ccxt/async_support/woo.py +3 -1
  44. ccxt/async_support/woofipro.py +1 -1
  45. ccxt/async_support/yobit.py +2 -1
  46. ccxt/base/errors.py +6 -0
  47. ccxt/base/exchange.py +31 -4
  48. ccxt/base/types.py +28 -0
  49. ccxt/binance.py +107 -102
  50. ccxt/bingx.py +65 -43
  51. ccxt/bitfinex.py +1 -1
  52. ccxt/bitfinex1.py +1 -1
  53. ccxt/bitget.py +0 -3
  54. ccxt/bitmart.py +12 -1
  55. ccxt/bitopro.py +1 -0
  56. ccxt/bitrue.py +1 -0
  57. ccxt/bl3p.py +2 -2
  58. ccxt/cex.py +2 -0
  59. ccxt/coinbase.py +3 -2
  60. ccxt/coinbaseexchange.py +4 -2
  61. ccxt/coinbaseinternational.py +3 -2
  62. ccxt/coinex.py +1 -1
  63. ccxt/deribit.py +3 -1
  64. ccxt/derive.py +11 -7
  65. ccxt/gate.py +3 -0
  66. ccxt/gemini.py +2 -1
  67. ccxt/hashkey.py +4 -2
  68. ccxt/hitbtc.py +1 -1
  69. ccxt/hyperliquid.py +38 -0
  70. ccxt/kraken.py +78 -6
  71. ccxt/krakenfutures.py +4 -0
  72. ccxt/kucoin.py +5 -3
  73. ccxt/kuna.py +1 -1
  74. ccxt/mexc.py +9 -5
  75. ccxt/ndax.py +1 -1
  76. ccxt/okcoin.py +4 -0
  77. ccxt/okx.py +79 -76
  78. ccxt/paradex.py +65 -7
  79. ccxt/paymium.py +1 -1
  80. ccxt/poloniex.py +1264 -86
  81. ccxt/pro/__init__.py +1 -3
  82. ccxt/pro/binance.py +102 -102
  83. ccxt/pro/bingx.py +63 -52
  84. ccxt/pro/bitmart.py +15 -7
  85. ccxt/pro/derive.py +2 -2
  86. ccxt/pro/krakenfutures.py +1 -1
  87. ccxt/test/tests_async.py +1 -0
  88. ccxt/test/tests_sync.py +1 -0
  89. ccxt/upbit.py +1 -1
  90. ccxt/whitebit.py +102 -4
  91. ccxt/woo.py +3 -1
  92. ccxt/woofipro.py +1 -1
  93. ccxt/yobit.py +2 -1
  94. {ccxt-4.4.70.dist-info → ccxt-4.4.72.dist-info}/METADATA +6 -9
  95. {ccxt-4.4.70.dist-info → ccxt-4.4.72.dist-info}/RECORD +98 -99
  96. ccxt/abstract/poloniexfutures.py +0 -48
  97. {ccxt-4.4.70.dist-info → ccxt-4.4.72.dist-info}/LICENSE.txt +0 -0
  98. {ccxt-4.4.70.dist-info → ccxt-4.4.72.dist-info}/WHEEL +0 -0
  99. {ccxt-4.4.70.dist-info → ccxt-4.4.72.dist-info}/top_level.txt +0 -0
ccxt/pro/bingx.py CHANGED
@@ -42,7 +42,7 @@ class bingx(ccxt.async_support.bingx):
42
42
  },
43
43
  },
44
44
  'options': {
45
- 'listenKeyRefreshRate': 3540000, # 1 hour(59 mins so we have 1min to renew the token)
45
+ 'listenKeyRefreshRate': 3540000, # 1 hour(59 mins so we have 1 min to renew the token)
46
46
  'ws': {
47
47
  'gunzip': True,
48
48
  },
@@ -639,60 +639,67 @@ class bingx(ccxt.async_support.bingx):
639
639
  #
640
640
  # spot
641
641
  #
642
- # {
643
- # "code": 0,
644
- # "dataType": "BTC-USDT@depth20",
645
- # "data": {
646
- # "bids": [
647
- # ['28852.9', "34.2621"],
648
- # ...
649
- # ],
650
- # "asks": [
651
- # ['28864.9', "23.4079"],
652
- # ...
653
- # ]
654
- # },
655
- # "dataType": "BTC-USDT@depth20",
656
- # "success": True
657
- # }
642
+ # {
643
+ # "code":0,
644
+ # "data":
645
+ # {
646
+ # "asks":[
647
+ # ["84119.73","0.000011"],
648
+ # ["84116.52","0.000014"],
649
+ # ["84116.40","0.000039"]
650
+ # ],
651
+ # "bids":[
652
+ # ["83656.98","2.570805"],
653
+ # ["83655.51","0.000347"],
654
+ # ["83654.59","0.000082"]
655
+ # ],
656
+ # "lastUpdateId":13565694850
657
+ # },
658
+ # "dataType":"BTC-USDT@depth100",
659
+ # "success":true,
660
+ # "timestamp":1743241379958
661
+ # }
658
662
  #
659
663
  # linear swap
660
664
  #
661
- # {
662
- # "code": 0,
663
- # "dataType": "BTC-USDT@depth20@100ms", #or "all@depth20@100ms"
664
- # "data": {
665
- # "bids": [
666
- # ['28852.9', "34.2621"],
667
- # ...
668
- # ],
669
- # "asks": [
670
- # ['28864.9', "23.4079"],
671
- # ...
672
- # ],
673
- # "symbol": "BTC-USDT", # self key exists only in "all" subscription
674
- # }
675
- # }
665
+ # {
666
+ # "code":0,
667
+ # "dataType":"BTC-USDT@depth100@500ms",
668
+ # "ts":1743241563651,
669
+ # "data":
670
+ # {
671
+ # "bids":[
672
+ # ["83363.2","0.1908"],
673
+ # ["83360.0","0.0003"],
674
+ # ["83356.5","0.0245"],
675
+ # ],
676
+ # "asks":[
677
+ # ["83495.0","0.0024"],
678
+ # ["83490.0","0.0001"],
679
+ # ["83488.0","0.0004"],
680
+ # ]
681
+ # }
682
+ # }
676
683
  #
677
684
  # inverse swap
678
685
  #
679
686
  # {
680
- # "code": 0,
681
- # "dataType": "BTC-USD@depth100",
682
- # "data": {
683
- # {
684
- # "symbol": "BTC-USD",
685
- # "bids": [
686
- # {"p": "58074.2", "a": "1.422318", "v": "826.0"},
687
- # ...
688
- # ],
689
- # "asks": [
690
- # {"p": "62878.0", "a": "0.001590", "v": "1.0"},
691
- # ...
692
- # ],
693
- # "aggPrecision": "0.1",
694
- # "timestamp": 1723705093529
695
- # }
687
+ # "code":0,
688
+ # "dataType":"BTC-USD@depth100",
689
+ # "data":{
690
+ # "symbol":"BTC-USD",
691
+ # "bids":[
692
+ # {"p":"83411.2","a":"2.979216","v":"2485.0"},
693
+ # {"p":"83411.1","a":"1.592114","v":"1328.0"},
694
+ # {"p":"83410.8","a":"2.656730","v":"2216.0"},
695
+ # ],
696
+ # "asks":[
697
+ # {"p":"88200.0","a":"0.344671","v":"304.0"},
698
+ # {"p":"88023.8","a":"0.045442","v":"40.0"},
699
+ # {"p":"88001.0","a":"0.003409","v":"3.0"},
700
+ # ],
701
+ # "aggPrecision":"0.1",
702
+ # "timestamp":1743242290710
696
703
  # }
697
704
  # }
698
705
  #
@@ -706,7 +713,8 @@ class bingx(ccxt.async_support.bingx):
706
713
  marketType = 'swap' if isSwap else 'spot'
707
714
  market = self.safe_market(marketId, None, None, marketType)
708
715
  symbol = market['symbol']
709
- if self.safe_value(self.orderbooks, symbol) is None:
716
+ orderbook = self.safe_value(self.orderbooks, symbol)
717
+ if orderbook is None:
710
718
  # limit = [5, 10, 20, 50, 100]
711
719
  subscriptionHash = dataType
712
720
  subscription = client.subscriptions[subscriptionHash]
@@ -714,12 +722,15 @@ class bingx(ccxt.async_support.bingx):
714
722
  self.orderbooks[symbol] = self.order_book({}, limit)
715
723
  orderbook = self.orderbooks[symbol]
716
724
  snapshot = None
725
+ timestamp = self.safe_integer_2(message, 'timestamp', 'ts')
726
+ timestamp = self.safe_integer_2(data, 'timestamp', 'ts', timestamp)
717
727
  if market['inverse']:
718
- snapshot = self.parse_order_book(data, symbol, None, 'bids', 'asks', 'p', 'a')
728
+ snapshot = self.parse_order_book(data, symbol, timestamp, 'bids', 'asks', 'p', 'a')
719
729
  else:
720
- snapshot = self.parse_order_book(data, symbol, None, 'bids', 'asks', 0, 1)
730
+ snapshot = self.parse_order_book(data, symbol, timestamp, 'bids', 'asks', 0, 1)
731
+ nonce = self.safe_integer(data, 'lastUpdateId')
732
+ snapshot['nonce'] = nonce
721
733
  orderbook.reset(snapshot)
722
- self.orderbooks[symbol] = orderbook
723
734
  messageHash = self.get_message_hash('orderbook', symbol)
724
735
  client.resolve(orderbook, messageHash)
725
736
  # resolve for "all"
ccxt/pro/bitmart.py CHANGED
@@ -858,15 +858,12 @@ class bitmart(ccxt.async_support.bitmart):
858
858
  # "data":[
859
859
  # {
860
860
  # "trade_id":6798697637,
861
- # "contract_id":1,
862
861
  # "symbol":"BTCUSDT",
863
862
  # "deal_price":"39735.8",
864
863
  # "deal_vol":"2",
865
- # "type":0,
866
864
  # "way":1,
867
- # "create_time":1701618503,
868
- # "create_time_mill":1701618503517,
869
- # "created_at":"2023-12-03T15:48:23.517518538Z"
865
+ # "created_at":"2023-12-03T15:48:23.517518538Z",
866
+ # "m": True,
870
867
  # }
871
868
  # ]
872
869
  # }
@@ -899,6 +896,7 @@ class bitmart(ccxt.async_support.bitmart):
899
896
  return symbol
900
897
 
901
898
  def parse_ws_trade(self, trade: dict, market: Market = None):
899
+ #
902
900
  # spot
903
901
  # {
904
902
  # "ms_t": 1740320841473,
@@ -929,6 +927,16 @@ class bitmart(ccxt.async_support.bitmart):
929
927
  timestamp = self.parse8601(datetime)
930
928
  else:
931
929
  datetime = self.iso8601(timestamp)
930
+ takerOrMaker = None # True for public trades
931
+ side = self.safe_string(trade, 'side')
932
+ buyerMaker = self.safe_bool(trade, 'm')
933
+ if buyerMaker is not None:
934
+ if side is None:
935
+ if buyerMaker:
936
+ side = 'sell'
937
+ else:
938
+ side = 'buy'
939
+ takerOrMaker = 'taker'
932
940
  return self.safe_trade({
933
941
  'info': trade,
934
942
  'id': self.safe_string(trade, 'trade_id'),
@@ -937,11 +945,11 @@ class bitmart(ccxt.async_support.bitmart):
937
945
  'datetime': datetime,
938
946
  'symbol': market['symbol'],
939
947
  'type': None,
940
- 'side': self.safe_string(trade, 'side'),
948
+ 'side': side,
941
949
  'price': self.safe_string_2(trade, 'price', 'deal_price'),
942
950
  'amount': self.safe_string_2(trade, 'size', 'deal_vol'),
943
951
  'cost': None,
944
- 'takerOrMaker': None,
952
+ 'takerOrMaker': takerOrMaker,
945
953
  'fee': None,
946
954
  }, market)
947
955
 
ccxt/pro/derive.py CHANGED
@@ -417,12 +417,12 @@ class derive(ccxt.async_support.derive):
417
417
  requestId = self.request_id(url)
418
418
  now = str(self.milliseconds())
419
419
  signature = self.signMessage(now, self.privateKey)
420
- contractWalletAddress = self.safe_string(self.options, 'contractWalletAddress')
420
+ deriveWalletAddress = self.safe_string(self.options, 'deriveWalletAddress')
421
421
  request: dict = {
422
422
  'id': requestId,
423
423
  'method': 'public/login',
424
424
  'params': {
425
- 'wallet': contractWalletAddress,
425
+ 'wallet': deriveWalletAddress,
426
426
  'timestamp': now,
427
427
  'signature': signature,
428
428
  },
ccxt/pro/krakenfutures.py CHANGED
@@ -460,7 +460,7 @@ class krakenfutures(ccxt.async_support.krakenfutures):
460
460
  # {
461
461
  # "feed": "trade",
462
462
  # "product_id": "PI_XBTUSD",
463
- # "uid": "caa9c653-420b-4c24-a9f1-462a054d86f1",
463
+ # "uid": "caa9c653-420b-4c24-a9f2-462a054d86f1",
464
464
  # "side": "sell",
465
465
  # "type": "fill",
466
466
  # "seq": 655508,
ccxt/test/tests_async.py CHANGED
@@ -935,6 +935,7 @@ class testMainClass:
935
935
  def init_offline_exchange(self, exchange_name):
936
936
  markets = self.load_markets_from_file(exchange_name)
937
937
  currencies = self.load_currencies_from_file(exchange_name)
938
+ # we add "proxy" 2 times to intentionally trigger InvalidProxySettings
938
939
  exchange = init_exchange(exchange_name, {
939
940
  'markets': markets,
940
941
  'currencies': currencies,
ccxt/test/tests_sync.py CHANGED
@@ -932,6 +932,7 @@ class testMainClass:
932
932
  def init_offline_exchange(self, exchange_name):
933
933
  markets = self.load_markets_from_file(exchange_name)
934
934
  currencies = self.load_currencies_from_file(exchange_name)
935
+ # we add "proxy" 2 times to intentionally trigger InvalidProxySettings
935
936
  exchange = init_exchange(exchange_name, {
936
937
  'markets': markets,
937
938
  'currencies': currencies,
ccxt/upbit.py CHANGED
@@ -1886,7 +1886,7 @@ class upbit(Exchange, ImplicitAPI):
1886
1886
  #
1887
1887
  return self.parse_deposit_address(response)
1888
1888
 
1889
- def create_deposit_address(self, code: str, params={}):
1889
+ def create_deposit_address(self, code: str, params={}) -> DepositAddress:
1890
1890
  """
1891
1891
 
1892
1892
  https://docs.upbit.com/reference/%EC%9E%85%EA%B8%88-%EC%A3%BC%EC%86%8C-%EC%83%9D%EC%84%B1-%EC%9A%94%EC%B2%AD
ccxt/whitebit.py CHANGED
@@ -6,7 +6,7 @@
6
6
  from ccxt.base.exchange import Exchange
7
7
  from ccxt.abstract.whitebit import ImplicitAPI
8
8
  import hashlib
9
- from ccxt.base.types import Any, Balances, BorrowInterest, Bool, Conversion, Currencies, Currency, DepositAddress, FundingHistory, Int, Market, MarketType, Num, Order, OrderBook, OrderSide, OrderType, Position, Str, Strings, Ticker, Tickers, FundingRate, FundingRates, Trade, TradingFees, Transaction, TransferEntry
9
+ from ccxt.base.types import Any, Balances, BorrowInterest, Bool, Conversion, CrossBorrowRate, Currencies, Currency, DepositAddress, FundingHistory, Int, Market, MarketType, Num, Order, OrderBook, OrderSide, OrderType, Position, Str, Strings, Ticker, Tickers, FundingRate, FundingRates, Trade, TradingFees, Transaction, TransferEntry
10
10
  from typing import List
11
11
  from ccxt.base.errors import ExchangeError
12
12
  from ccxt.base.errors import AuthenticationError
@@ -46,13 +46,16 @@ class whitebit(Exchange, ImplicitAPI):
46
46
  'cancelOrder': True,
47
47
  'cancelOrders': False,
48
48
  'createConvertTrade': True,
49
+ 'createDepositAddress': True,
49
50
  'createMarketBuyOrderWithCost': True,
50
51
  'createMarketOrderWithCost': False,
51
52
  'createMarketSellOrderWithCost': False,
52
53
  'createOrder': True,
54
+ 'createPostOnlyOrder': True,
53
55
  'createStopLimitOrder': True,
54
56
  'createStopMarketOrder': True,
55
57
  'createStopOrder': True,
58
+ 'createTriggerOrder': True,
56
59
  'editOrder': False,
57
60
  'fetchBalance': True,
58
61
  'fetchBorrowRateHistories': False,
@@ -61,7 +64,7 @@ class whitebit(Exchange, ImplicitAPI):
61
64
  'fetchConvertQuote': True,
62
65
  'fetchConvertTrade': False,
63
66
  'fetchConvertTradeHistory': True,
64
- 'fetchCrossBorrowRate': False,
67
+ 'fetchCrossBorrowRate': True,
65
68
  'fetchCrossBorrowRates': False,
66
69
  'fetchCurrencies': True,
67
70
  'fetchDeposit': True,
@@ -1342,9 +1345,11 @@ class whitebit(Exchange, ImplicitAPI):
1342
1345
  :param dict [params]: extra parameters specific to the exchange API endpoint
1343
1346
  :returns dict: an `order structure <https://docs.ccxt.com/#/?id=order-structure>`
1344
1347
  """
1345
- params['cost'] = cost
1348
+ req = {
1349
+ 'cost': cost,
1350
+ }
1346
1351
  # only buy side is supported
1347
- return self.create_order(symbol, 'market', side, 0, None, params)
1352
+ return self.create_order(symbol, 'market', side, 0, None, self.extend(req, params))
1348
1353
 
1349
1354
  def create_market_buy_order_with_cost(self, symbol: str, cost: float, params={}) -> Order:
1350
1355
  """
@@ -1373,6 +1378,10 @@ class whitebit(Exchange, ImplicitAPI):
1373
1378
  :param float [price]: the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
1374
1379
  :param dict [params]: extra parameters specific to the exchange API endpoint
1375
1380
  :param float [params.cost]: *market orders only* the cost of the order in units of the base currency
1381
+ :param float [params.triggerPrice]: The price at which a trigger order is triggered at
1382
+ :param bool [params.postOnly]: If True, the order will only be posted to the order book and not executed immediately
1383
+ :param str [params.clientOrderId]: a unique id for the order
1384
+ :param str [params.marginMode]: 'cross' or 'isolated', for margin trading, uses self.options.defaultMarginMode if not passed, defaults to None/None/None
1376
1385
  :returns dict: an `order structure <https://docs.ccxt.com/#/?id=order-structure>`
1377
1386
  """
1378
1387
  self.load_markets()
@@ -1999,6 +2008,60 @@ class whitebit(Exchange, ImplicitAPI):
1999
2008
  'tag': tag,
2000
2009
  }
2001
2010
 
2011
+ def create_deposit_address(self, code: str, params={}) -> DepositAddress:
2012
+ """
2013
+ create a currency deposit address
2014
+
2015
+ https://docs.whitebit.com/private/http-main-v4/#create-new-address-for-deposit
2016
+
2017
+ :param str code: unified currency code of the currency for the deposit address
2018
+ :param dict [params]: extra parameters specific to the exchange API endpoint
2019
+ :param str [params.network]: the blockchain network to create a deposit address on
2020
+ :param str [params.type]: address type, available for specific currencies
2021
+ :returns dict: an `address structure <https://docs.ccxt.com/#/?id=address-structure>`
2022
+ """
2023
+ self.load_markets()
2024
+ currency = self.currency(code)
2025
+ request: dict = {
2026
+ 'ticker': currency['id'],
2027
+ }
2028
+ response = self.v4PrivatePostMainAccountCreateNewAddress(self.extend(request, params))
2029
+ #
2030
+ # {
2031
+ # "account": {
2032
+ # "address": "GDTSOI56XNVAKJNJBLJGRNZIVOCIZJRBIDKTWSCYEYNFAZEMBLN75RMN",
2033
+ # "memo": "48565488244493"
2034
+ # },
2035
+ # "required": {
2036
+ # "maxAmount": "0",
2037
+ # "minAmount": "1",
2038
+ # "fixedFee": "0",
2039
+ # "flexFee": {
2040
+ # "maxFee": "0",
2041
+ # "minFee": "0",
2042
+ # "percent": "0"
2043
+ # }
2044
+ # }
2045
+ # }
2046
+ #
2047
+ data = self.safe_dict(response, 'account', {})
2048
+ return self.parse_deposit_address(data, currency)
2049
+
2050
+ def parse_deposit_address(self, depositAddress, currency: Currency = None) -> DepositAddress:
2051
+ #
2052
+ # {
2053
+ # "address": "GDTSOI56XNVAKJNJBLJGRNZIVOCIZJRBIDKTWSCYEYNFAZEMBLN75RMN",
2054
+ # "memo": "48565488244493"
2055
+ # },
2056
+ #
2057
+ return {
2058
+ 'info': depositAddress,
2059
+ 'currency': self.safe_currency_code(None, currency),
2060
+ 'network': None,
2061
+ 'address': self.safe_string(depositAddress, 'address'),
2062
+ 'tag': self.safe_string(depositAddress, 'memo'),
2063
+ }
2064
+
2002
2065
  def set_leverage(self, leverage: Int, symbol: Str = None, params={}):
2003
2066
  """
2004
2067
  set the level of leverage for a market
@@ -3067,6 +3130,41 @@ class whitebit(Exchange, ImplicitAPI):
3067
3130
  'takeProfitPrice': self.safe_number(tpsl, 'takeProfit'),
3068
3131
  })
3069
3132
 
3133
+ def fetch_cross_borrow_rate(self, code: str, params={}) -> CrossBorrowRate:
3134
+ """
3135
+ fetch the rate of interest to borrow a currency for margin trading
3136
+
3137
+ https://docs.whitebit.com/private/http-main-v4/#get-plans
3138
+
3139
+ :param str code: unified currency code
3140
+ :param dict [params]: extra parameters specific to the exchange API endpoint
3141
+ :returns dict: a `borrow rate structure <https://docs.ccxt.com/#/?id=borrow-rate-structure>`
3142
+ """
3143
+ self.load_markets()
3144
+ currency = self.currency(code)
3145
+ request: dict = {
3146
+ 'ticker': currency['id'],
3147
+ }
3148
+ response = self.v4PrivatePostMainAccountSmartPlans(self.extend(request, params))
3149
+ #
3150
+ #
3151
+ data = self.safe_list(response, 0, [])
3152
+ return self.parse_borrow_rate(data, currency)
3153
+
3154
+ def parse_borrow_rate(self, info, currency: Currency = None):
3155
+ #
3156
+ #
3157
+ currencyId = self.safe_string(info, 'ticker')
3158
+ percent = self.safe_string(info, 'percent')
3159
+ return {
3160
+ 'currency': self.safe_currency_code(currencyId, currency),
3161
+ 'rate': self.parse_number(Precise.string_div(percent, '100')),
3162
+ 'period': self.safe_integer(info, 'duration'),
3163
+ 'timestamp': None,
3164
+ 'datetime': None,
3165
+ 'info': info,
3166
+ }
3167
+
3070
3168
  def is_fiat(self, currency: str) -> bool:
3071
3169
  fiatCurrencies = self.safe_value(self.options, 'fiatCurrencies', [])
3072
3170
  return self.in_array(currency, fiatCurrencies)
ccxt/woo.py CHANGED
@@ -563,6 +563,7 @@ class woo(Exchange, ImplicitAPI):
563
563
  symbol = base + '/' + quote
564
564
  contractSize: Num = None
565
565
  linear: Bool = None
566
+ inverse: Bool = None
566
567
  margin = True
567
568
  contract = swap
568
569
  if contract:
@@ -572,6 +573,7 @@ class woo(Exchange, ImplicitAPI):
572
573
  symbol = base + '/' + quote + ':' + settle
573
574
  contractSize = self.parse_number('1')
574
575
  linear = True
576
+ inverse = False
575
577
  return {
576
578
  'id': marketId,
577
579
  'symbol': symbol,
@@ -590,7 +592,7 @@ class woo(Exchange, ImplicitAPI):
590
592
  'active': self.safe_string(market, 'is_trading') == '1',
591
593
  'contract': contract,
592
594
  'linear': linear,
593
- 'inverse': None,
595
+ 'inverse': inverse,
594
596
  'contractSize': contractSize,
595
597
  'expiry': None,
596
598
  'expiryDatetime': None,
ccxt/woofipro.py CHANGED
@@ -548,7 +548,7 @@ class woofipro(Exchange, ImplicitAPI):
548
548
  'active': None,
549
549
  'contract': True,
550
550
  'linear': True,
551
- 'inverse': None,
551
+ 'inverse': False,
552
552
  'contractSize': self.parse_number('1'),
553
553
  'expiry': None,
554
554
  'expiryDatetime': None,
ccxt/yobit.py CHANGED
@@ -1216,7 +1216,7 @@ class yobit(Exchange, ImplicitAPI):
1216
1216
  result.append(trade)
1217
1217
  return self.filter_by_symbol_since_limit(result, market['symbol'], since, limit)
1218
1218
 
1219
- def create_deposit_address(self, code: str, params={}):
1219
+ def create_deposit_address(self, code: str, params={}) -> DepositAddress:
1220
1220
  """
1221
1221
 
1222
1222
  https://yobit.net/en/api
@@ -1236,6 +1236,7 @@ class yobit(Exchange, ImplicitAPI):
1236
1236
  'currency': code,
1237
1237
  'address': address,
1238
1238
  'tag': None,
1239
+ 'network': None,
1239
1240
  'info': response['info'],
1240
1241
  }
1241
1242
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: ccxt
3
- Version: 4.4.70
3
+ Version: 4.4.72
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
@@ -49,9 +49,9 @@ Requires-Dist: mypy==1.6.1; extra == "type"
49
49
 
50
50
  # CCXT – CryptoCurrency eXchange Trading Library
51
51
 
52
- [![NPM Downloads](https://img.shields.io/npm/dy/ccxt.svg)](https://www.npmjs.com/package/ccxt) [![npm](https://img.shields.io/npm/v/ccxt.svg)](https://npmjs.com/package/ccxt) [![PyPI](https://img.shields.io/pypi/v/ccxt.svg)](https://pypi.python.org/pypi/ccxt) [![NuGet version](https://img.shields.io/nuget/v/ccxt)](https://www.nuget.org/packages/ccxt) [![GoDoc](https://pkg.go.dev/badge/github.com/ccxt/ccxt/go/v4?utm_source=godoc)](https://godoc.org/github.com/ccxt/ccxt/go/v4) [![Discord](https://img.shields.io/discord/690203284119617602?logo=discord&logoColor=white)](https://discord.gg/ccxt) [![Supported Exchanges](https://img.shields.io/badge/exchanges-111-blue.svg)](https://github.com/ccxt/ccxt/wiki/Exchange-Markets) [![Follow CCXT at x.com](https://img.shields.io/twitter/follow/ccxt_official.svg?style=social&label=CCXT)](https://x.com/ccxt_official)
52
+ [![NPM Downloads](https://img.shields.io/npm/dy/ccxt.svg)](https://www.npmjs.com/package/ccxt) [![npm](https://img.shields.io/npm/v/ccxt.svg)](https://npmjs.com/package/ccxt) [![PyPI](https://img.shields.io/pypi/v/ccxt.svg)](https://pypi.python.org/pypi/ccxt) [![NuGet version](https://img.shields.io/nuget/v/ccxt)](https://www.nuget.org/packages/ccxt) [![GoDoc](https://pkg.go.dev/badge/github.com/ccxt/ccxt/go/v4?utm_source=godoc)](https://godoc.org/github.com/ccxt/ccxt/go/v4) [![Discord](https://img.shields.io/discord/690203284119617602?logo=discord&logoColor=white)](https://discord.gg/ccxt) [![Supported Exchanges](https://img.shields.io/badge/exchanges-110-blue.svg)](https://github.com/ccxt/ccxt/wiki/Exchange-Markets) [![Follow CCXT at x.com](https://img.shields.io/twitter/follow/ccxt_official.svg?style=social&label=CCXT)](https://x.com/ccxt_official)
53
53
 
54
- A JavaScript / Python / PHP / C# / Go library for cryptocurrency trading and e-commerce with support for many bitcoin/ether/altcoin exchange markets and merchant APIs.
54
+ A `JavaScript` / `Python` / `PHP` / `C#` / `Go` library for cryptocurrency trading and e-commerce with support for many bitcoin/ether/altcoin exchange markets and merchant APIs.
55
55
 
56
56
  ### [Install](#install) · [Usage](#usage) · [Manual](https://github.com/ccxt/ccxt/wiki) · [FAQ](https://github.com/ccxt/ccxt/wiki/FAQ) · [Examples](https://github.com/ccxt/ccxt/tree/master/examples) · [Contributing](https://github.com/ccxt/ccxt/blob/master/CONTRIBUTING.md) · [Social](#social)
57
57
 
@@ -70,9 +70,6 @@ Current feature list:
70
70
 
71
71
  ## Sponsored Promotion
72
72
 
73
- [![Gate-3rd-Trading-Carnival](https://github.com/user-attachments/assets/6cbb4055-97a8-4985-8c55-0056b4a8612c)](https://www.gate.io/activities/ccxt-trading-competition)
74
-
75
-
76
73
  ## See Also
77
74
 
78
75
  - <sub>[![TabTrader](https://user-images.githubusercontent.com/1294454/66755907-9c3e8880-eea1-11e9-846e-0bff349ceb87.png)](https://tab-trader.com/?utm_source=ccxt)</sub> **[TabTrader](https://tab-trader.com/?utm_source=ccxt)** – trading on all exchanges in one app. Available on **[Android](https://play.google.com/store/apps/details?id=com.tabtrader.android&referrer=utm_source%3Dccxt)** and **[iOS](https://itunes.apple.com/app/apple-store/id1095716562?mt=8)**!
@@ -278,13 +275,13 @@ console.log(version, Object.keys(exchanges));
278
275
 
279
276
  All-in-one browser bundle (dependencies included), served from a CDN of your choice:
280
277
 
281
- * jsDelivr: https://cdn.jsdelivr.net/npm/ccxt@4.4.70/dist/ccxt.browser.min.js
282
- * unpkg: https://unpkg.com/ccxt@4.4.70/dist/ccxt.browser.min.js
278
+ * jsDelivr: https://cdn.jsdelivr.net/npm/ccxt@4.4.72/dist/ccxt.browser.min.js
279
+ * unpkg: https://unpkg.com/ccxt@4.4.72/dist/ccxt.browser.min.js
283
280
 
284
281
  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.
285
282
 
286
283
  ```HTML
287
- <script type="text/javascript" src="https://cdn.jsdelivr.net/npm/ccxt@4.4.70/dist/ccxt.browser.min.js"></script>
284
+ <script type="text/javascript" src="https://cdn.jsdelivr.net/npm/ccxt@4.4.72/dist/ccxt.browser.min.js"></script>
288
285
  ```
289
286
 
290
287
  Creates a global `ccxt` object: