ccxt 4.1.54__py2.py3-none-any.whl → 4.1.56__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 (251) hide show
  1. ccxt/__init__.py +2 -2
  2. ccxt/abstract/binance.py +1 -0
  3. ccxt/abstract/binancecoinm.py +1 -0
  4. ccxt/abstract/binanceus.py +1 -0
  5. ccxt/abstract/binanceusdm.py +1 -0
  6. ccxt/abstract/bitbank.py +1 -0
  7. ccxt/abstract/coinbase.py +2 -0
  8. ccxt/abstract/htx.py +3 -0
  9. ccxt/abstract/huobi.py +3 -0
  10. ccxt/abstract/huobipro.py +3 -0
  11. ccxt/abstract/okex.py +3 -1
  12. ccxt/abstract/okex5.py +3 -1
  13. ccxt/abstract/okx.py +3 -1
  14. ccxt/ace.py +23 -23
  15. ccxt/alpaca.py +8 -8
  16. ccxt/ascendex.py +26 -26
  17. ccxt/async_support/__init__.py +2 -2
  18. ccxt/async_support/ace.py +23 -23
  19. ccxt/async_support/alpaca.py +8 -8
  20. ccxt/async_support/ascendex.py +26 -26
  21. ccxt/async_support/base/exchange.py +4 -2216
  22. ccxt/async_support/bigone.py +21 -24
  23. ccxt/async_support/binance.py +61 -54
  24. ccxt/async_support/bingx.py +28 -28
  25. ccxt/async_support/bit2c.py +9 -9
  26. ccxt/async_support/bitbank.py +11 -10
  27. ccxt/async_support/bitbns.py +11 -11
  28. ccxt/async_support/bitfinex.py +15 -15
  29. ccxt/async_support/bitfinex2.py +22 -22
  30. ccxt/async_support/bitflyer.py +13 -13
  31. ccxt/async_support/bitforex.py +10 -10
  32. ccxt/async_support/bitget.py +44 -44
  33. ccxt/async_support/bithumb.py +9 -9
  34. ccxt/async_support/bitmart.py +85 -104
  35. ccxt/async_support/bitmex.py +27 -27
  36. ccxt/async_support/bitopro.py +18 -18
  37. ccxt/async_support/bitpanda.py +18 -18
  38. ccxt/async_support/bitrue.py +14 -14
  39. ccxt/async_support/bitso.py +17 -17
  40. ccxt/async_support/bitstamp.py +17 -17
  41. ccxt/async_support/bittrex.py +22 -24
  42. ccxt/async_support/bitvavo.py +15 -15
  43. ccxt/async_support/bl3p.py +4 -4
  44. ccxt/async_support/blockchaincom.py +17 -17
  45. ccxt/async_support/btcalpha.py +14 -14
  46. ccxt/async_support/btcbox.py +9 -9
  47. ccxt/async_support/btcmarkets.py +17 -17
  48. ccxt/async_support/btcturk.py +9 -9
  49. ccxt/async_support/bybit.py +46 -46
  50. ccxt/async_support/cex.py +10 -10
  51. ccxt/async_support/coinbase.py +69 -25
  52. ccxt/async_support/coinbasepro.py +19 -19
  53. ccxt/async_support/coincheck.py +10 -10
  54. ccxt/async_support/coinex.py +57 -66
  55. ccxt/async_support/coinlist.py +22 -22
  56. ccxt/async_support/coinmate.py +10 -10
  57. ccxt/async_support/coinone.py +10 -10
  58. ccxt/async_support/coinsph.py +17 -17
  59. ccxt/async_support/coinspot.py +5 -5
  60. ccxt/async_support/cryptocom.py +27 -27
  61. ccxt/async_support/currencycom.py +18 -18
  62. ccxt/async_support/delta.py +21 -21
  63. ccxt/async_support/deribit.py +24 -24
  64. ccxt/async_support/digifinex.py +35 -35
  65. ccxt/async_support/exmo.py +19 -19
  66. ccxt/async_support/gate.py +38 -38
  67. ccxt/async_support/gemini.py +11 -11
  68. ccxt/async_support/hitbtc.py +27 -27
  69. ccxt/async_support/hollaex.py +19 -19
  70. ccxt/async_support/htx.py +47 -44
  71. ccxt/async_support/huobijp.py +22 -22
  72. ccxt/async_support/idex.py +20 -20
  73. ccxt/async_support/independentreserve.py +9 -9
  74. ccxt/async_support/indodax.py +10 -10
  75. ccxt/async_support/kraken.py +25 -25
  76. ccxt/async_support/krakenfutures.py +17 -17
  77. ccxt/async_support/kucoin.py +27 -27
  78. ccxt/async_support/kucoinfutures.py +20 -20
  79. ccxt/async_support/kuna.py +19 -19
  80. ccxt/async_support/latoken.py +14 -14
  81. ccxt/async_support/lbank.py +18 -18
  82. ccxt/async_support/luno.py +14 -14
  83. ccxt/async_support/lykke.py +12 -12
  84. ccxt/async_support/mercado.py +11 -11
  85. ccxt/async_support/mexc.py +36 -36
  86. ccxt/async_support/ndax.py +18 -18
  87. ccxt/async_support/novadax.py +17 -17
  88. ccxt/async_support/oceanex.py +12 -12
  89. ccxt/async_support/okcoin.py +19 -19
  90. ccxt/async_support/okx.py +48 -45
  91. ccxt/async_support/p2b.py +6 -6
  92. ccxt/async_support/paymium.py +6 -6
  93. ccxt/async_support/phemex.py +57 -57
  94. ccxt/async_support/poloniex.py +31 -30
  95. ccxt/async_support/poloniexfutures.py +16 -16
  96. ccxt/async_support/probit.py +22 -22
  97. ccxt/async_support/tidex.py +15 -15
  98. ccxt/async_support/timex.py +20 -20
  99. ccxt/async_support/tokocrypto.py +16 -16
  100. ccxt/async_support/upbit.py +15 -15
  101. ccxt/async_support/wavesexchange.py +12 -12
  102. ccxt/async_support/wazirx.py +13 -13
  103. ccxt/async_support/whitebit.py +26 -26
  104. ccxt/async_support/woo.py +47 -47
  105. ccxt/async_support/yobit.py +8 -8
  106. ccxt/async_support/zaif.py +10 -10
  107. ccxt/async_support/zonda.py +16 -16
  108. ccxt/base/errors.py +17 -16
  109. ccxt/base/exchange.py +57 -97
  110. ccxt/base/types.py +138 -139
  111. ccxt/bigone.py +21 -24
  112. ccxt/binance.py +61 -54
  113. ccxt/bingx.py +28 -28
  114. ccxt/bit2c.py +9 -9
  115. ccxt/bitbank.py +11 -10
  116. ccxt/bitbns.py +11 -11
  117. ccxt/bitfinex.py +15 -15
  118. ccxt/bitfinex2.py +22 -22
  119. ccxt/bitflyer.py +13 -13
  120. ccxt/bitforex.py +10 -10
  121. ccxt/bitget.py +44 -44
  122. ccxt/bithumb.py +9 -9
  123. ccxt/bitmart.py +85 -104
  124. ccxt/bitmex.py +27 -27
  125. ccxt/bitopro.py +18 -18
  126. ccxt/bitpanda.py +18 -18
  127. ccxt/bitrue.py +14 -14
  128. ccxt/bitso.py +17 -17
  129. ccxt/bitstamp.py +17 -17
  130. ccxt/bittrex.py +22 -24
  131. ccxt/bitvavo.py +15 -15
  132. ccxt/bl3p.py +4 -4
  133. ccxt/blockchaincom.py +17 -17
  134. ccxt/btcalpha.py +14 -14
  135. ccxt/btcbox.py +9 -9
  136. ccxt/btcmarkets.py +17 -17
  137. ccxt/btcturk.py +9 -9
  138. ccxt/bybit.py +46 -46
  139. ccxt/cex.py +10 -10
  140. ccxt/coinbase.py +69 -25
  141. ccxt/coinbasepro.py +19 -19
  142. ccxt/coincheck.py +10 -10
  143. ccxt/coinex.py +57 -66
  144. ccxt/coinlist.py +22 -22
  145. ccxt/coinmate.py +10 -10
  146. ccxt/coinone.py +10 -10
  147. ccxt/coinsph.py +17 -17
  148. ccxt/coinspot.py +5 -5
  149. ccxt/cryptocom.py +27 -27
  150. ccxt/currencycom.py +18 -18
  151. ccxt/delta.py +21 -21
  152. ccxt/deribit.py +24 -24
  153. ccxt/digifinex.py +35 -35
  154. ccxt/exmo.py +19 -19
  155. ccxt/gate.py +38 -38
  156. ccxt/gemini.py +11 -11
  157. ccxt/hitbtc.py +27 -27
  158. ccxt/hollaex.py +19 -19
  159. ccxt/htx.py +47 -44
  160. ccxt/huobijp.py +22 -22
  161. ccxt/idex.py +20 -20
  162. ccxt/independentreserve.py +9 -9
  163. ccxt/indodax.py +10 -10
  164. ccxt/kraken.py +25 -25
  165. ccxt/krakenfutures.py +17 -17
  166. ccxt/kucoin.py +27 -27
  167. ccxt/kucoinfutures.py +20 -20
  168. ccxt/kuna.py +19 -19
  169. ccxt/latoken.py +14 -14
  170. ccxt/lbank.py +18 -18
  171. ccxt/luno.py +14 -14
  172. ccxt/lykke.py +12 -12
  173. ccxt/mercado.py +11 -11
  174. ccxt/mexc.py +36 -36
  175. ccxt/ndax.py +18 -18
  176. ccxt/novadax.py +17 -17
  177. ccxt/oceanex.py +12 -12
  178. ccxt/okcoin.py +19 -19
  179. ccxt/okx.py +48 -45
  180. ccxt/p2b.py +6 -6
  181. ccxt/paymium.py +6 -6
  182. ccxt/phemex.py +57 -57
  183. ccxt/poloniex.py +31 -30
  184. ccxt/poloniexfutures.py +16 -16
  185. ccxt/pro/__init__.py +1 -1
  186. ccxt/pro/alpaca.py +3 -3
  187. ccxt/pro/ascendex.py +2 -2
  188. ccxt/pro/binance.py +9 -9
  189. ccxt/pro/bingx.py +3 -3
  190. ccxt/pro/bitfinex.py +3 -3
  191. ccxt/pro/bitfinex2.py +3 -3
  192. ccxt/pro/bitget.py +3 -3
  193. ccxt/pro/bitmart.py +2 -2
  194. ccxt/pro/bitmex.py +3 -3
  195. ccxt/pro/bitpanda.py +3 -3
  196. ccxt/pro/bitrue.py +2 -2
  197. ccxt/pro/bitstamp.py +2 -2
  198. ccxt/pro/bittrex.py +3 -3
  199. ccxt/pro/bitvavo.py +3 -3
  200. ccxt/pro/blockchaincom.py +2 -2
  201. ccxt/pro/bybit.py +4 -4
  202. ccxt/pro/cex.py +3 -3
  203. ccxt/pro/coinbasepro.py +3 -3
  204. ccxt/pro/coinex.py +2 -2
  205. ccxt/pro/cryptocom.py +5 -5
  206. ccxt/pro/deribit.py +3 -3
  207. ccxt/pro/exmo.py +2 -2
  208. ccxt/pro/gate.py +3 -3
  209. ccxt/pro/gemini.py +2 -2
  210. ccxt/pro/hitbtc.py +4 -4
  211. ccxt/pro/hollaex.py +3 -3
  212. ccxt/pro/htx.py +3 -3
  213. ccxt/pro/idex.py +3 -3
  214. ccxt/pro/kraken.py +7 -7
  215. ccxt/pro/krakenfutures.py +4 -4
  216. ccxt/pro/kucoin.py +3 -3
  217. ccxt/pro/kucoinfutures.py +3 -3
  218. ccxt/pro/mexc.py +3 -3
  219. ccxt/pro/okcoin.py +2 -2
  220. ccxt/pro/okx.py +6 -6
  221. ccxt/pro/phemex.py +3 -3
  222. ccxt/pro/poloniex.py +3 -3
  223. ccxt/pro/poloniexfutures.py +3 -3
  224. ccxt/pro/probit.py +3 -3
  225. ccxt/pro/wazirx.py +3 -3
  226. ccxt/pro/whitebit.py +3 -3
  227. ccxt/pro/woo.py +2 -2
  228. ccxt/probit.py +22 -22
  229. ccxt/test/base/test_shared_methods.py +3 -3
  230. ccxt/test/test_async.py +543 -535
  231. ccxt/test/test_sync.py +542 -534
  232. ccxt/tidex.py +15 -15
  233. ccxt/timex.py +20 -20
  234. ccxt/tokocrypto.py +16 -16
  235. ccxt/upbit.py +15 -15
  236. ccxt/wavesexchange.py +12 -12
  237. ccxt/wazirx.py +13 -13
  238. ccxt/whitebit.py +26 -26
  239. ccxt/woo.py +47 -47
  240. ccxt/yobit.py +8 -8
  241. ccxt/zaif.py +10 -10
  242. ccxt/zonda.py +16 -16
  243. {ccxt-4.1.54.dist-info → ccxt-4.1.56.dist-info}/METADATA +10 -8
  244. ccxt-4.1.56.dist-info/RECORD +449 -0
  245. ccxt/async_support/bitstamp1.py +0 -402
  246. ccxt/async_support/lbank2.py +0 -2620
  247. ccxt/bitstamp1.py +0 -402
  248. ccxt/lbank2.py +0 -2619
  249. ccxt-4.1.54.dist-info/RECORD +0 -453
  250. {ccxt-4.1.54.dist-info → ccxt-4.1.56.dist-info}/WHEEL +0 -0
  251. {ccxt-4.1.54.dist-info → ccxt-4.1.56.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, Int, Order, OrderBook, OrderSide, OrderType, String, Strings, Ticker, Tickers, Trade, Transaction
8
+ from ccxt.base.types import Balances, Currency, Int, Market, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, Transaction
9
9
  from typing import List
10
10
  from ccxt.base.errors import ExchangeError
11
11
  from ccxt.base.errors import ArgumentsRequired
@@ -389,7 +389,7 @@ class blockchaincom(Exchange, ImplicitAPI):
389
389
  response = self.publicGetL2Symbol(self.extend(request, params))
390
390
  return self.parse_order_book(response, market['symbol'], None, 'bids', 'asks', 'px', 'qty')
391
391
 
392
- def parse_ticker(self, ticker, market=None) -> Ticker:
392
+ def parse_ticker(self, ticker, market: Market = None) -> Ticker:
393
393
  #
394
394
  # {
395
395
  # "symbol": "BTC-USD",
@@ -463,7 +463,7 @@ class blockchaincom(Exchange, ImplicitAPI):
463
463
  }
464
464
  return self.safe_string(states, state, state)
465
465
 
466
- def parse_order(self, order, market=None) -> Order:
466
+ def parse_order(self, order, market: Market = None) -> Order:
467
467
  #
468
468
  # {
469
469
  # "clOrdId": "00001",
@@ -570,7 +570,7 @@ class blockchaincom(Exchange, ImplicitAPI):
570
570
  response = self.privatePostOrders(self.extend(request, params))
571
571
  return self.parse_order(response, market)
572
572
 
573
- def cancel_order(self, id: str, symbol: String = None, params={}):
573
+ def cancel_order(self, id: str, symbol: Str = None, params={}):
574
574
  """
575
575
  cancels an open order
576
576
  :param str id: order id
@@ -587,7 +587,7 @@ class blockchaincom(Exchange, ImplicitAPI):
587
587
  'info': response,
588
588
  }
589
589
 
590
- def cancel_all_orders(self, symbol: String = None, params={}):
590
+ def cancel_all_orders(self, symbol: Str = None, params={}):
591
591
  """
592
592
  cancel all open orders
593
593
  :param str symbol: unified market symbol of the market to cancel orders in, all markets are used if None, default is None
@@ -637,7 +637,7 @@ class blockchaincom(Exchange, ImplicitAPI):
637
637
  }
638
638
  return result
639
639
 
640
- def fetch_canceled_orders(self, symbol: String = None, since: Int = None, limit: Int = None, params={}):
640
+ def fetch_canceled_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
641
641
  """
642
642
  fetches information on multiple canceled orders made by the user
643
643
  :param str symbol: unified market symbol of the market orders were made in
@@ -649,7 +649,7 @@ class blockchaincom(Exchange, ImplicitAPI):
649
649
  state = 'CANCELED'
650
650
  return self.fetch_orders_by_state(state, symbol, since, limit, params)
651
651
 
652
- def fetch_closed_orders(self, symbol: String = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
652
+ def fetch_closed_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
653
653
  """
654
654
  fetches information on multiple closed orders made by the user
655
655
  :param str symbol: unified market symbol of the market orders were made in
@@ -661,7 +661,7 @@ class blockchaincom(Exchange, ImplicitAPI):
661
661
  state = 'FILLED'
662
662
  return self.fetch_orders_by_state(state, symbol, since, limit, params)
663
663
 
664
- def fetch_open_orders(self, symbol: String = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
664
+ def fetch_open_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
665
665
  """
666
666
  fetch all unfilled currently open orders
667
667
  :param str symbol: unified market symbol
@@ -673,7 +673,7 @@ class blockchaincom(Exchange, ImplicitAPI):
673
673
  state = 'OPEN'
674
674
  return self.fetch_orders_by_state(state, symbol, since, limit, params)
675
675
 
676
- def fetch_orders_by_state(self, state, symbol: String = None, since: Int = None, limit: Int = None, params={}):
676
+ def fetch_orders_by_state(self, state, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
677
677
  self.load_markets()
678
678
  request = {
679
679
  # 'to': unix epoch ms
@@ -688,7 +688,7 @@ class blockchaincom(Exchange, ImplicitAPI):
688
688
  response = self.privateGetOrders(self.extend(request, params))
689
689
  return self.parse_orders(response, market, since, limit)
690
690
 
691
- def parse_trade(self, trade, market=None) -> Trade:
691
+ def parse_trade(self, trade, market: Market = None) -> Trade:
692
692
  #
693
693
  # {
694
694
  # "exOrdId":281685751028507,
@@ -733,7 +733,7 @@ class blockchaincom(Exchange, ImplicitAPI):
733
733
  'info': trade,
734
734
  }, market)
735
735
 
736
- def fetch_my_trades(self, symbol: String = None, since: Int = None, limit: Int = None, params={}):
736
+ def fetch_my_trades(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
737
737
  """
738
738
  fetch all trades made by the user
739
739
  :param str symbol: unified market symbol
@@ -789,7 +789,7 @@ class blockchaincom(Exchange, ImplicitAPI):
789
789
  }
790
790
  return self.safe_string(states, state, state)
791
791
 
792
- def parse_transaction(self, transaction, currency=None) -> Transaction:
792
+ def parse_transaction(self, transaction, currency: Currency = None) -> Transaction:
793
793
  #
794
794
  # deposit
795
795
  #
@@ -926,7 +926,7 @@ class blockchaincom(Exchange, ImplicitAPI):
926
926
  #
927
927
  return self.parse_transaction(response, currency)
928
928
 
929
- def fetch_withdrawals(self, code: String = None, since: Int = None, limit: Int = None, params={}) -> List[Transaction]:
929
+ def fetch_withdrawals(self, code: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Transaction]:
930
930
  """
931
931
  fetch all withdrawals made from an account
932
932
  :param str code: unified currency code
@@ -948,7 +948,7 @@ class blockchaincom(Exchange, ImplicitAPI):
948
948
  response = self.privateGetWithdrawals(self.extend(request, params))
949
949
  return self.parse_transactions(response, currency, since, limit)
950
950
 
951
- def fetch_withdrawal(self, id: str, code: String = None, params={}):
951
+ def fetch_withdrawal(self, id: str, code: Str = None, params={}):
952
952
  """
953
953
  fetch data on a currency withdrawal via the withdrawal id
954
954
  :param str id: withdrawal id
@@ -963,7 +963,7 @@ class blockchaincom(Exchange, ImplicitAPI):
963
963
  response = self.privateGetWithdrawalsWithdrawalId(self.extend(request, params))
964
964
  return self.parse_transaction(response)
965
965
 
966
- def fetch_deposits(self, code: String = None, since: Int = None, limit: Int = None, params={}) -> List[Transaction]:
966
+ def fetch_deposits(self, code: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Transaction]:
967
967
  """
968
968
  fetch all deposits made to an account
969
969
  :param str code: unified currency code
@@ -985,7 +985,7 @@ class blockchaincom(Exchange, ImplicitAPI):
985
985
  response = self.privateGetDeposits(self.extend(request, params))
986
986
  return self.parse_transactions(response, currency, since, limit)
987
987
 
988
- def fetch_deposit(self, id: str, code: String = None, params={}):
988
+ def fetch_deposit(self, id: str, code: Str = None, params={}):
989
989
  """
990
990
  fetch information on a deposit
991
991
  :param str id: deposit id
@@ -1043,7 +1043,7 @@ class blockchaincom(Exchange, ImplicitAPI):
1043
1043
  result[code] = account
1044
1044
  return self.safe_balance(result)
1045
1045
 
1046
- def fetch_order(self, id: str, symbol: String = None, params={}):
1046
+ def fetch_order(self, id: str, symbol: Str = None, params={}):
1047
1047
  """
1048
1048
  fetches information on an order made by the user
1049
1049
  :param str symbol: not used by blockchaincom fetchOrder
ccxt/btcalpha.py CHANGED
@@ -6,7 +6,7 @@
6
6
  from ccxt.base.exchange import Exchange
7
7
  from ccxt.abstract.btcalpha import ImplicitAPI
8
8
  import hashlib
9
- from ccxt.base.types import Balances, Int, Market, Order, OrderBook, OrderSide, OrderType, String, Strings, Ticker, Tickers, Trade, Transaction
9
+ from ccxt.base.types import Balances, Currency, Int, Market, 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 InsufficientFunds
@@ -291,7 +291,7 @@ class btcalpha(Exchange, ImplicitAPI):
291
291
  #
292
292
  return self.parse_ticker(response, market)
293
293
 
294
- def parse_ticker(self, ticker, market=None) -> Ticker:
294
+ def parse_ticker(self, ticker, market: Market = None) -> Ticker:
295
295
  #
296
296
  # {
297
297
  # "timestamp": "1674658.445272",
@@ -361,7 +361,7 @@ class btcalpha(Exchange, ImplicitAPI):
361
361
  result.append(self.parse_bid_ask(bidask, priceKey, amountKey))
362
362
  return result
363
363
 
364
- def parse_trade(self, trade, market=None) -> Trade:
364
+ def parse_trade(self, trade, market: Market = None) -> Trade:
365
365
  #
366
366
  # fetchTrades(public)
367
367
  #
@@ -430,7 +430,7 @@ class btcalpha(Exchange, ImplicitAPI):
430
430
  trades = self.publicGetExchanges(self.extend(request, params))
431
431
  return self.parse_trades(trades, market, since, limit)
432
432
 
433
- def fetch_deposits(self, code: String = None, since: Int = None, limit: Int = None, params={}) -> List[Transaction]:
433
+ def fetch_deposits(self, code: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Transaction]:
434
434
  """
435
435
  fetch all deposits made to an account
436
436
  :param str code: unified currency code
@@ -456,7 +456,7 @@ class btcalpha(Exchange, ImplicitAPI):
456
456
  #
457
457
  return self.parse_transactions(response, currency, since, limit, {'type': 'deposit'})
458
458
 
459
- def fetch_withdrawals(self, code: String = None, since: Int = None, limit: Int = None, params={}) -> List[Transaction]:
459
+ def fetch_withdrawals(self, code: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Transaction]:
460
460
  """
461
461
  fetch all withdrawals made from an account
462
462
  :param str code: unified currency code
@@ -485,7 +485,7 @@ class btcalpha(Exchange, ImplicitAPI):
485
485
  #
486
486
  return self.parse_transactions(response, currency, since, limit, {'type': 'withdrawal'})
487
487
 
488
- def parse_transaction(self, transaction, currency=None) -> Transaction:
488
+ def parse_transaction(self, transaction, currency: Currency = None) -> Transaction:
489
489
  #
490
490
  # deposit
491
491
  # {
@@ -540,7 +540,7 @@ class btcalpha(Exchange, ImplicitAPI):
540
540
  }
541
541
  return self.safe_string(statuses, status, status)
542
542
 
543
- def parse_ohlcv(self, ohlcv, market=None) -> list:
543
+ def parse_ohlcv(self, ohlcv, market: Market = None) -> list:
544
544
  #
545
545
  # {
546
546
  # "time":1591296000,
@@ -620,7 +620,7 @@ class btcalpha(Exchange, ImplicitAPI):
620
620
  }
621
621
  return self.safe_string(statuses, status, status)
622
622
 
623
- def parse_order(self, order, market=None) -> Order:
623
+ def parse_order(self, order, market: Market = None) -> Order:
624
624
  #
625
625
  # fetchClosedOrders / fetchOrder
626
626
  # {
@@ -722,7 +722,7 @@ class btcalpha(Exchange, ImplicitAPI):
722
722
  order['amount'] = self.parse_number(amount)
723
723
  return order
724
724
 
725
- def cancel_order(self, id: str, symbol: String = None, params={}):
725
+ def cancel_order(self, id: str, symbol: Str = None, params={}):
726
726
  """
727
727
  :see: https://btc-alpha.github.io/api-docs/#cancel-order
728
728
  cancels an open order
@@ -737,7 +737,7 @@ class btcalpha(Exchange, ImplicitAPI):
737
737
  response = self.privatePostOrderCancel(self.extend(request, params))
738
738
  return response
739
739
 
740
- def fetch_order(self, id: str, symbol: String = None, params={}):
740
+ def fetch_order(self, id: str, symbol: Str = None, params={}):
741
741
  """
742
742
  :see: https://btc-alpha.github.io/api-docs/#retrieve-single-order
743
743
  fetches information on an order made by the user
@@ -752,7 +752,7 @@ class btcalpha(Exchange, ImplicitAPI):
752
752
  order = self.privateGetOrderId(self.extend(request, params))
753
753
  return self.parse_order(order)
754
754
 
755
- def fetch_orders(self, symbol: String = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
755
+ def fetch_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
756
756
  """
757
757
  :see: https://btc-alpha.github.io/api-docs/#list-own-orders
758
758
  fetches information on multiple orders made by the user
@@ -773,7 +773,7 @@ class btcalpha(Exchange, ImplicitAPI):
773
773
  orders = self.privateGetOrdersOwn(self.extend(request, params))
774
774
  return self.parse_orders(orders, market, since, limit)
775
775
 
776
- def fetch_open_orders(self, symbol: String = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
776
+ def fetch_open_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
777
777
  """
778
778
  fetch all unfilled currently open orders
779
779
  :param str symbol: unified market symbol
@@ -787,7 +787,7 @@ class btcalpha(Exchange, ImplicitAPI):
787
787
  }
788
788
  return self.fetch_orders(symbol, since, limit, self.extend(request, params))
789
789
 
790
- def fetch_closed_orders(self, symbol: String = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
790
+ def fetch_closed_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
791
791
  """
792
792
  fetches information on multiple closed orders made by the user
793
793
  :param str symbol: unified market symbol of the market orders were made in
@@ -801,7 +801,7 @@ class btcalpha(Exchange, ImplicitAPI):
801
801
  }
802
802
  return self.fetch_orders(symbol, since, limit, self.extend(request, params))
803
803
 
804
- def fetch_my_trades(self, symbol: String = None, since: Int = None, limit: Int = None, params={}):
804
+ def fetch_my_trades(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
805
805
  """
806
806
  fetch all trades made by the user
807
807
  :param str symbol: unified market symbol
ccxt/btcbox.py CHANGED
@@ -7,7 +7,7 @@ from ccxt.base.exchange import Exchange
7
7
  from ccxt.abstract.btcbox import ImplicitAPI
8
8
  import hashlib
9
9
  import json
10
- from ccxt.base.types import Balances, Int, Order, OrderBook, OrderSide, OrderType, String, Ticker, Trade
10
+ from ccxt.base.types import Balances, Int, Market, Order, OrderBook, OrderSide, OrderType, Str, Ticker, Trade
11
11
  from typing import List
12
12
  from ccxt.base.errors import ExchangeError
13
13
  from ccxt.base.errors import PermissionDenied
@@ -173,7 +173,7 @@ class btcbox(Exchange, ImplicitAPI):
173
173
  response = self.publicGetDepth(self.extend(request, params))
174
174
  return self.parse_order_book(response, market['symbol'])
175
175
 
176
- def parse_ticker(self, ticker, market=None) -> Ticker:
176
+ def parse_ticker(self, ticker, market: Market = None) -> Ticker:
177
177
  timestamp = self.milliseconds()
178
178
  symbol = self.safe_symbol(None, market)
179
179
  last = self.safe_string(ticker, 'last')
@@ -216,7 +216,7 @@ class btcbox(Exchange, ImplicitAPI):
216
216
  response = self.publicGetTicker(self.extend(request, params))
217
217
  return self.parse_ticker(response, market)
218
218
 
219
- def parse_trade(self, trade, market=None) -> Trade:
219
+ def parse_trade(self, trade, market: Market = None) -> Trade:
220
220
  #
221
221
  # fetchTrades(public)
222
222
  #
@@ -308,7 +308,7 @@ class btcbox(Exchange, ImplicitAPI):
308
308
  #
309
309
  return self.parse_order(response, market)
310
310
 
311
- def cancel_order(self, id: str, symbol: String = None, params={}):
311
+ def cancel_order(self, id: str, symbol: Str = None, params={}):
312
312
  """
313
313
  cancels an open order
314
314
  :param str id: order id
@@ -342,7 +342,7 @@ class btcbox(Exchange, ImplicitAPI):
342
342
  }
343
343
  return self.safe_string(statuses, status, status)
344
344
 
345
- def parse_order(self, order, market=None) -> Order:
345
+ def parse_order(self, order, market: Market = None) -> Order:
346
346
  #
347
347
  # {
348
348
  # "id":11,
@@ -397,7 +397,7 @@ class btcbox(Exchange, ImplicitAPI):
397
397
  'average': None,
398
398
  }, market)
399
399
 
400
- def fetch_order(self, id: str, symbol: String = None, params={}):
400
+ def fetch_order(self, id: str, symbol: Str = None, params={}):
401
401
  """
402
402
  fetches information on an order made by the user
403
403
  :param str symbol: unified symbol of the market the order was made in
@@ -428,7 +428,7 @@ class btcbox(Exchange, ImplicitAPI):
428
428
  #
429
429
  return self.parse_order(response, market)
430
430
 
431
- def fetch_orders_by_type(self, type, symbol: String = None, since: Int = None, limit: Int = None, params={}):
431
+ def fetch_orders_by_type(self, type, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
432
432
  self.load_markets()
433
433
  # a special case for btcbox – default symbol is BTC/JPY
434
434
  if symbol is None:
@@ -459,7 +459,7 @@ class btcbox(Exchange, ImplicitAPI):
459
459
  orders[i]['status'] = 'open'
460
460
  return orders
461
461
 
462
- def fetch_orders(self, symbol: String = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
462
+ def fetch_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
463
463
  """
464
464
  fetches information on multiple orders made by the user
465
465
  :param str symbol: unified market symbol of the market orders were made in
@@ -470,7 +470,7 @@ class btcbox(Exchange, ImplicitAPI):
470
470
  """
471
471
  return self.fetch_orders_by_type('all', symbol, since, limit, params)
472
472
 
473
- def fetch_open_orders(self, symbol: String = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
473
+ def fetch_open_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
474
474
  """
475
475
  fetch all unfilled currently open orders
476
476
  :param str symbol: unified market symbol
ccxt/btcmarkets.py CHANGED
@@ -6,7 +6,7 @@
6
6
  from ccxt.base.exchange import Exchange
7
7
  from ccxt.abstract.btcmarkets import ImplicitAPI
8
8
  import hashlib
9
- from ccxt.base.types import Balances, Int, Market, Order, OrderBook, OrderSide, OrderType, String, Ticker, Trade, Transaction
9
+ from ccxt.base.types import Balances, Currency, Int, Market, Order, OrderBook, OrderSide, OrderType, Str, Ticker, Trade, Transaction
10
10
  from typing import List
11
11
  from ccxt.base.errors import ExchangeError
12
12
  from ccxt.base.errors import ArgumentsRequired
@@ -178,7 +178,7 @@ class btcmarkets(Exchange, ImplicitAPI):
178
178
  },
179
179
  })
180
180
 
181
- def fetch_transactions_with_method(self, method, code: String = None, since: Int = None, limit: Int = None, params={}):
181
+ def fetch_transactions_with_method(self, method, code: Str = None, since: Int = None, limit: Int = None, params={}):
182
182
  self.load_markets()
183
183
  request = {}
184
184
  if limit is not None:
@@ -191,7 +191,7 @@ class btcmarkets(Exchange, ImplicitAPI):
191
191
  response = getattr(self, method)(self.extend(request, params))
192
192
  return self.parse_transactions(response, currency, since, limit)
193
193
 
194
- def fetch_deposits_withdrawals(self, code: String = None, since: Int = None, limit: Int = None, params={}) -> List[Transaction]:
194
+ def fetch_deposits_withdrawals(self, code: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Transaction]:
195
195
  """
196
196
  fetch history of deposits and withdrawals
197
197
  :param str [code]: unified currency code for the currency of the deposit/withdrawals, default is None
@@ -202,7 +202,7 @@ class btcmarkets(Exchange, ImplicitAPI):
202
202
  """
203
203
  return self.fetch_transactions_with_method('privateGetTransfers', code, since, limit, params)
204
204
 
205
- def fetch_deposits(self, code: String = None, since: Int = None, limit: Int = None, params={}) -> List[Transaction]:
205
+ def fetch_deposits(self, code: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Transaction]:
206
206
  """
207
207
  fetch all deposits made to an account
208
208
  :param str code: unified currency code
@@ -213,7 +213,7 @@ class btcmarkets(Exchange, ImplicitAPI):
213
213
  """
214
214
  return self.fetch_transactions_with_method('privateGetDeposits', code, since, limit, params)
215
215
 
216
- def fetch_withdrawals(self, code: String = None, since: Int = None, limit: Int = None, params={}) -> List[Transaction]:
216
+ def fetch_withdrawals(self, code: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Transaction]:
217
217
  """
218
218
  fetch all withdrawals made from an account
219
219
  :param str code: unified currency code
@@ -241,7 +241,7 @@ class btcmarkets(Exchange, ImplicitAPI):
241
241
  }
242
242
  return self.safe_string(statuses, type, type)
243
243
 
244
- def parse_transaction(self, transaction, currency=None) -> Transaction:
244
+ def parse_transaction(self, transaction, currency: Currency = None) -> Transaction:
245
245
  #
246
246
  # {
247
247
  # "id": "6500230339",
@@ -464,7 +464,7 @@ class btcmarkets(Exchange, ImplicitAPI):
464
464
  response = self.privateGetAccountsMeBalances(params)
465
465
  return self.parse_balance(response)
466
466
 
467
- def parse_ohlcv(self, ohlcv, market=None) -> list:
467
+ def parse_ohlcv(self, ohlcv, market: Market = None) -> list:
468
468
  #
469
469
  # [
470
470
  # "2020-09-12T18:30:00.000000Z",
@@ -554,7 +554,7 @@ class btcmarkets(Exchange, ImplicitAPI):
554
554
  orderbook['nonce'] = self.safe_integer(response, 'snapshotId')
555
555
  return orderbook
556
556
 
557
- def parse_ticker(self, ticker, market=None) -> Ticker:
557
+ def parse_ticker(self, ticker, market: Market = None) -> Ticker:
558
558
  #
559
559
  # fetchTicker
560
560
  #
@@ -643,7 +643,7 @@ class btcmarkets(Exchange, ImplicitAPI):
643
643
  response = self.publicGetMarketsMarketIdTicker(self.extend(request, params))
644
644
  return self.parse_ticker(response, market)
645
645
 
646
- def parse_trade(self, trade, market=None) -> Trade:
646
+ def parse_trade(self, trade, market: Market = None) -> Trade:
647
647
  #
648
648
  # public fetchTrades
649
649
  #
@@ -819,7 +819,7 @@ class btcmarkets(Exchange, ImplicitAPI):
819
819
  #
820
820
  return self.parse_order(response, market)
821
821
 
822
- def cancel_orders(self, ids, symbol: String = None, params={}):
822
+ def cancel_orders(self, ids, symbol: Str = None, params={}):
823
823
  """
824
824
  cancel multiple orders
825
825
  :param str[] ids: order ids
@@ -835,7 +835,7 @@ class btcmarkets(Exchange, ImplicitAPI):
835
835
  }
836
836
  return self.privateDeleteBatchordersIds(self.extend(request, params))
837
837
 
838
- def cancel_order(self, id: str, symbol: String = None, params={}):
838
+ def cancel_order(self, id: str, symbol: Str = None, params={}):
839
839
  """
840
840
  cancels an open order
841
841
  :param str id: order id
@@ -883,7 +883,7 @@ class btcmarkets(Exchange, ImplicitAPI):
883
883
  }
884
884
  return self.safe_string(statuses, status, status)
885
885
 
886
- def parse_order(self, order, market=None) -> Order:
886
+ def parse_order(self, order, market: Market = None) -> Order:
887
887
  #
888
888
  # createOrder
889
889
  #
@@ -948,7 +948,7 @@ class btcmarkets(Exchange, ImplicitAPI):
948
948
  'fee': None,
949
949
  }, market)
950
950
 
951
- def fetch_order(self, id: str, symbol: String = None, params={}):
951
+ def fetch_order(self, id: str, symbol: Str = None, params={}):
952
952
  """
953
953
  fetches information on an order made by the user
954
954
  :param str symbol: not used by btcmarkets fetchOrder
@@ -962,7 +962,7 @@ class btcmarkets(Exchange, ImplicitAPI):
962
962
  response = self.privateGetOrdersId(self.extend(request, params))
963
963
  return self.parse_order(response)
964
964
 
965
- def fetch_orders(self, symbol: String = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
965
+ def fetch_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
966
966
  """
967
967
  fetches information on multiple orders made by the user
968
968
  :param str symbol: unified market symbol of the market orders were made in
@@ -986,7 +986,7 @@ class btcmarkets(Exchange, ImplicitAPI):
986
986
  response = self.privateGetOrders(self.extend(request, params))
987
987
  return self.parse_orders(response, market, since, limit)
988
988
 
989
- def fetch_open_orders(self, symbol: String = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
989
+ def fetch_open_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
990
990
  """
991
991
  fetch all unfilled currently open orders
992
992
  :param str symbol: unified market symbol
@@ -998,7 +998,7 @@ class btcmarkets(Exchange, ImplicitAPI):
998
998
  request = {'status': 'open'}
999
999
  return self.fetch_orders(symbol, since, limit, self.extend(request, params))
1000
1000
 
1001
- def fetch_closed_orders(self, symbol: String = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
1001
+ def fetch_closed_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
1002
1002
  """
1003
1003
  fetches information on multiple closed orders made by the user
1004
1004
  :param str symbol: unified market symbol of the market orders were made in
@@ -1010,7 +1010,7 @@ class btcmarkets(Exchange, ImplicitAPI):
1010
1010
  orders = self.fetch_orders(symbol, since, limit, params)
1011
1011
  return self.filter_by(orders, 'status', 'closed')
1012
1012
 
1013
- def fetch_my_trades(self, symbol: String = None, since: Int = None, limit: Int = None, params={}):
1013
+ def fetch_my_trades(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
1014
1014
  """
1015
1015
  fetch all trades made by the user
1016
1016
  :param str symbol: unified market symbol
ccxt/btcturk.py CHANGED
@@ -7,7 +7,7 @@ from ccxt.base.exchange import Exchange
7
7
  from ccxt.abstract.btcturk import ImplicitAPI
8
8
  import hashlib
9
9
  import math
10
- from ccxt.base.types import Balances, Int, Market, Order, OrderBook, OrderSide, OrderType, String, Strings, Ticker, Tickers, Trade
10
+ from ccxt.base.types import Balances, Int, Market, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade
11
11
  from typing import List
12
12
  from ccxt.base.errors import ExchangeError
13
13
  from ccxt.base.errors import BadRequest
@@ -341,7 +341,7 @@ class btcturk(Exchange, ImplicitAPI):
341
341
  timestamp = self.safe_integer(data, 'timestamp')
342
342
  return self.parse_order_book(data, market['symbol'], timestamp, 'bids', 'asks', 0, 1)
343
343
 
344
- def parse_ticker(self, ticker, market=None) -> Ticker:
344
+ def parse_ticker(self, ticker, market: Market = None) -> Ticker:
345
345
  #
346
346
  # {
347
347
  # "pair": "BTCTRY",
@@ -413,7 +413,7 @@ class btcturk(Exchange, ImplicitAPI):
413
413
  tickers = self.fetch_tickers([symbol], params)
414
414
  return self.safe_value(tickers, symbol)
415
415
 
416
- def parse_trade(self, trade, market=None) -> Trade:
416
+ def parse_trade(self, trade, market: Market = None) -> Trade:
417
417
  #
418
418
  # fetchTrades
419
419
  # {
@@ -512,7 +512,7 @@ class btcturk(Exchange, ImplicitAPI):
512
512
  data = self.safe_value(response, 'data')
513
513
  return self.parse_trades(data, market, since, limit)
514
514
 
515
- def parse_ohlcv(self, ohlcv, market=None) -> list:
515
+ def parse_ohlcv(self, ohlcv, market: Market = None) -> list:
516
516
  #
517
517
  # {
518
518
  # "timestamp": 1661990400,
@@ -654,7 +654,7 @@ class btcturk(Exchange, ImplicitAPI):
654
654
  data = self.safe_value(response, 'data')
655
655
  return self.parse_order(data, market)
656
656
 
657
- def cancel_order(self, id: str, symbol: String = None, params={}):
657
+ def cancel_order(self, id: str, symbol: Str = None, params={}):
658
658
  """
659
659
  cancels an open order
660
660
  :param str id: order id
@@ -667,7 +667,7 @@ class btcturk(Exchange, ImplicitAPI):
667
667
  }
668
668
  return self.privateDeleteOrder(self.extend(request, params))
669
669
 
670
- def fetch_open_orders(self, symbol: String = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
670
+ def fetch_open_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
671
671
  """
672
672
  fetch all unfilled currently open orders
673
673
  :param str symbol: unified market symbol
@@ -688,7 +688,7 @@ class btcturk(Exchange, ImplicitAPI):
688
688
  asks = self.safe_value(data, 'asks', [])
689
689
  return self.parse_orders(self.array_concat(bids, asks), market, since, limit)
690
690
 
691
- def fetch_orders(self, symbol: String = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
691
+ def fetch_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
692
692
  """
693
693
  fetches information on multiple orders made by the user
694
694
  :param str symbol: unified market symbol of the market orders were made in
@@ -740,7 +740,7 @@ class btcturk(Exchange, ImplicitAPI):
740
740
  }
741
741
  return self.safe_string(statuses, status, status)
742
742
 
743
- def parse_order(self, order, market=None) -> Order:
743
+ def parse_order(self, order, market: Market = None) -> Order:
744
744
  #
745
745
  # fetchOrders / fetchOpenOrders
746
746
  # {
@@ -806,7 +806,7 @@ class btcturk(Exchange, ImplicitAPI):
806
806
  'fee': None,
807
807
  }, market)
808
808
 
809
- def fetch_my_trades(self, symbol: String = None, since: Int = None, limit: Int = None, params={}):
809
+ def fetch_my_trades(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
810
810
  """
811
811
  fetch all trades made by the user
812
812
  :param str symbol: unified market symbol