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
@@ -6,7 +6,7 @@
6
6
  from ccxt.async_support.base.exchange import Exchange
7
7
  from ccxt.abstract.zaif 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 BadRequest
@@ -282,7 +282,7 @@ class zaif(Exchange, ImplicitAPI):
282
282
  response = await self.publicGetDepthPair(self.extend(request, params))
283
283
  return self.parse_order_book(response, market['symbol'])
284
284
 
285
- def parse_ticker(self, ticker, market=None) -> Ticker:
285
+ def parse_ticker(self, ticker, market: Market = None) -> Ticker:
286
286
  #
287
287
  # {
288
288
  # "last": 9e-08,
@@ -350,7 +350,7 @@ class zaif(Exchange, ImplicitAPI):
350
350
  #
351
351
  return self.parse_ticker(ticker, market)
352
352
 
353
- def parse_trade(self, trade, market=None) -> Trade:
353
+ def parse_trade(self, trade, market: Market = None) -> Trade:
354
354
  #
355
355
  # fetchTrades(public)
356
356
  #
@@ -450,7 +450,7 @@ class zaif(Exchange, ImplicitAPI):
450
450
  'id': str(response['return']['order_id']),
451
451
  }, market)
452
452
 
453
- async def cancel_order(self, id: str, symbol: String = None, params={}):
453
+ async def cancel_order(self, id: str, symbol: Str = None, params={}):
454
454
  """
455
455
  :see: https://zaif-api-document.readthedocs.io/ja/latest/TradingAPI.html#id37
456
456
  cancels an open order
@@ -464,7 +464,7 @@ class zaif(Exchange, ImplicitAPI):
464
464
  }
465
465
  return await self.privatePostCancelOrder(self.extend(request, params))
466
466
 
467
- def parse_order(self, order, market=None) -> Order:
467
+ def parse_order(self, order, market: Market = None) -> Order:
468
468
  #
469
469
  # {
470
470
  # "currency_pair": "btc_jpy",
@@ -508,7 +508,7 @@ class zaif(Exchange, ImplicitAPI):
508
508
  'average': None,
509
509
  }, market)
510
510
 
511
- async def fetch_open_orders(self, symbol: String = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
511
+ async def fetch_open_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
512
512
  """
513
513
  :see: https://zaif-api-document.readthedocs.io/ja/latest/MarginTradingAPI.html#id28
514
514
  fetch all unfilled currently open orders
@@ -519,7 +519,7 @@ class zaif(Exchange, ImplicitAPI):
519
519
  :returns Order[]: a list of `order structures <https://github.com/ccxt/ccxt/wiki/Manual#order-structure>`
520
520
  """
521
521
  await self.load_markets()
522
- market = None
522
+ market: Market = None
523
523
  request = {
524
524
  # 'is_token': False,
525
525
  # 'is_token_both': False,
@@ -530,7 +530,7 @@ class zaif(Exchange, ImplicitAPI):
530
530
  response = await self.privatePostActiveOrders(self.extend(request, params))
531
531
  return self.parse_orders(response['return'], market, since, limit)
532
532
 
533
- async def fetch_closed_orders(self, symbol: String = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
533
+ async def fetch_closed_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
534
534
  """
535
535
  :see: https://zaif-api-document.readthedocs.io/ja/latest/TradingAPI.html#id24
536
536
  fetches information on multiple closed orders made by the user
@@ -541,7 +541,7 @@ class zaif(Exchange, ImplicitAPI):
541
541
  :returns Order[]: a list of `order structures <https://github.com/ccxt/ccxt/wiki/Manual#order-structure>`
542
542
  """
543
543
  await self.load_markets()
544
- market = None
544
+ market: Market = None
545
545
  request = {
546
546
  # 'from': 0,
547
547
  # 'count': 1000,
@@ -604,7 +604,7 @@ class zaif(Exchange, ImplicitAPI):
604
604
  returnData = self.safe_value(result, 'return')
605
605
  return self.parse_transaction(returnData, currency)
606
606
 
607
- def parse_transaction(self, transaction, currency=None) -> Transaction:
607
+ def parse_transaction(self, transaction, currency: Currency = None) -> Transaction:
608
608
  #
609
609
  # {
610
610
  # "id": 23634,
@@ -6,7 +6,7 @@
6
6
  from ccxt.async_support.base.exchange import Exchange
7
7
  from ccxt.abstract.zonda 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 PermissionDenied
@@ -405,7 +405,7 @@ class zonda(Exchange, ImplicitAPI):
405
405
  'info': item,
406
406
  }
407
407
 
408
- async def fetch_open_orders(self, symbol: String = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
408
+ async def fetch_open_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
409
409
  """
410
410
  :see: https://docs.zondacrypto.exchange/reference/active-orders
411
411
  fetch all unfilled currently open orders
@@ -421,7 +421,7 @@ class zonda(Exchange, ImplicitAPI):
421
421
  items = self.safe_value(response, 'items', [])
422
422
  return self.parse_orders(items, None, since, limit, {'status': 'open'})
423
423
 
424
- def parse_order(self, order, market=None) -> Order:
424
+ def parse_order(self, order, market: Market = None) -> Order:
425
425
  #
426
426
  # {
427
427
  # "market": "ETH-EUR",
@@ -471,7 +471,7 @@ class zonda(Exchange, ImplicitAPI):
471
471
  'trades': None,
472
472
  }, market)
473
473
 
474
- async def fetch_my_trades(self, symbol: String = None, since: Int = None, limit: Int = None, params={}):
474
+ async def fetch_my_trades(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
475
475
  """
476
476
  :see: https://docs.zondacrypto.exchange/reference/transactions-history
477
477
  fetch all trades made by the user
@@ -585,7 +585,7 @@ class zonda(Exchange, ImplicitAPI):
585
585
  'nonce': self.safe_integer(response, 'seqNo'),
586
586
  }
587
587
 
588
- def parse_ticker(self, ticker, market=None) -> Ticker:
588
+ def parse_ticker(self, ticker, market: Market = None) -> Ticker:
589
589
  #
590
590
  # version 1
591
591
  #
@@ -788,7 +788,7 @@ class zonda(Exchange, ImplicitAPI):
788
788
  items = self.safe_value(response, 'items')
789
789
  return self.parse_tickers(items, symbols)
790
790
 
791
- async def fetch_ledger(self, code: String = None, since: Int = None, limit: Int = None, params={}):
791
+ async def fetch_ledger(self, code: Str = None, since: Int = None, limit: Int = None, params={}):
792
792
  """
793
793
  :see: https://docs.zondacrypto.exchange/reference/operations-history
794
794
  fetch the history of changes, actions done by the user or operations that altered balance of the user
@@ -814,7 +814,7 @@ class zonda(Exchange, ImplicitAPI):
814
814
  items = response['items']
815
815
  return self.parse_ledger(items, None, since, limit)
816
816
 
817
- def parse_ledger_entry(self, item, currency=None):
817
+ def parse_ledger_entry(self, item, currency: Currency = None):
818
818
  #
819
819
  # FUNDS_MIGRATION
820
820
  # {
@@ -1132,7 +1132,7 @@ class zonda(Exchange, ImplicitAPI):
1132
1132
  }
1133
1133
  return self.safe_string(types, type, type)
1134
1134
 
1135
- def parse_ohlcv(self, ohlcv, market=None) -> list:
1135
+ def parse_ohlcv(self, ohlcv, market: Market = None) -> list:
1136
1136
  #
1137
1137
  # [
1138
1138
  # "1582399800000",
@@ -1200,7 +1200,7 @@ class zonda(Exchange, ImplicitAPI):
1200
1200
  items = self.safe_value(response, 'items', [])
1201
1201
  return self.parse_ohlcvs(items, market, timeframe, since, limit)
1202
1202
 
1203
- def parse_trade(self, trade, market=None) -> Trade:
1203
+ def parse_trade(self, trade, market: Market = None) -> Trade:
1204
1204
  #
1205
1205
  # createOrder trades
1206
1206
  #
@@ -1237,7 +1237,7 @@ class zonda(Exchange, ImplicitAPI):
1237
1237
  timestamp = self.safe_integer_2(trade, 'time', 't')
1238
1238
  side = self.safe_string_lower_2(trade, 'userAction', 'ty')
1239
1239
  wasTaker = self.safe_value(trade, 'wasTaker')
1240
- takerOrMaker = None
1240
+ takerOrMaker: Str = None
1241
1241
  if wasTaker is not None:
1242
1242
  takerOrMaker = 'taker' if wasTaker else 'maker'
1243
1243
  priceString = self.safe_string_2(trade, 'rate', 'r')
@@ -1255,7 +1255,7 @@ class zonda(Exchange, ImplicitAPI):
1255
1255
  }
1256
1256
  order = self.safe_string(trade, 'offerId')
1257
1257
  # todo: check self logic
1258
- type = None
1258
+ type: Str = None
1259
1259
  if order is not None:
1260
1260
  type = 'limit' if order else 'market'
1261
1261
  return self.safe_trade({
@@ -1420,7 +1420,7 @@ class zonda(Exchange, ImplicitAPI):
1420
1420
  'clientOrderId': None,
1421
1421
  })
1422
1422
 
1423
- async def cancel_order(self, id: str, symbol: String = None, params={}):
1423
+ async def cancel_order(self, id: str, symbol: Str = None, params={}):
1424
1424
  """
1425
1425
  :see: https://docs.zondacrypto.exchange/reference/cancel-order
1426
1426
  cancels an open order
@@ -1456,7 +1456,7 @@ class zonda(Exchange, ImplicitAPI):
1456
1456
  }
1457
1457
  return self.safe_value(fiatCurrencies, currency, False)
1458
1458
 
1459
- def parse_deposit_address(self, depositAddress, currency=None):
1459
+ def parse_deposit_address(self, depositAddress, currency: Currency = None):
1460
1460
  #
1461
1461
  # {
1462
1462
  # "address": "33u5YAEhQbYfjHHPsfMfCoSdEjfwYjVcBE",
@@ -1590,7 +1590,7 @@ class zonda(Exchange, ImplicitAPI):
1590
1590
  transfer['amount'] = amount
1591
1591
  return transfer
1592
1592
 
1593
- def parse_transfer(self, transfer, currency=None):
1593
+ def parse_transfer(self, transfer, currency: Currency = None):
1594
1594
  #
1595
1595
  # {
1596
1596
  # "status": "Ok",
@@ -1684,7 +1684,7 @@ class zonda(Exchange, ImplicitAPI):
1684
1684
  data = self.safe_value(response, 'data')
1685
1685
  return self.parse_transaction(data, currency)
1686
1686
 
1687
- def parse_transaction(self, transaction, currency=None) -> Transaction:
1687
+ def parse_transaction(self, transaction, currency: Currency = None) -> Transaction:
1688
1688
  #
1689
1689
  # withdraw
1690
1690
  #
@@ -1733,7 +1733,7 @@ class zonda(Exchange, ImplicitAPI):
1733
1733
  query = self.omit(params, self.extract_params(path))
1734
1734
  url += '/' + self.implode_params(path, params)
1735
1735
  nonce = str(self.milliseconds())
1736
- payload = None
1736
+ payload: Str = None
1737
1737
  if method != 'POST':
1738
1738
  if query:
1739
1739
  url += '?' + self.urlencode(query)
ccxt/base/errors.py CHANGED
@@ -32,16 +32,17 @@ error_hierarchy = {
32
32
  },
33
33
  'NotSupported': {},
34
34
  },
35
- 'NetworkError': {
36
- 'DDoSProtection': {
37
- 'RateLimitExceeded': {},
38
- },
39
- 'ExchangeNotAvailable': {
40
- 'OnMaintenance': {},
35
+ 'OperationFailed': {
36
+ 'NetworkError': {
37
+ 'DDoSProtection': {
38
+ 'RateLimitExceeded': {},
39
+ },
40
+ 'ExchangeNotAvailable': {
41
+ 'OnMaintenance': {},
42
+ },
43
+ 'InvalidNonce': {},
44
+ 'RequestTimeout': {},
41
45
  },
42
- 'InvalidNonce': {},
43
- 'RequestTimeout': {},
44
- 'OperationFailed': {},
45
46
  },
46
47
  },
47
48
  }
@@ -151,7 +152,11 @@ class NotSupported(ExchangeError):
151
152
  pass
152
153
 
153
154
 
154
- class NetworkError(BaseError):
155
+ class OperationFailed(BaseError):
156
+ pass
157
+
158
+
159
+ class NetworkError(OperationFailed):
155
160
  pass
156
161
 
157
162
 
@@ -179,10 +184,6 @@ class RequestTimeout(NetworkError):
179
184
  pass
180
185
 
181
186
 
182
- class OperationFailed(NetworkError):
183
- pass
184
-
185
-
186
187
  __all__ = [
187
188
  'error_hierarchy',
188
189
  'BaseError',
@@ -211,12 +212,12 @@ __all__ = [
211
212
  'DuplicateOrderId',
212
213
  'ContractUnavailable',
213
214
  'NotSupported',
215
+ 'OperationFailed',
214
216
  'NetworkError',
215
217
  'DDoSProtection',
216
218
  'RateLimitExceeded',
217
219
  'ExchangeNotAvailable',
218
220
  'OnMaintenance',
219
221
  'InvalidNonce',
220
- 'RequestTimeout',
221
- 'OperationFailed'
222
+ 'RequestTimeout'
222
223
  ]