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/base/types.py CHANGED
@@ -65,6 +65,15 @@ class FeeInterface(TypedDict):
65
65
  Fee = Optional[FeeInterface]
66
66
 
67
67
 
68
+ class TradingFeeInterface(TypedDict):
69
+ info: Dict[str, Any]
70
+ symbol: Str
71
+ maker: Num
72
+ taker: Num
73
+ percentage: Bool
74
+ tierBased: Bool
75
+
76
+
68
77
  class Balance(TypedDict):
69
78
  free: Num
70
79
  used: Num
@@ -361,10 +370,31 @@ class MarketInterface(TypedDict):
361
370
  created: Int
362
371
 
363
372
 
373
+ class Limit(TypedDict):
374
+ min: Num
375
+ max: Num
376
+
377
+
378
+ class CurrencyLimits(TypedDict):
379
+ amount: Limit
380
+ withdraw: Limit
381
+
382
+
364
383
  class CurrencyInterface(TypedDict):
365
384
  id: Str
366
385
  code: Str
386
+ numericId: Int
367
387
  precision: Num
388
+ type: Str
389
+ margin: Bool
390
+ name: Str
391
+ active: Bool
392
+ deposit: Bool
393
+ withdraw: Bool
394
+ fee: Num
395
+ limits: CurrencyLimits
396
+ networks: Dict[str, any]
397
+ info: any
368
398
 
369
399
 
370
400
  class LastPrice(TypedDict):
@@ -388,6 +418,8 @@ class MarginModification(TypedDict):
388
418
 
389
419
 
390
420
  LastPrices = Dict[Str, LastPrice]
421
+ Currencies = Dict[Str, CurrencyInterface]
422
+ TradingFees = Dict[Str, TradingFeeInterface]
391
423
 
392
424
  Market = Optional[MarketInterface]
393
425
  Currency = Optional[CurrencyInterface]
ccxt/bigone.py CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
  from ccxt.base.exchange import Exchange
7
7
  from ccxt.abstract.bigone import ImplicitAPI
8
- from ccxt.base.types import Balances, Bool, Currency, Int, Market, Num, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, Transaction, TransferEntry
8
+ from ccxt.base.types import Balances, Bool, Currencies, Currency, Int, Market, Num, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, Transaction, TransferEntry
9
9
  from typing import List
10
10
  from ccxt.base.errors import ExchangeError
11
11
  from ccxt.base.errors import PermissionDenied
@@ -339,7 +339,7 @@ class bigone(Exchange, ImplicitAPI):
339
339
  },
340
340
  })
341
341
 
342
- def fetch_currencies(self, params={}):
342
+ def fetch_currencies(self, params={}) -> Currencies:
343
343
  """
344
344
  fetches all available currencies on an exchange
345
345
  :param dict [params]: extra parameters specific to the exchange API endpoint
ccxt/binance.py CHANGED
@@ -7,7 +7,7 @@ from ccxt.base.exchange import Exchange
7
7
  from ccxt.abstract.binance import ImplicitAPI
8
8
  import hashlib
9
9
  import json
10
- from ccxt.base.types import Balances, Currency, Greeks, Int, Leverage, Leverages, MarginMode, MarginModes, MarginModification, Market, MarketInterface, Num, Option, Order, OrderBook, OrderRequest, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, Transaction, TransferEntry
10
+ from ccxt.base.types import Balances, Currencies, Currency, Greeks, Int, Leverage, Leverages, MarginMode, MarginModes, MarginModification, Market, MarketInterface, Num, Option, 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
@@ -2592,7 +2592,7 @@ class binance(Exchange, ImplicitAPI):
2592
2592
  response = self.publicGetTime(query)
2593
2593
  return self.safe_integer(response, 'serverTime')
2594
2594
 
2595
- def fetch_currencies(self, params={}):
2595
+ def fetch_currencies(self, params={}) -> Currencies:
2596
2596
  """
2597
2597
  fetches all available currencies on an exchange
2598
2598
  :see: https://binance-docs.github.io/apidocs/spot/en/#all-coins-39-information-user_data
@@ -8036,7 +8036,7 @@ class binance(Exchange, ImplicitAPI):
8036
8036
  # {id: '9a67628b16ba4988ae20d329333f16bc'}
8037
8037
  return self.parse_transaction(response, currency)
8038
8038
 
8039
- def parse_trading_fee(self, fee, market: Market = None):
8039
+ def parse_trading_fee(self, fee, market: Market = None) -> TradingFeeInterface:
8040
8040
  #
8041
8041
  # spot
8042
8042
  # [
@@ -8061,9 +8061,11 @@ class binance(Exchange, ImplicitAPI):
8061
8061
  'symbol': symbol,
8062
8062
  'maker': self.safe_number_2(fee, 'makerCommission', 'makerCommissionRate'),
8063
8063
  'taker': self.safe_number_2(fee, 'takerCommission', 'takerCommissionRate'),
8064
+ 'percentage': None,
8065
+ 'tierBased': None,
8064
8066
  }
8065
8067
 
8066
- def fetch_trading_fee(self, symbol: str, params={}):
8068
+ def fetch_trading_fee(self, symbol: str, params={}) -> TradingFeeInterface:
8067
8069
  """
8068
8070
  fetch the trading fees for a market
8069
8071
  :see: https://binance-docs.github.io/apidocs/spot/en/#trade-fee-user_data
@@ -8126,7 +8128,7 @@ class binance(Exchange, ImplicitAPI):
8126
8128
  data = self.safe_dict(data, 0, {})
8127
8129
  return self.parse_trading_fee(data, market)
8128
8130
 
8129
- def fetch_trading_fees(self, params={}):
8131
+ def fetch_trading_fees(self, params={}) -> TradingFees:
8130
8132
  """
8131
8133
  fetch the trading fees for multiple markets
8132
8134
  :see: https://binance-docs.github.io/apidocs/spot/en/#trade-fee-user_data
ccxt/bingx.py CHANGED
@@ -7,7 +7,7 @@ from ccxt.base.exchange import Exchange
7
7
  from ccxt.abstract.bingx import ImplicitAPI
8
8
  import hashlib
9
9
  import numbers
10
- from ccxt.base.types import Balances, Currency, Int, Leverage, MarginMode, MarginModification, Market, Num, Order, OrderBook, OrderRequest, OrderSide, OrderType, Position, Str, Strings, Ticker, Tickers, Trade, Transaction, TransferEntry
10
+ from ccxt.base.types import Balances, Currencies, Currency, Int, Leverage, MarginMode, MarginModification, Market, Num, Order, OrderBook, OrderRequest, OrderSide, OrderType, Position, Str, Strings, Ticker, Tickers, Trade, Transaction, TransferEntry
11
11
  from typing import List
12
12
  from ccxt.base.errors import ExchangeError
13
13
  from ccxt.base.errors import PermissionDenied
@@ -454,7 +454,7 @@ class bingx(Exchange, ImplicitAPI):
454
454
  data = self.safe_dict(response, 'data')
455
455
  return self.safe_integer(data, 'serverTime')
456
456
 
457
- def fetch_currencies(self, params={}):
457
+ def fetch_currencies(self, params={}) -> Currencies:
458
458
  """
459
459
  fetches all available currencies on an exchange
460
460
  :see: https://bingx-api.github.io/docs/#/common/account-api.html#All%20Coins
ccxt/bit2c.py CHANGED
@@ -6,7 +6,7 @@
6
6
  from ccxt.base.exchange import Exchange
7
7
  from ccxt.abstract.bit2c 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.errors import ExchangeError
12
12
  from ccxt.base.errors import PermissionDenied
@@ -360,7 +360,7 @@ class bit2c(Exchange, ImplicitAPI):
360
360
  raise ExchangeError(response)
361
361
  return self.parse_trades(response, market, since, limit)
362
362
 
363
- def fetch_trading_fees(self, params={}):
363
+ def fetch_trading_fees(self, params={}) -> TradingFees:
364
364
  """
365
365
  fetch the trading fees for multiple markets
366
366
  :see: https://bit2c.co.il/home/api#balance
ccxt/bitbank.py CHANGED
@@ -6,7 +6,7 @@
6
6
  from ccxt.base.exchange import Exchange
7
7
  from ccxt.abstract.bitbank 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 PermissionDenied
@@ -390,7 +390,7 @@ class bitbank(Exchange, ImplicitAPI):
390
390
  trades = self.safe_list(data, 'transactions', [])
391
391
  return self.parse_trades(trades, market, since, limit)
392
392
 
393
- def fetch_trading_fees(self, params={}):
393
+ def fetch_trading_fees(self, params={}) -> TradingFees:
394
394
  """
395
395
  fetch the trading fees for multiple markets
396
396
  :see: https://github.com/bitbankinc/bitbank-api-docs/blob/38d6d7c6f486c793872fd4b4087a0d090a04cd0a/rest-api.md#get-all-pairs-info
ccxt/bitfinex.py CHANGED
@@ -6,7 +6,7 @@
6
6
  from ccxt.base.exchange import Exchange
7
7
  from ccxt.abstract.bitfinex 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, TransferEntry
9
+ from ccxt.base.types import Balances, Currency, Int, Market, Num, 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
@@ -480,7 +480,7 @@ class bitfinex(Exchange, ImplicitAPI):
480
480
  'info': fee,
481
481
  }
482
482
 
483
- def fetch_trading_fees(self, params={}):
483
+ def fetch_trading_fees(self, params={}) -> TradingFees:
484
484
  """
485
485
  fetch the trading fees for multiple markets
486
486
  :see: https://docs.bitfinex.com/v1/reference/rest-auth-summary
ccxt/bitfinex2.py CHANGED
@@ -6,7 +6,7 @@
6
6
  from ccxt.base.exchange import Exchange
7
7
  from ccxt.abstract.bitfinex2 import ImplicitAPI
8
8
  import hashlib
9
- from ccxt.base.types import Balances, Currency, Int, MarginModification, Market, Num, Order, OrderBook, OrderRequest, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, Transaction, TransferEntry
9
+ from ccxt.base.types import Balances, Currencies, Currency, Int, MarginModification, Market, Num, Order, OrderBook, OrderRequest, 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
@@ -630,7 +630,7 @@ class bitfinex2(Exchange, ImplicitAPI):
630
630
  })
631
631
  return result
632
632
 
633
- def fetch_currencies(self, params={}):
633
+ def fetch_currencies(self, params={}) -> Currencies:
634
634
  """
635
635
  fetches all available currencies on an exchange
636
636
  :see: https://docs.bitfinex.com/reference/rest-public-conf
@@ -2261,7 +2261,7 @@ class bitfinex2(Exchange, ImplicitAPI):
2261
2261
  },
2262
2262
  }
2263
2263
 
2264
- def fetch_trading_fees(self, params={}):
2264
+ def fetch_trading_fees(self, params={}) -> TradingFees:
2265
2265
  """
2266
2266
  fetch the trading fees for multiple markets
2267
2267
  :see: https://docs.bitfinex.com/reference/rest-auth-summary
ccxt/bitflyer.py CHANGED
@@ -6,7 +6,7 @@
6
6
  from ccxt.base.exchange import Exchange
7
7
  from ccxt.abstract.bitflyer import ImplicitAPI
8
8
  import hashlib
9
- from ccxt.base.types import Balances, Currency, Int, Market, MarketInterface, Num, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Trade, Transaction
9
+ from ccxt.base.types import Balances, Currency, Int, Market, MarketInterface, Num, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, 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
@@ -493,7 +493,7 @@ class bitflyer(Exchange, ImplicitAPI):
493
493
  #
494
494
  return self.parse_trades(response, market, since, limit)
495
495
 
496
- def fetch_trading_fee(self, symbol: str, params={}):
496
+ def fetch_trading_fee(self, symbol: str, params={}) -> TradingFeeInterface:
497
497
  """
498
498
  fetch the trading fees for a market
499
499
  :see: https://lightning.bitflyer.com/docs?lang=en#get-trading-commission
@@ -518,6 +518,8 @@ class bitflyer(Exchange, ImplicitAPI):
518
518
  'symbol': market['symbol'],
519
519
  'maker': fee,
520
520
  'taker': fee,
521
+ 'percentage': None,
522
+ 'tierBased': None,
521
523
  }
522
524
 
523
525
  def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: Num = None, params={}):
ccxt/bitget.py CHANGED
@@ -7,7 +7,7 @@ from ccxt.base.exchange import Exchange
7
7
  from ccxt.abstract.bitget import ImplicitAPI
8
8
  import hashlib
9
9
  import json
10
- from ccxt.base.types import Balances, Currency, FundingHistory, Int, Liquidation, Leverage, MarginMode, MarginModification, Market, Num, Order, OrderBook, OrderRequest, OrderSide, OrderType, Position, Str, Strings, Ticker, Tickers, Trade, Transaction, TransferEntry
10
+ from ccxt.base.types import Balances, Currencies, Currency, FundingHistory, Int, Liquidation, Leverage, MarginMode, MarginModification, Market, Num, Order, OrderBook, OrderRequest, OrderSide, OrderType, Position, 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
@@ -1813,7 +1813,7 @@ class bitget(Exchange, ImplicitAPI):
1813
1813
  data = self.safe_value(response, 'data', [])
1814
1814
  return self.parse_markets(data)
1815
1815
 
1816
- def fetch_currencies(self, params={}):
1816
+ def fetch_currencies(self, params={}) -> Currencies:
1817
1817
  """
1818
1818
  fetches all available currencies on an exchange
1819
1819
  :see: https://www.bitget.com/api-doc/spot/market/Get-Coin-List
@@ -2557,7 +2557,10 @@ class bitget(Exchange, ImplicitAPI):
2557
2557
  #
2558
2558
  marketId = self.safe_string(ticker, 'symbol')
2559
2559
  close = self.safe_string(ticker, 'lastPr')
2560
- timestamp = self.safe_integer(ticker, 'ts')
2560
+ timestampString = self.omit_zero(self.safe_string(ticker, 'ts')) # exchange sometimes provided 0
2561
+ timestamp = None
2562
+ if timestampString is not None:
2563
+ timestamp = self.parse_to_int(timestampString)
2561
2564
  change = self.safe_string(ticker, 'change24h')
2562
2565
  open24 = self.safe_string(ticker, 'open24')
2563
2566
  open = self.safe_string(ticker, 'open')
@@ -3004,7 +3007,7 @@ class bitget(Exchange, ImplicitAPI):
3004
3007
  data = self.safe_list(response, 'data', [])
3005
3008
  return self.parse_trades(data, market, since, limit)
3006
3009
 
3007
- def fetch_trading_fee(self, symbol: str, params={}):
3010
+ def fetch_trading_fee(self, symbol: str, params={}) -> TradingFeeInterface:
3008
3011
  """
3009
3012
  fetch the trading fees for a market
3010
3013
  :see: https://www.bitget.com/api-doc/common/public/Get-Trade-Rate
@@ -3042,7 +3045,7 @@ class bitget(Exchange, ImplicitAPI):
3042
3045
  data = self.safe_value(response, 'data', {})
3043
3046
  return self.parse_trading_fee(data, market)
3044
3047
 
3045
- def fetch_trading_fees(self, params={}):
3048
+ def fetch_trading_fees(self, params={}) -> TradingFees:
3046
3049
  """
3047
3050
  fetch the trading fees for multiple markets
3048
3051
  :see: https://www.bitget.com/api-doc/spot/market/Get-Symbols
@@ -3162,6 +3165,8 @@ class bitget(Exchange, ImplicitAPI):
3162
3165
  'symbol': self.safe_symbol(marketId, market),
3163
3166
  'maker': self.safe_number(data, 'makerFeeRate'),
3164
3167
  'taker': self.safe_number(data, 'takerFeeRate'),
3168
+ 'percentage': None,
3169
+ 'tierBased': None,
3165
3170
  }
3166
3171
 
3167
3172
  def parse_ohlcv(self, ohlcv, market: Market = None) -> list:
ccxt/bitmart.py CHANGED
@@ -6,7 +6,7 @@
6
6
  from ccxt.base.exchange import Exchange
7
7
  from ccxt.abstract.bitmart 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, TransferEntry
9
+ from ccxt.base.types import Balances, Currencies, Currency, 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
@@ -985,7 +985,7 @@ class bitmart(Exchange, ImplicitAPI):
985
985
  contract = self.fetch_contract_markets(params)
986
986
  return self.array_concat(spot, contract)
987
987
 
988
- def fetch_currencies(self, params={}):
988
+ def fetch_currencies(self, params={}) -> Currencies:
989
989
  """
990
990
  fetches all available currencies on an exchange
991
991
  :param dict [params]: extra parameters specific to the exchange API endpoint
@@ -1999,7 +1999,7 @@ class bitmart(Exchange, ImplicitAPI):
1999
1999
  #
2000
2000
  return self.custom_parse_balance(response, marketType)
2001
2001
 
2002
- def parse_trading_fee(self, fee, market: Market = None):
2002
+ def parse_trading_fee(self, fee, market: Market = None) -> TradingFeeInterface:
2003
2003
  #
2004
2004
  # {
2005
2005
  # "symbol": "ETH_USDT",
@@ -2014,9 +2014,11 @@ class bitmart(Exchange, ImplicitAPI):
2014
2014
  'symbol': symbol,
2015
2015
  'maker': self.safe_number(fee, 'maker_fee_rate'),
2016
2016
  'taker': self.safe_number(fee, 'taker_fee_rate'),
2017
+ 'percentage': None,
2018
+ 'tierBased': None,
2017
2019
  }
2018
2020
 
2019
- def fetch_trading_fee(self, symbol: str, params={}):
2021
+ def fetch_trading_fee(self, symbol: str, params={}) -> TradingFeeInterface:
2020
2022
  """
2021
2023
  fetch the trading fees for a market
2022
2024
  :param str symbol: unified market symbol
ccxt/bitmex.py CHANGED
@@ -6,7 +6,7 @@
6
6
  from ccxt.base.exchange import Exchange
7
7
  from ccxt.abstract.bitmex import ImplicitAPI
8
8
  import hashlib
9
- from ccxt.base.types import Balances, Currency, Int, Leverage, Leverages, Market, MarketType, Num, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, Transaction
9
+ from ccxt.base.types import Balances, Currencies, Currency, Int, Leverage, Leverages, Market, MarketType, 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
@@ -290,7 +290,7 @@ class bitmex(Exchange, ImplicitAPI):
290
290
  },
291
291
  })
292
292
 
293
- def fetch_currencies(self, params={}):
293
+ def fetch_currencies(self, params={}) -> Currencies:
294
294
  """
295
295
  fetches all available currencies on an exchange
296
296
  :see: https://www.bitmex.com/api/explorer/#not /Wallet/Wallet_getAssetsConfig
ccxt/bitopro.py CHANGED
@@ -7,7 +7,7 @@ from ccxt.base.exchange import Exchange
7
7
  from ccxt.abstract.bitopro import ImplicitAPI
8
8
  import hashlib
9
9
  import math
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 ArgumentsRequired
@@ -220,7 +220,7 @@ class bitopro(Exchange, ImplicitAPI):
220
220
  },
221
221
  })
222
222
 
223
- def fetch_currencies(self, params={}):
223
+ def fetch_currencies(self, params={}) -> Currencies:
224
224
  """
225
225
  fetches all available currencies on an exchange
226
226
  :see: https://github.com/bitoex/bitopro-offical-api-docs/blob/master/api/v3/public/get_currency_info.md
@@ -617,7 +617,7 @@ class bitopro(Exchange, ImplicitAPI):
617
617
  #
618
618
  return self.parse_trades(trades, market, since, limit)
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://github.com/bitoex/bitopro-offical-api-docs/blob/master/api/v3/public/get_limitations_and_fees.md
ccxt/bitrue.py CHANGED
@@ -7,7 +7,7 @@ from ccxt.base.exchange import Exchange
7
7
  from ccxt.abstract.bitrue import ImplicitAPI
8
8
  import hashlib
9
9
  import json
10
- from ccxt.base.types import Balances, Currency, Int, MarginModification, Market, Num, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, Transaction, TransferEntry
10
+ from ccxt.base.types import Balances, Currencies, Currency, Int, MarginModification, Market, Num, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, Transaction, TransferEntry
11
11
  from typing import List
12
12
  from ccxt.base.errors import ExchangeError
13
13
  from ccxt.base.errors import PermissionDenied
@@ -592,7 +592,7 @@ class bitrue(Exchange, ImplicitAPI):
592
592
  }
593
593
  return self.safe_string_2(networksById, networkId, uppercaseNetworkId, networkId)
594
594
 
595
- def fetch_currencies(self, params={}):
595
+ def fetch_currencies(self, params={}) -> Currencies:
596
596
  """
597
597
  fetches all available currencies on an exchange
598
598
  :param dict [params]: extra parameters specific to the exchange API endpoint
ccxt/bitso.py CHANGED
@@ -6,7 +6,7 @@
6
6
  from ccxt.base.exchange import Exchange
7
7
  from ccxt.abstract.bitso import ImplicitAPI
8
8
  import hashlib
9
- from ccxt.base.types import Balances, Currency, Int, Market, Num, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Trade, Transaction
9
+ from ccxt.base.types import Balances, Currency, Int, Market, Num, Order, OrderBook, OrderSide, OrderType, Str, Strings, 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 ArgumentsRequired
@@ -814,7 +814,7 @@ class bitso(Exchange, ImplicitAPI):
814
814
  response = self.publicGetTrades(self.extend(request, params))
815
815
  return self.parse_trades(response['payload'], market, since, limit)
816
816
 
817
- def fetch_trading_fees(self, params={}):
817
+ def fetch_trading_fees(self, params={}) -> TradingFees:
818
818
  """
819
819
  fetch the trading fees for multiple markets
820
820
  :see: https://docs.bitso.com/bitso-api/docs/list-fees