ccxt 4.2.88__py2.py3-none-any.whl → 4.2.89__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.

Potentially problematic release.


This version of ccxt might be problematic. Click here for more details.

Files changed (150) hide show
  1. ccxt/__init__.py +1 -1
  2. ccxt/ascendex.py +5 -3
  3. ccxt/async_support/__init__.py +1 -1
  4. ccxt/async_support/ascendex.py +5 -3
  5. ccxt/async_support/base/exchange.py +3 -2
  6. ccxt/async_support/bigone.py +2 -2
  7. ccxt/async_support/binance.py +7 -5
  8. ccxt/async_support/bingx.py +2 -2
  9. ccxt/async_support/bit2c.py +2 -2
  10. ccxt/async_support/bitbank.py +2 -2
  11. ccxt/async_support/bitfinex.py +2 -2
  12. ccxt/async_support/bitfinex2.py +3 -3
  13. ccxt/async_support/bitflyer.py +4 -2
  14. ccxt/async_support/bitget.py +10 -5
  15. ccxt/async_support/bitmart.py +6 -4
  16. ccxt/async_support/bitmex.py +2 -2
  17. ccxt/async_support/bitopro.py +3 -3
  18. ccxt/async_support/bitrue.py +2 -2
  19. ccxt/async_support/bitso.py +2 -2
  20. ccxt/async_support/bitstamp.py +89 -97
  21. ccxt/async_support/bitteam.py +2 -2
  22. ccxt/async_support/bitvavo.py +3 -3
  23. ccxt/async_support/bl3p.py +2 -2
  24. ccxt/async_support/blockchaincom.py +2 -2
  25. ccxt/async_support/blofin.py +4 -2
  26. ccxt/async_support/bybit.py +7 -5
  27. ccxt/async_support/cex.py +3 -3
  28. ccxt/async_support/coinbase.py +2 -2
  29. ccxt/async_support/coinbaseinternational.py +2 -2
  30. ccxt/async_support/coinbasepro.py +3 -3
  31. ccxt/async_support/coincheck.py +2 -2
  32. ccxt/async_support/coinex.py +5 -5
  33. ccxt/async_support/coinlist.py +3 -3
  34. ccxt/async_support/coinmate.py +2 -2
  35. ccxt/async_support/coinmetro.py +2 -2
  36. ccxt/async_support/coinone.py +2 -2
  37. ccxt/async_support/coinsph.py +6 -4
  38. ccxt/async_support/currencycom.py +3 -3
  39. ccxt/async_support/delta.py +2 -2
  40. ccxt/async_support/deribit.py +3 -3
  41. ccxt/async_support/digifinex.py +6 -4
  42. ccxt/async_support/exmo.py +3 -3
  43. ccxt/async_support/gate.py +6 -4
  44. ccxt/async_support/gemini.py +3 -3
  45. ccxt/async_support/hitbtc.py +7 -5
  46. ccxt/async_support/hollaex.py +3 -3
  47. ccxt/async_support/htx.py +6 -4
  48. ccxt/async_support/huobijp.py +2 -2
  49. ccxt/async_support/hyperliquid.py +2 -2
  50. ccxt/async_support/idex.py +3 -3
  51. ccxt/async_support/independentreserve.py +2 -2
  52. ccxt/async_support/kraken.py +3 -3
  53. ccxt/async_support/kucoin.py +42 -18
  54. ccxt/async_support/kuna.py +2 -2
  55. ccxt/async_support/latoken.py +7 -3
  56. ccxt/async_support/lbank.py +7 -5
  57. ccxt/async_support/luno.py +4 -2
  58. ccxt/async_support/lykke.py +2 -2
  59. ccxt/async_support/mexc.py +56 -9
  60. ccxt/async_support/ndax.py +2 -2
  61. ccxt/async_support/oceanex.py +2 -2
  62. ccxt/async_support/okcoin.py +2 -2
  63. ccxt/async_support/okx.py +6 -4
  64. ccxt/async_support/onetrading.py +3 -3
  65. ccxt/async_support/phemex.py +2 -2
  66. ccxt/async_support/poloniex.py +3 -3
  67. ccxt/async_support/probit.py +2 -2
  68. ccxt/async_support/timex.py +6 -4
  69. ccxt/async_support/upbit.py +2 -2
  70. ccxt/async_support/wazirx.py +2 -2
  71. ccxt/async_support/whitebit.py +3 -3
  72. ccxt/async_support/woo.py +3 -3
  73. ccxt/async_support/yobit.py +2 -2
  74. ccxt/base/exchange.py +14 -7
  75. ccxt/base/types.py +32 -0
  76. ccxt/bigone.py +2 -2
  77. ccxt/binance.py +7 -5
  78. ccxt/bingx.py +2 -2
  79. ccxt/bit2c.py +2 -2
  80. ccxt/bitbank.py +2 -2
  81. ccxt/bitfinex.py +2 -2
  82. ccxt/bitfinex2.py +3 -3
  83. ccxt/bitflyer.py +4 -2
  84. ccxt/bitget.py +10 -5
  85. ccxt/bitmart.py +6 -4
  86. ccxt/bitmex.py +2 -2
  87. ccxt/bitopro.py +3 -3
  88. ccxt/bitrue.py +2 -2
  89. ccxt/bitso.py +2 -2
  90. ccxt/bitstamp.py +89 -97
  91. ccxt/bitteam.py +2 -2
  92. ccxt/bitvavo.py +3 -3
  93. ccxt/bl3p.py +2 -2
  94. ccxt/blockchaincom.py +2 -2
  95. ccxt/blofin.py +4 -2
  96. ccxt/bybit.py +7 -5
  97. ccxt/cex.py +3 -3
  98. ccxt/coinbase.py +2 -2
  99. ccxt/coinbaseinternational.py +2 -2
  100. ccxt/coinbasepro.py +3 -3
  101. ccxt/coincheck.py +2 -2
  102. ccxt/coinex.py +5 -5
  103. ccxt/coinlist.py +3 -3
  104. ccxt/coinmate.py +2 -2
  105. ccxt/coinmetro.py +2 -2
  106. ccxt/coinone.py +2 -2
  107. ccxt/coinsph.py +6 -4
  108. ccxt/currencycom.py +3 -3
  109. ccxt/delta.py +2 -2
  110. ccxt/deribit.py +3 -3
  111. ccxt/digifinex.py +6 -4
  112. ccxt/exmo.py +3 -3
  113. ccxt/gate.py +6 -4
  114. ccxt/gemini.py +3 -3
  115. ccxt/hitbtc.py +7 -5
  116. ccxt/hollaex.py +3 -3
  117. ccxt/htx.py +6 -4
  118. ccxt/huobijp.py +2 -2
  119. ccxt/hyperliquid.py +2 -2
  120. ccxt/idex.py +3 -3
  121. ccxt/independentreserve.py +2 -2
  122. ccxt/kraken.py +3 -3
  123. ccxt/kucoin.py +42 -18
  124. ccxt/kuna.py +2 -2
  125. ccxt/latoken.py +7 -3
  126. ccxt/lbank.py +7 -5
  127. ccxt/luno.py +4 -2
  128. ccxt/lykke.py +2 -2
  129. ccxt/mexc.py +56 -9
  130. ccxt/ndax.py +2 -2
  131. ccxt/oceanex.py +2 -2
  132. ccxt/okcoin.py +2 -2
  133. ccxt/okx.py +6 -4
  134. ccxt/onetrading.py +3 -3
  135. ccxt/phemex.py +2 -2
  136. ccxt/poloniex.py +3 -3
  137. ccxt/pro/__init__.py +1 -1
  138. ccxt/pro/bitget.py +2 -0
  139. ccxt/pro/bitvavo.py +2 -2
  140. ccxt/probit.py +2 -2
  141. ccxt/timex.py +6 -4
  142. ccxt/upbit.py +2 -2
  143. ccxt/wazirx.py +2 -2
  144. ccxt/whitebit.py +3 -3
  145. ccxt/woo.py +3 -3
  146. ccxt/yobit.py +2 -2
  147. {ccxt-4.2.88.dist-info → ccxt-4.2.89.dist-info}/METADATA +4 -4
  148. {ccxt-4.2.88.dist-info → ccxt-4.2.89.dist-info}/RECORD +150 -150
  149. {ccxt-4.2.88.dist-info → ccxt-4.2.89.dist-info}/WHEEL +0 -0
  150. {ccxt-4.2.88.dist-info → ccxt-4.2.89.dist-info}/top_level.txt +0 -0
ccxt/coinone.py CHANGED
@@ -6,7 +6,7 @@
6
6
  from ccxt.base.exchange import Exchange
7
7
  from ccxt.abstract.coinone import ImplicitAPI
8
8
  import hashlib
9
- from ccxt.base.types import Balances, Int, Market, Num, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade
9
+ from ccxt.base.types import Balances, Currencies, Int, Market, Num, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade
10
10
  from typing import List
11
11
  from ccxt.base.errors import ExchangeError
12
12
  from ccxt.base.errors import ArgumentsRequired
@@ -205,7 +205,7 @@ class coinone(Exchange, ImplicitAPI):
205
205
  },
206
206
  })
207
207
 
208
- def fetch_currencies(self, params={}):
208
+ def fetch_currencies(self, params={}) -> Currencies:
209
209
  """
210
210
  fetches all available currencies on an exchange
211
211
  :see: https://docs.coinone.co.kr/reference/currencies
ccxt/coinsph.py CHANGED
@@ -6,7 +6,7 @@
6
6
  from ccxt.base.exchange import Exchange
7
7
  from ccxt.abstract.coinsph import ImplicitAPI
8
8
  import hashlib
9
- from ccxt.base.types import Balances, Currency, Int, Market, Num, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, Transaction
9
+ from ccxt.base.types import Balances, Currency, Int, Market, Num, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, TradingFeeInterface, TradingFees, Transaction
10
10
  from typing import List
11
11
  from ccxt.base.errors import ExchangeError
12
12
  from ccxt.base.errors import PermissionDenied
@@ -1421,7 +1421,7 @@ class coinsph(Exchange, ImplicitAPI):
1421
1421
  }
1422
1422
  return self.safe_string(statuses, status, status)
1423
1423
 
1424
- def fetch_trading_fee(self, symbol: str, params={}):
1424
+ def fetch_trading_fee(self, symbol: str, params={}) -> TradingFeeInterface:
1425
1425
  """
1426
1426
  fetch the trading fees for a market
1427
1427
  :see: https://coins-docs.github.io/rest-api/#trade-fee-user_data
@@ -1447,7 +1447,7 @@ class coinsph(Exchange, ImplicitAPI):
1447
1447
  tradingFee = self.safe_value(response, 0, {})
1448
1448
  return self.parse_trading_fee(tradingFee, market)
1449
1449
 
1450
- def fetch_trading_fees(self, params={}):
1450
+ def fetch_trading_fees(self, params={}) -> TradingFees:
1451
1451
  """
1452
1452
  fetch the trading fees for multiple markets
1453
1453
  :see: https://coins-docs.github.io/rest-api/#trade-fee-user_data
@@ -1477,7 +1477,7 @@ class coinsph(Exchange, ImplicitAPI):
1477
1477
  result[symbol] = fee
1478
1478
  return result
1479
1479
 
1480
- def parse_trading_fee(self, fee, market: Market = None):
1480
+ def parse_trading_fee(self, fee, market: Market = None) -> TradingFeeInterface:
1481
1481
  #
1482
1482
  # {
1483
1483
  # "symbol": "ETHUSDT",
@@ -1493,6 +1493,8 @@ class coinsph(Exchange, ImplicitAPI):
1493
1493
  'symbol': symbol,
1494
1494
  'maker': self.safe_number(fee, 'makerCommission'),
1495
1495
  'taker': self.safe_number(fee, 'takerCommission'),
1496
+ 'percentage': None,
1497
+ 'tierBased': None,
1496
1498
  }
1497
1499
 
1498
1500
  def withdraw(self, code: str, amount: float, address, tag=None, params={}):
ccxt/currencycom.py CHANGED
@@ -6,7 +6,7 @@
6
6
  from ccxt.base.exchange import Exchange
7
7
  from ccxt.abstract.currencycom import ImplicitAPI
8
8
  import hashlib
9
- from ccxt.base.types import Account, Balances, Currency, Int, Leverage, Market, Num, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, Transaction
9
+ from ccxt.base.types import Account, Balances, Currencies, Currency, Int, Leverage, Market, Num, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, TradingFees, Transaction
10
10
  from typing import List
11
11
  from ccxt.base.errors import ExchangeError
12
12
  from ccxt.base.errors import ArgumentsRequired
@@ -326,7 +326,7 @@ class currencycom(Exchange, ImplicitAPI):
326
326
  #
327
327
  return self.safe_integer(response, 'serverTime')
328
328
 
329
- def fetch_currencies(self, params={}):
329
+ def fetch_currencies(self, params={}) -> Currencies:
330
330
  """
331
331
  fetches all available currencies on an exchange
332
332
  :see: https://apitradedoc.currency.com/swagger-ui.html#/rest-api/getCurrenciesUsingGET
@@ -628,7 +628,7 @@ class currencycom(Exchange, ImplicitAPI):
628
628
  })
629
629
  return result
630
630
 
631
- def fetch_trading_fees(self, params={}):
631
+ def fetch_trading_fees(self, params={}) -> TradingFees:
632
632
  """
633
633
  fetch the trading fees for multiple markets
634
634
  :see: https://apitradedoc.currency.com/swagger-ui.html#/rest-api/accountUsingGET
ccxt/delta.py CHANGED
@@ -6,7 +6,7 @@
6
6
  from ccxt.base.exchange import Exchange
7
7
  from ccxt.abstract.delta import ImplicitAPI
8
8
  import hashlib
9
- from ccxt.base.types import Balances, Currency, Greeks, Int, Leverage, MarginMode, MarginModification, Market, MarketInterface, Num, Option, Order, OrderBook, OrderSide, OrderType, Position, Str, Strings, Ticker, Tickers, Trade
9
+ from ccxt.base.types import Balances, Currencies, Currency, Greeks, Int, Leverage, MarginMode, MarginModification, Market, MarketInterface, Num, Option, Order, OrderBook, OrderSide, OrderType, Position, Str, Strings, Ticker, Tickers, Trade
10
10
  from typing import List
11
11
  from ccxt.base.errors import ExchangeError
12
12
  from ccxt.base.errors import ArgumentsRequired
@@ -409,7 +409,7 @@ class delta(Exchange, ImplicitAPI):
409
409
  'info': response,
410
410
  }
411
411
 
412
- def fetch_currencies(self, params={}):
412
+ def fetch_currencies(self, params={}) -> Currencies:
413
413
  """
414
414
  fetches all available currencies on an exchange
415
415
  :see: https://docs.delta.exchange/#get-list-of-all-assets
ccxt/deribit.py CHANGED
@@ -6,7 +6,7 @@
6
6
  from ccxt.base.exchange import Exchange
7
7
  from ccxt.abstract.deribit import ImplicitAPI
8
8
  import hashlib
9
- from ccxt.base.types import Account, Balances, Currency, Greeks, Int, Market, MarketInterface, Num, Option, OptionChain, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, Transaction, TransferEntry
9
+ from ccxt.base.types import Account, Balances, Currencies, Currency, Greeks, Int, Market, MarketInterface, Num, Option, OptionChain, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, 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 PermissionDenied
@@ -518,7 +518,7 @@ class deribit(Exchange, ImplicitAPI):
518
518
  #
519
519
  return self.safe_integer(response, 'result')
520
520
 
521
- def fetch_currencies(self, params={}):
521
+ def fetch_currencies(self, params={}) -> Currencies:
522
522
  """
523
523
  fetches all available currencies on an exchange
524
524
  :see: https://docs.deribit.com/#public-get_currencies
@@ -1435,7 +1435,7 @@ class deribit(Exchange, ImplicitAPI):
1435
1435
  trades = self.safe_list(result, 'trades', [])
1436
1436
  return self.parse_trades(trades, market, since, limit)
1437
1437
 
1438
- def fetch_trading_fees(self, params={}):
1438
+ def fetch_trading_fees(self, params={}) -> TradingFees:
1439
1439
  """
1440
1440
  fetch the trading fees for multiple markets
1441
1441
  :see: https://docs.deribit.com/#private-get_account_summary
ccxt/digifinex.py CHANGED
@@ -7,7 +7,7 @@ from ccxt.base.exchange import Exchange
7
7
  from ccxt.abstract.digifinex import ImplicitAPI
8
8
  import hashlib
9
9
  import json
10
- from ccxt.base.types import Balances, Currency, Int, MarginModification, Market, Num, Order, OrderBook, OrderRequest, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, Transaction, TransferEntry
10
+ from ccxt.base.types import Balances, Currencies, Currency, Int, MarginModification, Market, Num, Order, OrderBook, OrderRequest, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, TradingFeeInterface, Transaction, TransferEntry
11
11
  from typing import List
12
12
  from ccxt.base.errors import ExchangeError
13
13
  from ccxt.base.errors import PermissionDenied
@@ -365,7 +365,7 @@ class digifinex(Exchange, ImplicitAPI):
365
365
  },
366
366
  })
367
367
 
368
- def fetch_currencies(self, params={}):
368
+ def fetch_currencies(self, params={}) -> Currencies:
369
369
  """
370
370
  fetches all available currencies on an exchange
371
371
  :param dict [params]: extra parameters specific to the exchange API endpoint
@@ -3075,7 +3075,7 @@ class digifinex(Exchange, ImplicitAPI):
3075
3075
  sorted = self.sort_by(rates, 'timestamp')
3076
3076
  return self.filter_by_symbol_since_limit(sorted, symbol, since, limit)
3077
3077
 
3078
- def fetch_trading_fee(self, symbol: str, params={}):
3078
+ def fetch_trading_fee(self, symbol: str, params={}) -> TradingFeeInterface:
3079
3079
  """
3080
3080
  fetch the trading fees for a market
3081
3081
  :see: https://docs.digifinex.com/en-ww/swap/v2/rest.html#tradingfee
@@ -3104,7 +3104,7 @@ class digifinex(Exchange, ImplicitAPI):
3104
3104
  data = self.safe_value(response, 'data', {})
3105
3105
  return self.parse_trading_fee(data, market)
3106
3106
 
3107
- def parse_trading_fee(self, fee, market: Market = None):
3107
+ def parse_trading_fee(self, fee, market: Market = None) -> TradingFeeInterface:
3108
3108
  #
3109
3109
  # {
3110
3110
  # "instrument_id": "BTCUSDTPERP",
@@ -3119,6 +3119,8 @@ class digifinex(Exchange, ImplicitAPI):
3119
3119
  'symbol': symbol,
3120
3120
  'maker': self.safe_number(fee, 'maker_fee_rate'),
3121
3121
  'taker': self.safe_number(fee, 'taker_fee_rate'),
3122
+ 'percentage': None,
3123
+ 'tierBased': None,
3122
3124
  }
3123
3125
 
3124
3126
  def fetch_positions(self, symbols: Strings = None, params={}):
ccxt/exmo.py CHANGED
@@ -6,7 +6,7 @@
6
6
  from ccxt.base.exchange import Exchange
7
7
  from ccxt.abstract.exmo import ImplicitAPI
8
8
  import hashlib
9
- from ccxt.base.types import Balances, Currency, Int, MarginModification, Market, Num, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, Transaction
9
+ from ccxt.base.types import Balances, Currencies, Currency, Int, MarginModification, Market, Num, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, TradingFees, Transaction
10
10
  from typing import List
11
11
  from ccxt.base.errors import ExchangeError
12
12
  from ccxt.base.errors import PermissionDenied
@@ -303,7 +303,7 @@ class exmo(Exchange, ImplicitAPI):
303
303
  """
304
304
  return self.modify_margin_helper(symbol, amount, 'add', params)
305
305
 
306
- def fetch_trading_fees(self, params={}):
306
+ def fetch_trading_fees(self, params={}) -> TradingFees:
307
307
  """
308
308
  fetch the trading fees for multiple markets
309
309
  :see: https://documenter.getpostman.com/view/10287440/SzYXWKPi#90927062-256c-4b03-900f-2b99131f9a54
@@ -573,7 +573,7 @@ class exmo(Exchange, ImplicitAPI):
573
573
  }
574
574
  return self.assign_default_deposit_withdraw_fees(result)
575
575
 
576
- def fetch_currencies(self, params={}):
576
+ def fetch_currencies(self, params={}) -> Currencies:
577
577
  """
578
578
  fetches all available currencies on an exchange
579
579
  :see: https://documenter.getpostman.com/view/10287440/SzYXWKPi#7cdf0ca8-9ff6-4cf3-aa33-bcec83155c49
ccxt/gate.py CHANGED
@@ -6,7 +6,7 @@
6
6
  from ccxt.base.exchange import Exchange
7
7
  from ccxt.abstract.gate import ImplicitAPI
8
8
  import hashlib
9
- from ccxt.base.types import Balances, Currency, FundingHistory, Greeks, Int, Leverage, Leverages, MarginModification, Market, MarketInterface, Num, Option, OptionChain, Order, OrderBook, OrderRequest, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, Transaction, TransferEntry
9
+ from ccxt.base.types import Balances, Currencies, Currency, FundingHistory, Greeks, Int, Leverage, Leverages, MarginModification, Market, MarketInterface, Num, Option, OptionChain, Order, OrderBook, OrderRequest, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, TradingFeeInterface, TradingFees, Transaction, TransferEntry
10
10
  from typing import List
11
11
  from ccxt.base.errors import ExchangeError
12
12
  from ccxt.base.errors import PermissionDenied
@@ -1520,7 +1520,7 @@ class gate(Exchange, ImplicitAPI):
1520
1520
  defaultSettle = ['usdt'] if (type == 'swap') else ['btc']
1521
1521
  return self.safe_value(fetchMarketsContractOptions, 'settlementCurrencies', defaultSettle)
1522
1522
 
1523
- def fetch_currencies(self, params={}):
1523
+ def fetch_currencies(self, params={}) -> Currencies:
1524
1524
  """
1525
1525
  fetches all available currencies on an exchange
1526
1526
  :see: https://www.gate.io/docs/developers/apiv4/en/#list-all-currencies-details
@@ -1928,7 +1928,7 @@ class gate(Exchange, ImplicitAPI):
1928
1928
  'network': network,
1929
1929
  }
1930
1930
 
1931
- def fetch_trading_fee(self, symbol: str, params={}):
1931
+ def fetch_trading_fee(self, symbol: str, params={}) -> TradingFeeInterface:
1932
1932
  """
1933
1933
  fetch the trading fees for a market
1934
1934
  :see: https://www.gate.io/docs/developers/apiv4/en/#retrieve-personal-trading-fee
@@ -1958,7 +1958,7 @@ class gate(Exchange, ImplicitAPI):
1958
1958
  #
1959
1959
  return self.parse_trading_fee(response, market)
1960
1960
 
1961
- def fetch_trading_fees(self, params={}):
1961
+ def fetch_trading_fees(self, params={}) -> TradingFees:
1962
1962
  """
1963
1963
  fetch the trading fees for multiple markets
1964
1964
  :see: https://www.gate.io/docs/developers/apiv4/en/#retrieve-personal-trading-fee
@@ -2017,6 +2017,8 @@ class gate(Exchange, ImplicitAPI):
2017
2017
  'symbol': self.safe_string(market, 'symbol'),
2018
2018
  'maker': self.safe_number(info, makerKey),
2019
2019
  'taker': self.safe_number(info, takerKey),
2020
+ 'percentage': None,
2021
+ 'tierBased': None,
2020
2022
  }
2021
2023
 
2022
2024
  def fetch_transaction_fees(self, codes: List[str] = None, params={}):
ccxt/gemini.py CHANGED
@@ -6,7 +6,7 @@
6
6
  from ccxt.base.exchange import Exchange
7
7
  from ccxt.abstract.gemini import ImplicitAPI
8
8
  import hashlib
9
- from ccxt.base.types import Balances, Currency, Int, Market, Num, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, Transaction
9
+ from ccxt.base.types import Balances, Currencies, Currency, Int, Market, Num, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, TradingFees, Transaction
10
10
  from typing import List
11
11
  from ccxt.base.errors import ExchangeError
12
12
  from ccxt.base.errors import PermissionDenied
@@ -302,7 +302,7 @@ class gemini(Exchange, ImplicitAPI):
302
302
  },
303
303
  })
304
304
 
305
- def fetch_currencies(self, params={}):
305
+ def fetch_currencies(self, params={}) -> Currencies:
306
306
  """
307
307
  fetches all available currencies on an exchange
308
308
  :param dict [params]: extra parameters specific to the endpoint
@@ -1048,7 +1048,7 @@ class gemini(Exchange, ImplicitAPI):
1048
1048
  result[code] = account
1049
1049
  return self.safe_balance(result)
1050
1050
 
1051
- def fetch_trading_fees(self, params={}):
1051
+ def fetch_trading_fees(self, params={}) -> TradingFees:
1052
1052
  """
1053
1053
  fetch the trading fees for multiple markets
1054
1054
  :see: https://docs.gemini.com/rest-api/#get-notional-volume
ccxt/hitbtc.py CHANGED
@@ -6,7 +6,7 @@
6
6
  from ccxt.base.exchange import Exchange
7
7
  from ccxt.abstract.hitbtc import ImplicitAPI
8
8
  import hashlib
9
- from ccxt.base.types import Balances, Currency, Int, Leverage, MarginMode, MarginModes, MarginModification, Market, Num, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, Transaction, TransferEntry
9
+ from ccxt.base.types import Balances, Currencies, Currency, Int, Leverage, MarginMode, MarginModes, MarginModification, Market, Num, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, TradingFeeInterface, TradingFees, Transaction, TransferEntry
10
10
  from typing import List
11
11
  from ccxt.base.errors import ExchangeError
12
12
  from ccxt.base.errors import PermissionDenied
@@ -802,7 +802,7 @@ class hitbtc(Exchange, ImplicitAPI):
802
802
  })
803
803
  return result
804
804
 
805
- def fetch_currencies(self, params={}):
805
+ def fetch_currencies(self, params={}) -> Currencies:
806
806
  """
807
807
  fetches all available currencies on an exchange
808
808
  :see: https://api.hitbtc.com/#currencies
@@ -1547,7 +1547,7 @@ class hitbtc(Exchange, ImplicitAPI):
1547
1547
  timestamp = self.parse8601(self.safe_string(response, 'timestamp'))
1548
1548
  return self.parse_order_book(response, symbol, timestamp, 'bid', 'ask')
1549
1549
 
1550
- def parse_trading_fee(self, fee, market: Market = None):
1550
+ def parse_trading_fee(self, fee, market: Market = None) -> TradingFeeInterface:
1551
1551
  #
1552
1552
  # {
1553
1553
  # "symbol":"ARVUSDT", # returned from fetchTradingFees only
@@ -1564,9 +1564,11 @@ class hitbtc(Exchange, ImplicitAPI):
1564
1564
  'symbol': symbol,
1565
1565
  'taker': taker,
1566
1566
  'maker': maker,
1567
+ 'percentage': None,
1568
+ 'tierBased': None,
1567
1569
  }
1568
1570
 
1569
- def fetch_trading_fee(self, symbol: str, params={}):
1571
+ def fetch_trading_fee(self, symbol: str, params={}) -> TradingFeeInterface:
1570
1572
  """
1571
1573
  fetch the trading fees for a market
1572
1574
  :see: https://api.hitbtc.com/#get-trading-commission
@@ -1595,7 +1597,7 @@ class hitbtc(Exchange, ImplicitAPI):
1595
1597
  #
1596
1598
  return self.parse_trading_fee(response, market)
1597
1599
 
1598
- def fetch_trading_fees(self, params={}):
1600
+ def fetch_trading_fees(self, params={}) -> TradingFees:
1599
1601
  """
1600
1602
  fetch the trading fees for multiple markets
1601
1603
  :see: https://api.hitbtc.com/#get-all-trading-commissions
ccxt/hollaex.py CHANGED
@@ -6,7 +6,7 @@
6
6
  from ccxt.base.exchange import Exchange
7
7
  from ccxt.abstract.hollaex import ImplicitAPI
8
8
  import hashlib
9
- from ccxt.base.types import Balances, Currency, Int, Market, Num, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, Transaction
9
+ from ccxt.base.types import Balances, Currencies, Currency, Int, Market, Num, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, TradingFees, Transaction
10
10
  from typing import List
11
11
  from ccxt.base.errors import ArgumentsRequired
12
12
  from ccxt.base.errors import BadRequest
@@ -328,7 +328,7 @@ class hollaex(Exchange, ImplicitAPI):
328
328
  })
329
329
  return result
330
330
 
331
- def fetch_currencies(self, params={}):
331
+ def fetch_currencies(self, params={}) -> Currencies:
332
332
  """
333
333
  fetches all available currencies on an exchange
334
334
  :see: https://apidocs.hollaex.com/#constants
@@ -679,7 +679,7 @@ class hollaex(Exchange, ImplicitAPI):
679
679
  'fee': fee,
680
680
  }, market)
681
681
 
682
- def fetch_trading_fees(self, params={}):
682
+ def fetch_trading_fees(self, params={}) -> TradingFees:
683
683
  """
684
684
  fetch the trading fees for multiple markets
685
685
  :see: https://apidocs.hollaex.com/#tiers
ccxt/htx.py CHANGED
@@ -6,7 +6,7 @@
6
6
  from ccxt.base.exchange import Exchange
7
7
  from ccxt.abstract.htx import ImplicitAPI
8
8
  import hashlib
9
- from ccxt.base.types import Account, Balances, Currency, Int, Market, Num, Order, OrderBook, OrderRequest, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, Transaction, TransferEntry
9
+ from ccxt.base.types import Account, Balances, Currencies, Currency, Int, Market, Num, Order, OrderBook, OrderRequest, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, TradingFeeInterface, Transaction, TransferEntry
10
10
  from typing import List
11
11
  from ccxt.base.errors import ExchangeError
12
12
  from ccxt.base.errors import PermissionDenied
@@ -1485,7 +1485,7 @@ class htx(Exchange, ImplicitAPI):
1485
1485
  #
1486
1486
  return self.safe_integer_2(response, 'data', 'ts')
1487
1487
 
1488
- def parse_trading_fee(self, fee, market: Market = None):
1488
+ def parse_trading_fee(self, fee, market: Market = None) -> TradingFeeInterface:
1489
1489
  #
1490
1490
  # {
1491
1491
  # "symbol":"btcusdt",
@@ -1501,9 +1501,11 @@ class htx(Exchange, ImplicitAPI):
1501
1501
  'symbol': self.safe_symbol(marketId, market),
1502
1502
  'maker': self.safe_number(fee, 'actualMakerRate'),
1503
1503
  'taker': self.safe_number(fee, 'actualTakerRate'),
1504
+ 'percentage': None,
1505
+ 'tierBased': None,
1504
1506
  }
1505
1507
 
1506
- def fetch_trading_fee(self, symbol: str, params={}):
1508
+ def fetch_trading_fee(self, symbol: str, params={}) -> TradingFeeInterface:
1507
1509
  """
1508
1510
  fetch the trading fees for a market
1509
1511
  :param str symbol: unified market symbol
@@ -2986,7 +2988,7 @@ class htx(Exchange, ImplicitAPI):
2986
2988
  defaultAccount = self.safe_value(accounts, 0, {})
2987
2989
  return self.safe_string(defaultAccount, 'id')
2988
2990
 
2989
- def fetch_currencies(self, params={}):
2991
+ def fetch_currencies(self, params={}) -> Currencies:
2990
2992
  """
2991
2993
  fetches all available currencies on an exchange
2992
2994
  :param dict [params]: extra parameters specific to the exchange API endpoint
ccxt/huobijp.py CHANGED
@@ -6,7 +6,7 @@
6
6
  from ccxt.base.exchange import Exchange
7
7
  from ccxt.abstract.huobijp import ImplicitAPI
8
8
  import hashlib
9
- from ccxt.base.types import Account, Balances, Currency, Int, Market, Num, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, Transaction
9
+ from ccxt.base.types import Account, Balances, Currencies, Currency, Int, Market, Num, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, Transaction
10
10
  from typing import List
11
11
  from ccxt.base.errors import ExchangeError
12
12
  from ccxt.base.errors import PermissionDenied
@@ -954,7 +954,7 @@ class huobijp(Exchange, ImplicitAPI):
954
954
  response = self.privateGetAccountAccounts(params)
955
955
  return response['data']
956
956
 
957
- def fetch_currencies(self, params={}):
957
+ def fetch_currencies(self, params={}) -> Currencies:
958
958
  """
959
959
  fetches all available currencies on an exchange
960
960
  :param dict [params]: extra parameters specific to the exchange API endpoint
ccxt/hyperliquid.py CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
  from ccxt.base.exchange import Exchange
7
7
  from ccxt.abstract.hyperliquid import ImplicitAPI
8
- from ccxt.base.types import Balances, Int, MarginModification, Market, Num, Order, OrderBook, OrderRequest, OrderSide, OrderType, Str, Strings, Trade, TransferEntry
8
+ from ccxt.base.types import Balances, Currencies, Int, MarginModification, Market, Num, Order, OrderBook, OrderRequest, OrderSide, OrderType, Str, Strings, Trade, TransferEntry
9
9
  from typing import List
10
10
  from ccxt.base.errors import ExchangeError
11
11
  from ccxt.base.errors import ArgumentsRequired
@@ -207,7 +207,7 @@ class hyperliquid(Exchange, ImplicitAPI):
207
207
  super(hyperliquid, self).set_sandbox_mode(enabled)
208
208
  self.options['sandboxMode'] = enabled
209
209
 
210
- def fetch_currencies(self, params={}):
210
+ def fetch_currencies(self, params={}) -> Currencies:
211
211
  """
212
212
  fetches all available currencies on an exchange
213
213
  :see: https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/info-endpoint#retrieve-exchange-metadata
ccxt/idex.py CHANGED
@@ -6,7 +6,7 @@
6
6
  from ccxt.base.exchange import Exchange
7
7
  from ccxt.abstract.idex import ImplicitAPI
8
8
  import hashlib
9
- from ccxt.base.types import Balances, Currency, Int, Market, Num, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, Transaction
9
+ from ccxt.base.types import Balances, Currencies, Currency, Int, Market, Num, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, TradingFees, Transaction
10
10
  from typing import List
11
11
  from ccxt.base.errors import ExchangeError
12
12
  from ccxt.base.errors import BadRequest
@@ -609,7 +609,7 @@ class idex(Exchange, ImplicitAPI):
609
609
  'fee': fee,
610
610
  }, market)
611
611
 
612
- def fetch_trading_fees(self, params={}):
612
+ def fetch_trading_fees(self, params={}) -> TradingFees:
613
613
  """
614
614
  fetch the trading fees for multiple markets
615
615
  :see: https://api-docs-v3.idex.io/#get-api-account
@@ -712,7 +712,7 @@ class idex(Exchange, ImplicitAPI):
712
712
  descending = side == 'bids'
713
713
  return self.sort_by(result, 0, descending)
714
714
 
715
- def fetch_currencies(self, params={}):
715
+ def fetch_currencies(self, params={}) -> Currencies:
716
716
  """
717
717
  fetches all available currencies on an exchange
718
718
  :see: https://api-docs-v3.idex.io/#get-assets
@@ -6,7 +6,7 @@
6
6
  from ccxt.base.exchange import Exchange
7
7
  from ccxt.abstract.independentreserve import ImplicitAPI
8
8
  import hashlib
9
- from ccxt.base.types import Balances, Currency, Int, Market, Num, Order, OrderBook, OrderSide, OrderType, Str, Ticker, Trade
9
+ from ccxt.base.types import Balances, Currency, Int, Market, Num, Order, OrderBook, OrderSide, OrderType, Str, Ticker, Trade, TradingFees
10
10
  from typing import List
11
11
  from ccxt.base.decimal_to_precision import TICK_SIZE
12
12
  from ccxt.base.precise import Precise
@@ -586,7 +586,7 @@ class independentreserve(Exchange, ImplicitAPI):
586
586
  response = self.publicGetGetRecentTrades(self.extend(request, params))
587
587
  return self.parse_trades(response['Trades'], market, since, limit)
588
588
 
589
- def fetch_trading_fees(self, params={}):
589
+ def fetch_trading_fees(self, params={}) -> TradingFees:
590
590
  """
591
591
  fetch the trading fees for multiple markets
592
592
  :param dict [params]: extra parameters specific to the exchange API endpoint
ccxt/kraken.py CHANGED
@@ -6,7 +6,7 @@
6
6
  from ccxt.base.exchange import Exchange
7
7
  from ccxt.abstract.kraken import ImplicitAPI
8
8
  import hashlib
9
- from ccxt.base.types import Balances, Currency, IndexType, Int, Market, Num, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, Transaction, TransferEntry
9
+ from ccxt.base.types import Balances, Currencies, Currency, IndexType, Int, Market, Num, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, TradingFeeInterface, Transaction, TransferEntry
10
10
  from typing import List
11
11
  from ccxt.base.errors import ExchangeError
12
12
  from ccxt.base.errors import PermissionDenied
@@ -641,7 +641,7 @@ class kraken(Exchange, ImplicitAPI):
641
641
  result.append(self.extend(defaults, markets[i]))
642
642
  return result
643
643
 
644
- def fetch_currencies(self, params={}):
644
+ def fetch_currencies(self, params={}) -> Currencies:
645
645
  """
646
646
  fetches all available currencies on an exchange
647
647
  :see: https://docs.kraken.com/rest/#tag/Spot-Market-Data/operation/getAssetInfo
@@ -697,7 +697,7 @@ class kraken(Exchange, ImplicitAPI):
697
697
  }
698
698
  return result
699
699
 
700
- def fetch_trading_fee(self, symbol: str, params={}):
700
+ def fetch_trading_fee(self, symbol: str, params={}) -> TradingFeeInterface:
701
701
  """
702
702
  fetch the trading fees for a market
703
703
  :see: https://docs.kraken.com/rest/#tag/Account-Data/operation/getTradeVolume
ccxt/kucoin.py CHANGED
@@ -8,7 +8,7 @@ from ccxt.abstract.kucoin import ImplicitAPI
8
8
  import hashlib
9
9
  import math
10
10
  import json
11
- from ccxt.base.types import Account, Balances, Currency, Int, Market, Num, Order, OrderBook, OrderRequest, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, Transaction, TransferEntry
11
+ from ccxt.base.types import Account, Balances, Currencies, Currency, Int, Market, Num, Order, OrderBook, OrderRequest, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, TradingFeeInterface, Transaction, TransferEntry
12
12
  from typing import List
13
13
  from ccxt.base.errors import ExchangeError
14
14
  from ccxt.base.errors import PermissionDenied
@@ -1130,7 +1130,7 @@ class kucoin(Exchange, ImplicitAPI):
1130
1130
  })
1131
1131
  return result
1132
1132
 
1133
- def fetch_currencies(self, params={}):
1133
+ def fetch_currencies(self, params={}) -> Currencies:
1134
1134
  """
1135
1135
  fetches all available currencies on an exchange
1136
1136
  :see: https://docs.kucoin.com/#get-currencies
@@ -2960,7 +2960,7 @@ class kucoin(Exchange, ImplicitAPI):
2960
2960
  'fee': fee,
2961
2961
  }, market)
2962
2962
 
2963
- def fetch_trading_fee(self, symbol: str, params={}):
2963
+ def fetch_trading_fee(self, symbol: str, params={}) -> TradingFeeInterface:
2964
2964
  """
2965
2965
  fetch the trading fees for a market
2966
2966
  :see: https://docs.kucoin.com/#actual-fee-rate-of-the-trading-pair
@@ -3314,9 +3314,9 @@ class kucoin(Exchange, ImplicitAPI):
3314
3314
 
3315
3315
  def parse_balance_helper(self, entry):
3316
3316
  account = self.account()
3317
- account['used'] = self.safe_string(entry, 'holdBalance')
3318
- account['free'] = self.safe_string(entry, 'availableBalance')
3319
- account['total'] = self.safe_string(entry, 'totalBalance')
3317
+ account['used'] = self.safe_string_2(entry, 'holdBalance', 'hold')
3318
+ account['free'] = self.safe_string_2(entry, 'availableBalance', 'available')
3319
+ account['total'] = self.safe_string_2(entry, 'totalBalance', 'total')
3320
3320
  debt = self.safe_string(entry, 'liability')
3321
3321
  interest = self.safe_string(entry, 'interest')
3322
3322
  account['debt'] = Precise.string_add(debt, interest)
@@ -3365,7 +3365,7 @@ class kucoin(Exchange, ImplicitAPI):
3365
3365
  request['type'] = type
3366
3366
  response = self.privateGetAccounts(self.extend(request, query))
3367
3367
  #
3368
- # Spot and Cross
3368
+ # Spot
3369
3369
  #
3370
3370
  # {
3371
3371
  # "code": "200000",
@@ -3381,35 +3381,59 @@ class kucoin(Exchange, ImplicitAPI):
3381
3381
  # ]
3382
3382
  # }
3383
3383
  #
3384
+ # Cross
3385
+ #
3386
+ # {
3387
+ # "code": "200000",
3388
+ # "data": {
3389
+ # "debtRatio": "0",
3390
+ # "accounts": [
3391
+ # {
3392
+ # "currency": "USDT",
3393
+ # "totalBalance": "5",
3394
+ # "availableBalance": "5",
3395
+ # "holdBalance": "0",
3396
+ # "liability": "0",
3397
+ # "maxBorrowSize": "20"
3398
+ # },
3399
+ # ]
3400
+ # }
3401
+ # }
3402
+ #
3384
3403
  # Isolated
3385
3404
  #
3386
3405
  # {
3387
3406
  # "code": "200000",
3388
3407
  # "data": {
3389
- # "totalConversionBalance": "0",
3390
- # "liabilityConversionBalance": "0",
3408
+ # "totalAssetOfQuoteCurrency": "0",
3409
+ # "totalLiabilityOfQuoteCurrency": "0",
3410
+ # "timestamp": 1712085661155,
3391
3411
  # "assets": [
3392
3412
  # {
3393
3413
  # "symbol": "MANA-USDT",
3394
- # "status": "CLEAR",
3414
+ # "status": "EFFECTIVE",
3395
3415
  # "debtRatio": "0",
3396
3416
  # "baseAsset": {
3397
3417
  # "currency": "MANA",
3398
- # "totalBalance": "0",
3399
- # "holdBalance": "0",
3400
- # "availableBalance": "0",
3418
+ # "borrowEnabled": True,
3419
+ # "transferInEnabled": True,
3420
+ # "total": "0",
3421
+ # "hold": "0",
3422
+ # "available": "0",
3401
3423
  # "liability": "0",
3402
3424
  # "interest": "0",
3403
- # "borrowableAmount": "0"
3425
+ # "maxBorrowSize": "0"
3404
3426
  # },
3405
3427
  # "quoteAsset": {
3406
3428
  # "currency": "USDT",
3407
- # "totalBalance": "0",
3408
- # "holdBalance": "0",
3409
- # "availableBalance": "0",
3429
+ # "borrowEnabled": True,
3430
+ # "transferInEnabled": True,
3431
+ # "total": "0",
3432
+ # "hold": "0",
3433
+ # "available": "0",
3410
3434
  # "liability": "0",
3411
3435
  # "interest": "0",
3412
- # "borrowableAmount": "0"
3436
+ # "maxBorrowSize": "0"
3413
3437
  # }
3414
3438
  # },
3415
3439
  # ...
ccxt/kuna.py CHANGED
@@ -7,7 +7,7 @@ from ccxt.base.exchange import Exchange
7
7
  from ccxt.abstract.kuna import ImplicitAPI
8
8
  import hashlib
9
9
  import json
10
- from ccxt.base.types import Balances, Currency, Int, Market, Num, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, Transaction
10
+ from ccxt.base.types import Balances, Currencies, Currency, Int, Market, Num, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, Transaction
11
11
  from typing import List
12
12
  from ccxt.base.errors import ExchangeError
13
13
  from ccxt.base.errors import ArgumentsRequired
@@ -425,7 +425,7 @@ class kuna(Exchange, ImplicitAPI):
425
425
  data = self.safe_value(response, 'data', {})
426
426
  return self.safe_integer(data, 'timestamp_miliseconds')
427
427
 
428
- def fetch_currencies(self, params={}):
428
+ def fetch_currencies(self, params={}) -> Currencies:
429
429
  """
430
430
  fetches all available currencies on an exchange
431
431
  :see: https://docs.kuna.io/docs/get-information-about-available-currencies