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
@@ -6,7 +6,7 @@
6
6
  from ccxt.async_support.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
- async def fetch_trading_fee(self, symbol: str, params={}):
764
+ async 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
@@ -5,7 +5,7 @@
5
5
 
6
6
  from ccxt.async_support.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
- async def fetch_currencies(self, params={}):
259
+ async 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
@@ -6,7 +6,7 @@
6
6
  from ccxt.async_support.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
- async def fetch_currencies(self, params={}):
208
+ async 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
@@ -6,7 +6,7 @@
6
6
  from ccxt.async_support.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
- async def fetch_trading_fee(self, symbol: str, params={}):
1424
+ async 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
- async def fetch_trading_fees(self, params={}):
1450
+ async 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
  async def withdraw(self, code: str, amount: float, address, tag=None, params={}):
@@ -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
  async def fetch_positions(self, symbols: Strings = None, params={}):
2571
2571
  """
@@ -6,7 +6,7 @@
6
6
  from ccxt.async_support.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
- async def fetch_currencies(self, params={}):
329
+ async 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
- async def fetch_trading_fees(self, params={}):
631
+ async 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
@@ -6,7 +6,7 @@
6
6
  from ccxt.async_support.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
- async def fetch_currencies(self, params={}):
412
+ async 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
@@ -6,7 +6,7 @@
6
6
  from ccxt.async_support.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
- async def fetch_currencies(self, params={}):
521
+ async 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
- async def fetch_trading_fees(self, params={}):
1438
+ async 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
@@ -8,7 +8,7 @@ from ccxt.abstract.digifinex import ImplicitAPI
8
8
  import asyncio
9
9
  import hashlib
10
10
  import json
11
- from ccxt.base.types import Balances, Currency, Int, MarginModification, Market, Num, Order, OrderBook, OrderRequest, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, Transaction, TransferEntry
11
+ 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
12
12
  from typing import List
13
13
  from ccxt.base.errors import ExchangeError
14
14
  from ccxt.base.errors import PermissionDenied
@@ -366,7 +366,7 @@ class digifinex(Exchange, ImplicitAPI):
366
366
  },
367
367
  })
368
368
 
369
- async def fetch_currencies(self, params={}):
369
+ async def fetch_currencies(self, params={}) -> Currencies:
370
370
  """
371
371
  fetches all available currencies on an exchange
372
372
  :param dict [params]: extra parameters specific to the exchange API endpoint
@@ -3076,7 +3076,7 @@ class digifinex(Exchange, ImplicitAPI):
3076
3076
  sorted = self.sort_by(rates, 'timestamp')
3077
3077
  return self.filter_by_symbol_since_limit(sorted, symbol, since, limit)
3078
3078
 
3079
- async def fetch_trading_fee(self, symbol: str, params={}):
3079
+ async def fetch_trading_fee(self, symbol: str, params={}) -> TradingFeeInterface:
3080
3080
  """
3081
3081
  fetch the trading fees for a market
3082
3082
  :see: https://docs.digifinex.com/en-ww/swap/v2/rest.html#tradingfee
@@ -3105,7 +3105,7 @@ class digifinex(Exchange, ImplicitAPI):
3105
3105
  data = self.safe_value(response, 'data', {})
3106
3106
  return self.parse_trading_fee(data, market)
3107
3107
 
3108
- def parse_trading_fee(self, fee, market: Market = None):
3108
+ def parse_trading_fee(self, fee, market: Market = None) -> TradingFeeInterface:
3109
3109
  #
3110
3110
  # {
3111
3111
  # "instrument_id": "BTCUSDTPERP",
@@ -3120,6 +3120,8 @@ class digifinex(Exchange, ImplicitAPI):
3120
3120
  'symbol': symbol,
3121
3121
  'maker': self.safe_number(fee, 'maker_fee_rate'),
3122
3122
  'taker': self.safe_number(fee, 'taker_fee_rate'),
3123
+ 'percentage': None,
3124
+ 'tierBased': None,
3123
3125
  }
3124
3126
 
3125
3127
  async def fetch_positions(self, symbols: Strings = None, params={}):
@@ -6,7 +6,7 @@
6
6
  from ccxt.async_support.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 await self.modify_margin_helper(symbol, amount, 'add', params)
305
305
 
306
- async def fetch_trading_fees(self, params={}):
306
+ async 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
- async def fetch_currencies(self, params={}):
576
+ async 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
@@ -7,7 +7,7 @@ from ccxt.async_support.base.exchange import Exchange
7
7
  from ccxt.abstract.gate import ImplicitAPI
8
8
  import asyncio
9
9
  import hashlib
10
- 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
10
+ 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
11
11
  from typing import List
12
12
  from ccxt.base.errors import ExchangeError
13
13
  from ccxt.base.errors import PermissionDenied
@@ -1521,7 +1521,7 @@ class gate(Exchange, ImplicitAPI):
1521
1521
  defaultSettle = ['usdt'] if (type == 'swap') else ['btc']
1522
1522
  return self.safe_value(fetchMarketsContractOptions, 'settlementCurrencies', defaultSettle)
1523
1523
 
1524
- async def fetch_currencies(self, params={}):
1524
+ async def fetch_currencies(self, params={}) -> Currencies:
1525
1525
  """
1526
1526
  fetches all available currencies on an exchange
1527
1527
  :see: https://www.gate.io/docs/developers/apiv4/en/#list-all-currencies-details
@@ -1824,7 +1824,7 @@ class gate(Exchange, ImplicitAPI):
1824
1824
  await self.load_markets()
1825
1825
  currency = self.currency(code)
1826
1826
  request = {
1827
- 'currency': currency['id'],
1827
+ 'currency': currency['id'], # todo: currencies have network-junctions
1828
1828
  }
1829
1829
  response = await self.privateWalletGetDepositAddress(self.extend(request, params))
1830
1830
  addresses = self.safe_value(response, 'multichain_addresses')
@@ -1871,7 +1871,7 @@ class gate(Exchange, ImplicitAPI):
1871
1871
  rawNetwork = self.safe_string_upper(params, 'network')
1872
1872
  params = self.omit(params, 'network')
1873
1873
  request = {
1874
- 'currency': currency['id'],
1874
+ 'currency': currency['id'], # todo: currencies have network-junctions
1875
1875
  }
1876
1876
  response = await self.privateWalletGetDepositAddress(self.extend(request, params))
1877
1877
  #
@@ -1929,7 +1929,7 @@ class gate(Exchange, ImplicitAPI):
1929
1929
  'network': network,
1930
1930
  }
1931
1931
 
1932
- async def fetch_trading_fee(self, symbol: str, params={}):
1932
+ async def fetch_trading_fee(self, symbol: str, params={}) -> TradingFeeInterface:
1933
1933
  """
1934
1934
  fetch the trading fees for a market
1935
1935
  :see: https://www.gate.io/docs/developers/apiv4/en/#retrieve-personal-trading-fee
@@ -1959,7 +1959,7 @@ class gate(Exchange, ImplicitAPI):
1959
1959
  #
1960
1960
  return self.parse_trading_fee(response, market)
1961
1961
 
1962
- async def fetch_trading_fees(self, params={}):
1962
+ async def fetch_trading_fees(self, params={}) -> TradingFees:
1963
1963
  """
1964
1964
  fetch the trading fees for multiple markets
1965
1965
  :see: https://www.gate.io/docs/developers/apiv4/en/#retrieve-personal-trading-fee
@@ -2018,6 +2018,8 @@ class gate(Exchange, ImplicitAPI):
2018
2018
  'symbol': self.safe_string(market, 'symbol'),
2019
2019
  'maker': self.safe_number(info, makerKey),
2020
2020
  'taker': self.safe_number(info, takerKey),
2021
+ 'percentage': None,
2022
+ 'tierBased': None,
2021
2023
  }
2022
2024
 
2023
2025
  async def fetch_transaction_fees(self, codes: List[str] = None, params={}):
@@ -3346,7 +3348,7 @@ class gate(Exchange, ImplicitAPI):
3346
3348
  currency = None
3347
3349
  if code is not None:
3348
3350
  currency = self.currency(code)
3349
- request['currency'] = currency['id']
3351
+ request['currency'] = currency['id'] # todo: currencies have network-junctions
3350
3352
  if limit is not None:
3351
3353
  request['limit'] = limit
3352
3354
  if since is not None:
@@ -3378,7 +3380,7 @@ class gate(Exchange, ImplicitAPI):
3378
3380
  currency = None
3379
3381
  if code is not None:
3380
3382
  currency = self.currency(code)
3381
- request['currency'] = currency['id']
3383
+ request['currency'] = currency['id'] # todo: currencies have network-junctions
3382
3384
  if limit is not None:
3383
3385
  request['limit'] = limit
3384
3386
  if since is not None:
@@ -3405,7 +3407,7 @@ class gate(Exchange, ImplicitAPI):
3405
3407
  await self.load_markets()
3406
3408
  currency = self.currency(code)
3407
3409
  request = {
3408
- 'currency': currency['id'],
3410
+ 'currency': currency['id'], # todo: currencies have network-junctions
3409
3411
  'address': address,
3410
3412
  'amount': self.currency_to_precision(code, amount),
3411
3413
  }
@@ -3418,7 +3420,7 @@ class gate(Exchange, ImplicitAPI):
3418
3420
  request['chain'] = network
3419
3421
  params = self.omit(params, 'network')
3420
3422
  else:
3421
- request['chain'] = currency['id']
3423
+ request['chain'] = currency['id'] # todo: currencies have network-junctions
3422
3424
  response = await self.privateWithdrawalsPostWithdrawals(self.extend(request, params))
3423
3425
  #
3424
3426
  # {
@@ -4762,7 +4764,7 @@ class gate(Exchange, ImplicitAPI):
4762
4764
  toId = self.convert_type_to_account(toAccount)
4763
4765
  truncated = self.currency_to_precision(code, amount)
4764
4766
  request = {
4765
- 'currency': currency['id'],
4767
+ 'currency': currency['id'], # todo: currencies have network-junctions
4766
4768
  'amount': truncated,
4767
4769
  }
4768
4770
  if not (fromId in self.options['accountsByType']):
@@ -4783,7 +4785,7 @@ class gate(Exchange, ImplicitAPI):
4783
4785
  request['currency_pair'] = market['id']
4784
4786
  params = self.omit(params, 'symbol')
4785
4787
  if (toId == 'futures') or (toId == 'delivery') or (fromId == 'futures') or (fromId == 'delivery'):
4786
- request['settle'] = currency['id']
4788
+ request['settle'] = currency['id'] # todo: currencies have network-junctions
4787
4789
  response = await self.privateWalletPostTransfers(self.extend(request, params))
4788
4790
  #
4789
4791
  # according to the docs(however actual response seems to be an empty string '')
@@ -5396,7 +5398,7 @@ class gate(Exchange, ImplicitAPI):
5396
5398
  await self.load_markets()
5397
5399
  currency = self.currency(code)
5398
5400
  request = {
5399
- 'currency': currency['id'].upper(),
5401
+ 'currency': currency['id'].upper(), # todo: currencies have network-junctions
5400
5402
  'amount': self.currency_to_precision(code, amount),
5401
5403
  }
5402
5404
  market = self.market(symbol)
@@ -5423,7 +5425,7 @@ class gate(Exchange, ImplicitAPI):
5423
5425
  await self.load_markets()
5424
5426
  currency = self.currency(code)
5425
5427
  request = {
5426
- 'currency': currency['id'].upper(),
5428
+ 'currency': currency['id'].upper(), # todo: currencies have network-junctions
5427
5429
  'amount': self.currency_to_precision(code, amount),
5428
5430
  }
5429
5431
  response = await self.privateMarginPostCrossRepayments(self.extend(request, params))
@@ -5460,7 +5462,7 @@ class gate(Exchange, ImplicitAPI):
5460
5462
  await self.load_markets()
5461
5463
  currency = self.currency(code)
5462
5464
  request = {
5463
- 'currency': currency['id'].upper(),
5465
+ 'currency': currency['id'].upper(), # todo: currencies have network-junctions
5464
5466
  'amount': self.currency_to_precision(code, amount),
5465
5467
  }
5466
5468
  response = None
@@ -5503,7 +5505,7 @@ class gate(Exchange, ImplicitAPI):
5503
5505
  await self.load_markets()
5504
5506
  currency = self.currency(code)
5505
5507
  request = {
5506
- 'currency': currency['id'].upper(),
5508
+ 'currency': currency['id'].upper(), # todo: currencies have network-junctions
5507
5509
  'amount': self.currency_to_precision(code, amount),
5508
5510
  }
5509
5511
  response = await self.privateMarginPostCrossLoans(self.extend(request, params))
@@ -5996,7 +5998,7 @@ class gate(Exchange, ImplicitAPI):
5996
5998
  if (type == 'spot') or (type == 'margin'):
5997
5999
  if code is not None:
5998
6000
  currency = self.currency(code)
5999
- request['currency'] = currency['id']
6001
+ request['currency'] = currency['id'] # todo: currencies have network-junctions
6000
6002
  if (type == 'swap') or (type == 'future'):
6001
6003
  defaultSettle = 'usdt' if (type == 'swap') else 'btc'
6002
6004
  settle = self.safe_string_lower(params, 'settle', defaultSettle)
@@ -6754,7 +6756,7 @@ class gate(Exchange, ImplicitAPI):
6754
6756
  await self.load_markets()
6755
6757
  currency = self.currency(code)
6756
6758
  request = {
6757
- 'underlying': currency['code'] + '_USDT',
6759
+ 'underlying': currency['code'] + '_USDT', # todo: currency['id'].upper() & network junctions
6758
6760
  }
6759
6761
  response = await self.publicOptionsGetContracts(self.extend(request, params))
6760
6762
  #
@@ -7,7 +7,7 @@ from ccxt.async_support.base.exchange import Exchange
7
7
  from ccxt.abstract.gemini import ImplicitAPI
8
8
  import asyncio
9
9
  import hashlib
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, TradingFees, Transaction
11
11
  from typing import List
12
12
  from ccxt.base.errors import ExchangeError
13
13
  from ccxt.base.errors import PermissionDenied
@@ -303,7 +303,7 @@ class gemini(Exchange, ImplicitAPI):
303
303
  },
304
304
  })
305
305
 
306
- async def fetch_currencies(self, params={}):
306
+ async def fetch_currencies(self, params={}) -> Currencies:
307
307
  """
308
308
  fetches all available currencies on an exchange
309
309
  :param dict [params]: extra parameters specific to the endpoint
@@ -1049,7 +1049,7 @@ class gemini(Exchange, ImplicitAPI):
1049
1049
  result[code] = account
1050
1050
  return self.safe_balance(result)
1051
1051
 
1052
- async def fetch_trading_fees(self, params={}):
1052
+ async def fetch_trading_fees(self, params={}) -> TradingFees:
1053
1053
  """
1054
1054
  fetch the trading fees for multiple markets
1055
1055
  :see: https://docs.gemini.com/rest-api/#get-notional-volume
@@ -6,7 +6,7 @@
6
6
  from ccxt.async_support.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
- async def fetch_currencies(self, params={}):
805
+ async 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
- async def fetch_trading_fee(self, symbol: str, params={}):
1571
+ async 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
- async def fetch_trading_fees(self, params={}):
1600
+ async 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
@@ -6,7 +6,7 @@
6
6
  from ccxt.async_support.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
- async def fetch_currencies(self, params={}):
331
+ async 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
- async def fetch_trading_fees(self, params={}):
682
+ async 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/async_support/htx.py CHANGED
@@ -7,7 +7,7 @@ from ccxt.async_support.base.exchange import Exchange
7
7
  from ccxt.abstract.htx import ImplicitAPI
8
8
  import asyncio
9
9
  import hashlib
10
- from ccxt.base.types import Account, Balances, Currency, Int, Market, Num, Order, OrderBook, OrderRequest, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, Transaction, TransferEntry
10
+ 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
11
11
  from typing import List
12
12
  from ccxt.base.errors import ExchangeError
13
13
  from ccxt.base.errors import PermissionDenied
@@ -1486,7 +1486,7 @@ class htx(Exchange, ImplicitAPI):
1486
1486
  #
1487
1487
  return self.safe_integer_2(response, 'data', 'ts')
1488
1488
 
1489
- def parse_trading_fee(self, fee, market: Market = None):
1489
+ def parse_trading_fee(self, fee, market: Market = None) -> TradingFeeInterface:
1490
1490
  #
1491
1491
  # {
1492
1492
  # "symbol":"btcusdt",
@@ -1502,9 +1502,11 @@ class htx(Exchange, ImplicitAPI):
1502
1502
  'symbol': self.safe_symbol(marketId, market),
1503
1503
  'maker': self.safe_number(fee, 'actualMakerRate'),
1504
1504
  'taker': self.safe_number(fee, 'actualTakerRate'),
1505
+ 'percentage': None,
1506
+ 'tierBased': None,
1505
1507
  }
1506
1508
 
1507
- async def fetch_trading_fee(self, symbol: str, params={}):
1509
+ async def fetch_trading_fee(self, symbol: str, params={}) -> TradingFeeInterface:
1508
1510
  """
1509
1511
  fetch the trading fees for a market
1510
1512
  :param str symbol: unified market symbol
@@ -2987,7 +2989,7 @@ class htx(Exchange, ImplicitAPI):
2987
2989
  defaultAccount = self.safe_value(accounts, 0, {})
2988
2990
  return self.safe_string(defaultAccount, 'id')
2989
2991
 
2990
- async def fetch_currencies(self, params={}):
2992
+ async def fetch_currencies(self, params={}) -> Currencies:
2991
2993
  """
2992
2994
  fetches all available currencies on an exchange
2993
2995
  :param dict [params]: extra parameters specific to the exchange API endpoint
@@ -6,7 +6,7 @@
6
6
  from ccxt.async_support.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 = await self.privateGetAccountAccounts(params)
955
955
  return response['data']
956
956
 
957
- async def fetch_currencies(self, params={}):
957
+ async 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
@@ -6,7 +6,7 @@
6
6
  from ccxt.async_support.base.exchange import Exchange
7
7
  from ccxt.abstract.hyperliquid import ImplicitAPI
8
8
  import asyncio
9
- from ccxt.base.types import Balances, Int, MarginModification, Market, Num, Order, OrderBook, OrderRequest, OrderSide, OrderType, Str, Strings, Trade, TransferEntry
9
+ from ccxt.base.types import Balances, Currencies, Int, MarginModification, Market, Num, Order, OrderBook, OrderRequest, OrderSide, OrderType, Str, Strings, Trade, TransferEntry
10
10
  from typing import List
11
11
  from ccxt.base.errors import ExchangeError
12
12
  from ccxt.base.errors import ArgumentsRequired
@@ -208,7 +208,7 @@ class hyperliquid(Exchange, ImplicitAPI):
208
208
  super(hyperliquid, self).set_sandbox_mode(enabled)
209
209
  self.options['sandboxMode'] = enabled
210
210
 
211
- async def fetch_currencies(self, params={}):
211
+ async def fetch_currencies(self, params={}) -> Currencies:
212
212
  """
213
213
  fetches all available currencies on an exchange
214
214
  :see: https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/info-endpoint#retrieve-exchange-metadata
@@ -6,7 +6,7 @@
6
6
  from ccxt.async_support.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
- async def fetch_trading_fees(self, params={}):
612
+ async 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
- async def fetch_currencies(self, params={}):
715
+ async 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.async_support.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 = await self.publicGetGetRecentTrades(self.extend(request, params))
587
587
  return self.parse_trades(response['Trades'], market, since, limit)
588
588
 
589
- async def fetch_trading_fees(self, params={}):
589
+ async 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