ccxt 4.2.87__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 (154) 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 +17 -11
  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 +27 -21
  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/cryptocom.py +1 -1
  39. ccxt/async_support/currencycom.py +3 -3
  40. ccxt/async_support/delta.py +2 -2
  41. ccxt/async_support/deribit.py +3 -3
  42. ccxt/async_support/digifinex.py +6 -4
  43. ccxt/async_support/exmo.py +3 -3
  44. ccxt/async_support/gate.py +20 -18
  45. ccxt/async_support/gemini.py +3 -3
  46. ccxt/async_support/hitbtc.py +7 -5
  47. ccxt/async_support/hollaex.py +3 -3
  48. ccxt/async_support/htx.py +6 -4
  49. ccxt/async_support/huobijp.py +2 -2
  50. ccxt/async_support/hyperliquid.py +2 -2
  51. ccxt/async_support/idex.py +3 -3
  52. ccxt/async_support/independentreserve.py +2 -2
  53. ccxt/async_support/kraken.py +3 -3
  54. ccxt/async_support/krakenfutures.py +2 -1
  55. ccxt/async_support/kucoin.py +49 -22
  56. ccxt/async_support/kuna.py +2 -2
  57. ccxt/async_support/latoken.py +7 -3
  58. ccxt/async_support/lbank.py +7 -5
  59. ccxt/async_support/luno.py +4 -2
  60. ccxt/async_support/lykke.py +2 -2
  61. ccxt/async_support/mexc.py +57 -10
  62. ccxt/async_support/ndax.py +2 -2
  63. ccxt/async_support/oceanex.py +2 -2
  64. ccxt/async_support/okcoin.py +2 -2
  65. ccxt/async_support/okx.py +6 -4
  66. ccxt/async_support/onetrading.py +3 -3
  67. ccxt/async_support/phemex.py +2 -2
  68. ccxt/async_support/poloniex.py +3 -3
  69. ccxt/async_support/probit.py +2 -2
  70. ccxt/async_support/timex.py +6 -4
  71. ccxt/async_support/upbit.py +2 -2
  72. ccxt/async_support/wazirx.py +2 -2
  73. ccxt/async_support/whitebit.py +3 -3
  74. ccxt/async_support/woo.py +3 -3
  75. ccxt/async_support/yobit.py +2 -2
  76. ccxt/base/exchange.py +35 -9
  77. ccxt/base/types.py +32 -0
  78. ccxt/bigone.py +2 -2
  79. ccxt/binance.py +17 -11
  80. ccxt/bingx.py +2 -2
  81. ccxt/bit2c.py +2 -2
  82. ccxt/bitbank.py +2 -2
  83. ccxt/bitfinex.py +2 -2
  84. ccxt/bitfinex2.py +3 -3
  85. ccxt/bitflyer.py +4 -2
  86. ccxt/bitget.py +27 -21
  87. ccxt/bitmart.py +6 -4
  88. ccxt/bitmex.py +2 -2
  89. ccxt/bitopro.py +3 -3
  90. ccxt/bitrue.py +2 -2
  91. ccxt/bitso.py +2 -2
  92. ccxt/bitstamp.py +89 -97
  93. ccxt/bitteam.py +2 -2
  94. ccxt/bitvavo.py +3 -3
  95. ccxt/bl3p.py +2 -2
  96. ccxt/blockchaincom.py +2 -2
  97. ccxt/blofin.py +4 -2
  98. ccxt/bybit.py +7 -5
  99. ccxt/cex.py +3 -3
  100. ccxt/coinbase.py +2 -2
  101. ccxt/coinbaseinternational.py +2 -2
  102. ccxt/coinbasepro.py +3 -3
  103. ccxt/coincheck.py +2 -2
  104. ccxt/coinex.py +5 -5
  105. ccxt/coinlist.py +3 -3
  106. ccxt/coinmate.py +2 -2
  107. ccxt/coinmetro.py +2 -2
  108. ccxt/coinone.py +2 -2
  109. ccxt/coinsph.py +6 -4
  110. ccxt/cryptocom.py +1 -1
  111. ccxt/currencycom.py +3 -3
  112. ccxt/delta.py +2 -2
  113. ccxt/deribit.py +3 -3
  114. ccxt/digifinex.py +6 -4
  115. ccxt/exmo.py +3 -3
  116. ccxt/gate.py +20 -18
  117. ccxt/gemini.py +3 -3
  118. ccxt/hitbtc.py +7 -5
  119. ccxt/hollaex.py +3 -3
  120. ccxt/htx.py +6 -4
  121. ccxt/huobijp.py +2 -2
  122. ccxt/hyperliquid.py +2 -2
  123. ccxt/idex.py +3 -3
  124. ccxt/independentreserve.py +2 -2
  125. ccxt/kraken.py +3 -3
  126. ccxt/krakenfutures.py +2 -1
  127. ccxt/kucoin.py +49 -22
  128. ccxt/kuna.py +2 -2
  129. ccxt/latoken.py +7 -3
  130. ccxt/lbank.py +7 -5
  131. ccxt/luno.py +4 -2
  132. ccxt/lykke.py +2 -2
  133. ccxt/mexc.py +57 -10
  134. ccxt/ndax.py +2 -2
  135. ccxt/oceanex.py +2 -2
  136. ccxt/okcoin.py +2 -2
  137. ccxt/okx.py +6 -4
  138. ccxt/onetrading.py +3 -3
  139. ccxt/phemex.py +2 -2
  140. ccxt/poloniex.py +3 -3
  141. ccxt/pro/__init__.py +1 -1
  142. ccxt/pro/bitget.py +2 -0
  143. ccxt/pro/bitvavo.py +2 -2
  144. ccxt/probit.py +2 -2
  145. ccxt/timex.py +6 -4
  146. ccxt/upbit.py +2 -2
  147. ccxt/wazirx.py +2 -2
  148. ccxt/whitebit.py +3 -3
  149. ccxt/woo.py +3 -3
  150. ccxt/yobit.py +2 -2
  151. {ccxt-4.2.87.dist-info → ccxt-4.2.89.dist-info}/METADATA +5 -6
  152. {ccxt-4.2.87.dist-info → ccxt-4.2.89.dist-info}/RECORD +154 -154
  153. {ccxt-4.2.87.dist-info → ccxt-4.2.89.dist-info}/WHEEL +0 -0
  154. {ccxt-4.2.87.dist-info → ccxt-4.2.89.dist-info}/top_level.txt +0 -0
ccxt/blockchaincom.py CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
  from ccxt.base.exchange import Exchange
7
7
  from ccxt.abstract.blockchaincom import ImplicitAPI
8
- from ccxt.base.types import Balances, Currency, Int, Market, Num, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, Transaction
8
+ from ccxt.base.types import Balances, Currency, Int, Market, Num, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, TradingFees, Transaction
9
9
  from typing import List
10
10
  from ccxt.base.errors import ExchangeError
11
11
  from ccxt.base.errors import ArgumentsRequired
@@ -617,7 +617,7 @@ class blockchaincom(Exchange, ImplicitAPI):
617
617
  'info': response,
618
618
  }
619
619
 
620
- def fetch_trading_fees(self, params={}):
620
+ def fetch_trading_fees(self, params={}) -> TradingFees:
621
621
  """
622
622
  fetch the trading fees for multiple markets
623
623
  :see: https://api.blockchain.com/v3/#/trading/getFees
ccxt/blofin.py CHANGED
@@ -6,7 +6,7 @@
6
6
  from ccxt.base.exchange import Exchange
7
7
  from ccxt.abstract.blofin import ImplicitAPI
8
8
  import hashlib
9
- from ccxt.base.types import Balances, Currency, Int, Leverage, Leverages, MarginMode, Market, Num, Order, OrderBook, OrderRequest, OrderSide, OrderType, Position, Str, Strings, Ticker, Tickers, Trade, Transaction, TransferEntry
9
+ from ccxt.base.types import Balances, Currency, Int, Leverage, Leverages, MarginMode, Market, Num, Order, OrderBook, OrderRequest, OrderSide, OrderType, Position, 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 ArgumentsRequired
@@ -906,13 +906,15 @@ class blofin(Exchange, ImplicitAPI):
906
906
  result[code] = account
907
907
  return self.safe_balance(result)
908
908
 
909
- def parse_trading_fee(self, fee, market: Market = None):
909
+ def parse_trading_fee(self, fee, market: Market = None) -> TradingFeeInterface:
910
910
  return {
911
911
  'info': fee,
912
912
  'symbol': self.safe_symbol(None, market),
913
913
  # blofin returns the fees values opposed to other exchanges, so the sign needs to be flipped
914
914
  'maker': self.parse_number(Precise.string_neg(self.safe_string_2(fee, 'maker', 'makerU'))),
915
915
  'taker': self.parse_number(Precise.string_neg(self.safe_string_2(fee, 'taker', 'takerU'))),
916
+ 'percentage': None,
917
+ 'tierBased': None,
916
918
  }
917
919
 
918
920
  def fetch_balance(self, params={}) -> Balances:
ccxt/bybit.py CHANGED
@@ -6,7 +6,7 @@
6
6
  from ccxt.base.exchange import Exchange
7
7
  from ccxt.abstract.bybit import ImplicitAPI
8
8
  import hashlib
9
- from ccxt.base.types import Balances, Currency, Greeks, Int, Leverage, 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, Greeks, Int, Leverage, 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
@@ -1233,7 +1233,7 @@ class bybit(Exchange, ImplicitAPI):
1233
1233
  #
1234
1234
  return self.safe_integer(response, 'time')
1235
1235
 
1236
- def fetch_currencies(self, params={}):
1236
+ def fetch_currencies(self, params={}) -> Currencies:
1237
1237
  """
1238
1238
  fetches all available currencies on an exchange
1239
1239
  :see: https://bybit-exchange.github.io/docs/v5/asset/coin-info
@@ -6736,7 +6736,7 @@ class bybit(Exchange, ImplicitAPI):
6736
6736
  request['symbol'] = market['id']
6737
6737
  return self.fetch_derivatives_market_leverage_tiers(symbol, params)
6738
6738
 
6739
- def parse_trading_fee(self, fee, market: Market = None):
6739
+ def parse_trading_fee(self, fee, market: Market = None) -> TradingFeeInterface:
6740
6740
  #
6741
6741
  # {
6742
6742
  # "symbol": "ETHUSDT",
@@ -6752,9 +6752,11 @@ class bybit(Exchange, ImplicitAPI):
6752
6752
  'symbol': symbol,
6753
6753
  'maker': self.safe_number(fee, 'makerFeeRate'),
6754
6754
  'taker': self.safe_number(fee, 'takerFeeRate'),
6755
+ 'percentage': None,
6756
+ 'tierBased': None,
6755
6757
  }
6756
6758
 
6757
- def fetch_trading_fee(self, symbol: str, params={}):
6759
+ def fetch_trading_fee(self, symbol: str, params={}) -> TradingFeeInterface:
6758
6760
  """
6759
6761
  fetch the trading fees for a market
6760
6762
  :see: https://bybit-exchange.github.io/docs/v5/account/fee-rate
@@ -6800,7 +6802,7 @@ class bybit(Exchange, ImplicitAPI):
6800
6802
  first = self.safe_value(fees, 0, {})
6801
6803
  return self.parse_trading_fee(first, market)
6802
6804
 
6803
- def fetch_trading_fees(self, params={}):
6805
+ def fetch_trading_fees(self, params={}) -> TradingFees:
6804
6806
  """
6805
6807
  fetch the trading fees for multiple markets
6806
6808
  :see: https://bybit-exchange.github.io/docs/v5/account/fee-rate
ccxt/cex.py CHANGED
@@ -7,7 +7,7 @@ from ccxt.base.exchange import Exchange
7
7
  from ccxt.abstract.cex import ImplicitAPI
8
8
  import hashlib
9
9
  import json
10
- from ccxt.base.types import Balances, Int, Market, Num, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade
10
+ from ccxt.base.types import Balances, Currencies, Int, Market, Num, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, TradingFees
11
11
  from typing import List
12
12
  from ccxt.base.errors import ExchangeError
13
13
  from ccxt.base.errors import ArgumentsRequired
@@ -237,7 +237,7 @@ class cex(Exchange, ImplicitAPI):
237
237
  })
238
238
  return self.safe_value(self.options['fetchCurrencies'], 'response')
239
239
 
240
- def fetch_currencies(self, params={}):
240
+ def fetch_currencies(self, params={}) -> Currencies:
241
241
  """
242
242
  fetches all available currencies on an exchange
243
243
  :param dict [params]: extra parameters specific to the exchange API endpoint
@@ -681,7 +681,7 @@ class cex(Exchange, ImplicitAPI):
681
681
  response = self.publicGetTradeHistoryPair(self.extend(request, params))
682
682
  return self.parse_trades(response, market, since, limit)
683
683
 
684
- def fetch_trading_fees(self, params={}):
684
+ def fetch_trading_fees(self, params={}) -> TradingFees:
685
685
  """
686
686
  :see: https://docs.cex.io/#get-my-fee
687
687
  fetch the trading fees for multiple markets
ccxt/coinbase.py CHANGED
@@ -6,7 +6,7 @@
6
6
  from ccxt.base.exchange import Exchange
7
7
  from ccxt.abstract.coinbase 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 ArgumentsRequired
@@ -1287,7 +1287,7 @@ class coinbase(Exchange, ImplicitAPI):
1287
1287
  })
1288
1288
  return self.safe_dict(self.options, 'fetchCurrencies', {})
1289
1289
 
1290
- def fetch_currencies(self, params={}):
1290
+ def fetch_currencies(self, params={}) -> Currencies:
1291
1291
  """
1292
1292
  fetches all available currencies on an exchange
1293
1293
  :see: https://docs.cloud.coinbase.com/sign-in-with-coinbase/docs/api-currencies#get-fiat-currencies
@@ -6,7 +6,7 @@
6
6
  from ccxt.base.exchange import Exchange
7
7
  from ccxt.abstract.coinbaseinternational import ImplicitAPI
8
8
  import hashlib
9
- from ccxt.base.types import Balances, Currency, Int, Market, Order, OrderSide, OrderType, Position, Str, Strings, Ticker, Tickers, Trade, Transaction, TransferEntry
9
+ from ccxt.base.types import Balances, Currencies, Currency, Int, Market, Order, OrderSide, OrderType, Position, Str, Strings, Ticker, Tickers, Trade, Transaction, TransferEntry
10
10
  from typing import List
11
11
  from typing import Any
12
12
  from ccxt.base.errors import ExchangeError
@@ -1065,7 +1065,7 @@ class coinbaseinternational(Exchange, ImplicitAPI):
1065
1065
  'created': None,
1066
1066
  }
1067
1067
 
1068
- def fetch_currencies(self, params={}) -> Any:
1068
+ def fetch_currencies(self, params={}) -> Currencies:
1069
1069
  """
1070
1070
  fetches all available currencies on an exchange
1071
1071
  :see: https://docs.cloud.coinbase.com/intx/reference/getassets
ccxt/coinbasepro.py CHANGED
@@ -6,7 +6,7 @@
6
6
  from ccxt.base.exchange import Exchange
7
7
  from ccxt.abstract.coinbasepro 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, TradingFees, Transaction
10
10
  from typing import List
11
11
  from ccxt.base.errors import ExchangeError
12
12
  from ccxt.base.errors import PermissionDenied
@@ -239,7 +239,7 @@ class coinbasepro(Exchange, ImplicitAPI):
239
239
  },
240
240
  })
241
241
 
242
- def fetch_currencies(self, params={}):
242
+ def fetch_currencies(self, params={}) -> Currencies:
243
243
  """
244
244
  fetches all available currencies on an exchange
245
245
  :see: https://docs.cloud.coinbase.com/exchange/reference/exchangerestapi_getcurrencies
@@ -833,7 +833,7 @@ class coinbasepro(Exchange, ImplicitAPI):
833
833
  #
834
834
  return self.parse_trades(response, market, since, limit)
835
835
 
836
- def fetch_trading_fees(self, params={}):
836
+ def fetch_trading_fees(self, params={}) -> TradingFees:
837
837
  """
838
838
  fetch the trading fees for multiple markets
839
839
  :see: https://docs.cloud.coinbase.com/exchange/reference/exchangerestapi_getfees
ccxt/coincheck.py CHANGED
@@ -6,7 +6,7 @@
6
6
  from ccxt.base.exchange import Exchange
7
7
  from ccxt.abstract.coincheck import ImplicitAPI
8
8
  import hashlib
9
- from ccxt.base.types import Balances, Currency, Int, Market, Num, Order, OrderBook, OrderSide, OrderType, Str, Ticker, Trade, Transaction
9
+ from ccxt.base.types import Balances, Currency, Int, Market, Num, Order, OrderBook, OrderSide, OrderType, Str, Ticker, Trade, TradingFees, Transaction
10
10
  from typing import List
11
11
  from ccxt.base.errors import ExchangeError
12
12
  from ccxt.base.errors import BadSymbol
@@ -503,7 +503,7 @@ class coincheck(Exchange, ImplicitAPI):
503
503
  data = self.safe_list(response, 'data', [])
504
504
  return self.parse_trades(data, market, since, limit)
505
505
 
506
- def fetch_trading_fees(self, params={}):
506
+ def fetch_trading_fees(self, params={}) -> TradingFees:
507
507
  """
508
508
  fetch the trading fees for multiple markets
509
509
  :see: https://coincheck.com/documents/exchange/api#account-info
ccxt/coinex.py CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
  from ccxt.base.exchange import Exchange
7
7
  from ccxt.abstract.coinex import ImplicitAPI
8
- from ccxt.base.types import Balances, Currency, Int, Leverage, Leverages, MarginModification, Market, Num, Order, OrderRequest, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, Transaction, TransferEntry
8
+ from ccxt.base.types import Balances, Currencies, Currency, Int, Leverage, Leverages, MarginModification, Market, Num, Order, OrderRequest, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, TradingFeeInterface, TradingFees, Transaction, TransferEntry
9
9
  from typing import List
10
10
  from ccxt.base.errors import ExchangeError
11
11
  from ccxt.base.errors import PermissionDenied
@@ -489,7 +489,7 @@ class coinex(Exchange, ImplicitAPI):
489
489
  },
490
490
  })
491
491
 
492
- def fetch_currencies(self, params={}):
492
+ def fetch_currencies(self, params={}) -> Currencies:
493
493
  response = self.v1PublicGetCommonAssetConfig(params)
494
494
  # {
495
495
  # "code": 0,
@@ -1305,7 +1305,7 @@ class coinex(Exchange, ImplicitAPI):
1305
1305
  #
1306
1306
  return self.parse_trades(response['data'], market, since, limit)
1307
1307
 
1308
- def fetch_trading_fee(self, symbol: str, params={}):
1308
+ def fetch_trading_fee(self, symbol: str, params={}) -> TradingFeeInterface:
1309
1309
  """
1310
1310
  fetch the trading fees for a market
1311
1311
  :see: https://docs.coinex.com/api/v2/spot/market/http/list-market
@@ -1369,7 +1369,7 @@ class coinex(Exchange, ImplicitAPI):
1369
1369
  result = self.safe_dict(data, 0, {})
1370
1370
  return self.parse_trading_fee(result, market)
1371
1371
 
1372
- def fetch_trading_fees(self, params={}):
1372
+ def fetch_trading_fees(self, params={}) -> TradingFees:
1373
1373
  """
1374
1374
  fetch the trading fees for multiple markets
1375
1375
  :see: https://docs.coinex.com/api/v2/spot/market/http/list-market
@@ -1436,7 +1436,7 @@ class coinex(Exchange, ImplicitAPI):
1436
1436
  result[symbol] = self.parse_trading_fee(entry, market)
1437
1437
  return result
1438
1438
 
1439
- def parse_trading_fee(self, fee, market: Market = None):
1439
+ def parse_trading_fee(self, fee, market: Market = None) -> TradingFeeInterface:
1440
1440
  marketId = self.safe_value(fee, 'market')
1441
1441
  symbol = self.safe_symbol(marketId, market)
1442
1442
  return {
ccxt/coinlist.py CHANGED
@@ -7,7 +7,7 @@ from ccxt.base.exchange import Exchange
7
7
  from ccxt.abstract.coinlist import ImplicitAPI
8
8
  import hashlib
9
9
  import math
10
- from ccxt.base.types import Account, Balances, Currency, Int, Market, Num, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, Transaction, TransferEntry
10
+ from ccxt.base.types import Account, Balances, Currencies, Currency, Int, Market, Num, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, TradingFees, Transaction, TransferEntry
11
11
  from typing import List
12
12
  from ccxt.base.errors import ExchangeError
13
13
  from ccxt.base.errors import PermissionDenied
@@ -336,7 +336,7 @@ class coinlist(Exchange, ImplicitAPI):
336
336
  string = self.safe_string(response, 'iso')
337
337
  return self.parse8601(string)
338
338
 
339
- def fetch_currencies(self, params={}):
339
+ def fetch_currencies(self, params={}) -> Currencies:
340
340
  """
341
341
  fetches all available currencies on an exchange
342
342
  :see: https://trade-docs.coinlist.co/?javascript--nodejs#list-supported-assets
@@ -856,7 +856,7 @@ class coinlist(Exchange, ImplicitAPI):
856
856
  'info': trade,
857
857
  }, market)
858
858
 
859
- def fetch_trading_fees(self, params={}):
859
+ def fetch_trading_fees(self, params={}) -> TradingFees:
860
860
  """
861
861
  fetch the trading fees for multiple markets
862
862
  :see: https://trade-docs.coinlist.co/?javascript--nodejs#list-fees
ccxt/coinmate.py CHANGED
@@ -6,7 +6,7 @@
6
6
  from ccxt.base.exchange import Exchange
7
7
  from ccxt.abstract.coinmate 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, Transaction
10
10
  from typing import List
11
11
  from ccxt.base.errors import ExchangeError
12
12
  from ccxt.base.errors import ArgumentsRequired
@@ -761,7 +761,7 @@ class coinmate(Exchange, ImplicitAPI):
761
761
  data = self.safe_list(response, 'data', [])
762
762
  return self.parse_trades(data, market, since, limit)
763
763
 
764
- def fetch_trading_fee(self, symbol: str, params={}):
764
+ def fetch_trading_fee(self, symbol: str, params={}) -> TradingFeeInterface:
765
765
  """
766
766
  fetch the trading fees for a market
767
767
  :see: https://coinmate.docs.apiary.io/#reference/trader-fees/get-trading-fees/post
ccxt/coinmetro.py CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
  from ccxt.base.exchange import Exchange
7
7
  from ccxt.abstract.coinmetro import ImplicitAPI
8
- from ccxt.base.types import Balances, Currency, IndexType, Int, Market, Num, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade
8
+ from ccxt.base.types import Balances, Currencies, Currency, IndexType, Int, Market, Num, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade
9
9
  from typing import List
10
10
  from ccxt.base.errors import ExchangeError
11
11
  from ccxt.base.errors import PermissionDenied
@@ -256,7 +256,7 @@ class coinmetro(Exchange, ImplicitAPI):
256
256
  },
257
257
  })
258
258
 
259
- def fetch_currencies(self, params={}):
259
+ def fetch_currencies(self, params={}) -> Currencies:
260
260
  """
261
261
  fetches all available currencies on an exchange
262
262
  :see: https://documenter.getpostman.com/view/3653795/SVfWN6KS#d5876d43-a3fe-4479-8c58-24d0f044edfb
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/cryptocom.py CHANGED
@@ -2565,7 +2565,7 @@ class cryptocom(Exchange, ImplicitAPI):
2565
2565
  #
2566
2566
  result = self.safe_dict(response, 'result', {})
2567
2567
  data = self.safe_list(result, 'data', [])
2568
- return self.parse_position(data[0], market)
2568
+ return self.parse_position(self.safe_dict(data, 0), market)
2569
2569
 
2570
2570
  def fetch_positions(self, symbols: Strings = None, params={}):
2571
2571
  """
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