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
@@ -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, Int, Order, OrderBook, OrderRequest, OrderSide, OrderType, String, Strings, Ticker, Tickers, Trade, Transaction
11
+ from ccxt.base.types import Balances, Currency, Int, Market, Order, OrderBook, OrderRequest, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, Transaction
12
12
  from typing import List
13
13
  from ccxt.base.errors import ExchangeError
14
14
  from ccxt.base.errors import PermissionDenied
@@ -1082,7 +1082,7 @@ class digifinex(Exchange, ImplicitAPI):
1082
1082
  result = self.extend({'date': date}, firstTicker)
1083
1083
  return self.parse_ticker(result, market)
1084
1084
 
1085
- def parse_ticker(self, ticker, market=None) -> Ticker:
1085
+ def parse_ticker(self, ticker, market: Market = None) -> Ticker:
1086
1086
  #
1087
1087
  # spot: fetchTicker, fetchTickers
1088
1088
  #
@@ -1152,7 +1152,7 @@ class digifinex(Exchange, ImplicitAPI):
1152
1152
  'info': ticker,
1153
1153
  }, market)
1154
1154
 
1155
- def parse_trade(self, trade, market=None) -> Trade:
1155
+ def parse_trade(self, trade, market: Market = None) -> Trade:
1156
1156
  #
1157
1157
  # spot: fetchTrades
1158
1158
  #
@@ -1385,7 +1385,7 @@ class digifinex(Exchange, ImplicitAPI):
1385
1385
  data = self.safe_value(response, 'data', [])
1386
1386
  return self.parse_trades(data, market, since, limit)
1387
1387
 
1388
- def parse_ohlcv(self, ohlcv, market=None) -> list:
1388
+ def parse_ohlcv(self, ohlcv, market: Market = None) -> list:
1389
1389
  #
1390
1390
  # [
1391
1391
  # 1556712900,
@@ -1705,7 +1705,7 @@ class digifinex(Exchange, ImplicitAPI):
1705
1705
  params = self.omit(params, ['postOnly'])
1706
1706
  return self.extend(request, params)
1707
1707
 
1708
- async def cancel_order(self, id: str, symbol: String = None, params={}):
1708
+ async def cancel_order(self, id: str, symbol: Str = None, params={}):
1709
1709
  """
1710
1710
  cancels an open order
1711
1711
  :see: https://docs.digifinex.com/en-ww/spot/v3/rest.html#cancel-order
@@ -1768,7 +1768,7 @@ class digifinex(Exchange, ImplicitAPI):
1768
1768
  raise OrderNotFound(self.id + ' cancelOrder() ' + id + ' not found')
1769
1769
  return response
1770
1770
 
1771
- async def cancel_orders(self, ids, symbol: String = None, params={}):
1771
+ async def cancel_orders(self, ids, symbol: Str = None, params={}):
1772
1772
  """
1773
1773
  cancel multiple orders
1774
1774
  :param str[] ids: order ids
@@ -1813,7 +1813,7 @@ class digifinex(Exchange, ImplicitAPI):
1813
1813
  }
1814
1814
  return self.safe_string(statuses, status, status)
1815
1815
 
1816
- def parse_order(self, order, market=None) -> Order:
1816
+ def parse_order(self, order, market: Market = None) -> Order:
1817
1817
  #
1818
1818
  # spot: createOrder
1819
1819
  #
@@ -1946,7 +1946,7 @@ class digifinex(Exchange, ImplicitAPI):
1946
1946
  'trades': None,
1947
1947
  }, market)
1948
1948
 
1949
- async def fetch_open_orders(self, symbol: String = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
1949
+ async def fetch_open_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
1950
1950
  """
1951
1951
  fetch all unfilled currently open orders
1952
1952
  :see: https://docs.digifinex.com/en-ww/spot/v3/rest.html#current-active-orders
@@ -2039,7 +2039,7 @@ class digifinex(Exchange, ImplicitAPI):
2039
2039
  data = self.safe_value(response, 'data', [])
2040
2040
  return self.parse_orders(data, market, since, limit)
2041
2041
 
2042
- async def fetch_orders(self, symbol: String = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
2042
+ async def fetch_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
2043
2043
  """
2044
2044
  fetches information on multiple orders made by the user
2045
2045
  :see: https://docs.digifinex.com/en-ww/spot/v3/rest.html#get-all-orders-including-history-orders
@@ -2133,7 +2133,7 @@ class digifinex(Exchange, ImplicitAPI):
2133
2133
  data = self.safe_value(response, 'data', [])
2134
2134
  return self.parse_orders(data, market, since, limit)
2135
2135
 
2136
- async def fetch_order(self, id: str, symbol: String = None, params={}):
2136
+ async def fetch_order(self, id: str, symbol: Str = None, params={}):
2137
2137
  """
2138
2138
  fetches information on an order made by the user
2139
2139
  :see: https://docs.digifinex.com/en-ww/spot/v3/rest.html#get-order-status
@@ -2221,7 +2221,7 @@ class digifinex(Exchange, ImplicitAPI):
2221
2221
  raise OrderNotFound(self.id + ' fetchOrder() order ' + str(id) + ' not found')
2222
2222
  return self.parse_order(order, market)
2223
2223
 
2224
- async def fetch_my_trades(self, symbol: String = None, since: Int = None, limit: Int = None, params={}):
2224
+ async def fetch_my_trades(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
2225
2225
  """
2226
2226
  fetch all trades made by the user
2227
2227
  :see: https://docs.digifinex.com/en-ww/spot/v3/rest.html#customer-39-s-trades
@@ -2314,7 +2314,7 @@ class digifinex(Exchange, ImplicitAPI):
2314
2314
  types = {}
2315
2315
  return self.safe_string(types, type, type)
2316
2316
 
2317
- def parse_ledger_entry(self, item, currency=None):
2317
+ def parse_ledger_entry(self, item, currency: Currency = None):
2318
2318
  #
2319
2319
  # spot and margin
2320
2320
  #
@@ -2360,7 +2360,7 @@ class digifinex(Exchange, ImplicitAPI):
2360
2360
  'fee': None,
2361
2361
  }
2362
2362
 
2363
- async def fetch_ledger(self, code: String = None, since: Int = None, limit: Int = None, params={}):
2363
+ async def fetch_ledger(self, code: Str = None, since: Int = None, limit: Int = None, params={}):
2364
2364
  """
2365
2365
  fetch the history of changes, actions done by the user or operations that altered balance of the user
2366
2366
  :see: https://docs.digifinex.com/en-ww/spot/v3/rest.html#spot-margin-otc-financial-logs
@@ -2440,7 +2440,7 @@ class digifinex(Exchange, ImplicitAPI):
2440
2440
  ledger = self.safe_value(data, 'finance', [])
2441
2441
  return self.parse_ledger(ledger, currency, since, limit)
2442
2442
 
2443
- def parse_deposit_address(self, depositAddress, currency=None):
2443
+ def parse_deposit_address(self, depositAddress, currency: Currency = None):
2444
2444
  #
2445
2445
  # {
2446
2446
  # "addressTag":"",
@@ -2494,7 +2494,7 @@ class digifinex(Exchange, ImplicitAPI):
2494
2494
  raise InvalidAddress(self.id + ' fetchDepositAddress() did not return an address for ' + code + ' - create the deposit address in the user settings on the exchange website first.')
2495
2495
  return address
2496
2496
 
2497
- async def fetch_transactions_by_type(self, type, code: String = None, since: Int = None, limit: Int = None, params={}):
2497
+ async def fetch_transactions_by_type(self, type, code: Str = None, since: Int = None, limit: Int = None, params={}):
2498
2498
  await self.load_markets()
2499
2499
  currency = None
2500
2500
  request = {
@@ -2533,7 +2533,7 @@ class digifinex(Exchange, ImplicitAPI):
2533
2533
  data = self.safe_value(response, 'data', [])
2534
2534
  return self.parse_transactions(data, currency, since, limit, {'type': type})
2535
2535
 
2536
- async def fetch_deposits(self, code: String = None, since: Int = None, limit: Int = None, params={}) -> List[Transaction]:
2536
+ async def fetch_deposits(self, code: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Transaction]:
2537
2537
  """
2538
2538
  fetch all deposits made to an account
2539
2539
  :param str code: unified currency code
@@ -2544,7 +2544,7 @@ class digifinex(Exchange, ImplicitAPI):
2544
2544
  """
2545
2545
  return await self.fetch_transactions_by_type('deposit', code, since, limit, params)
2546
2546
 
2547
- async def fetch_withdrawals(self, code: String = None, since: Int = None, limit: Int = None, params={}) -> List[Transaction]:
2547
+ async def fetch_withdrawals(self, code: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Transaction]:
2548
2548
  """
2549
2549
  fetch all withdrawals made from an account
2550
2550
  :param str code: unified currency code
@@ -2566,7 +2566,7 @@ class digifinex(Exchange, ImplicitAPI):
2566
2566
  }
2567
2567
  return self.safe_string(statuses, status, status)
2568
2568
 
2569
- def parse_transaction(self, transaction, currency=None) -> Transaction:
2569
+ def parse_transaction(self, transaction, currency: Currency = None) -> Transaction:
2570
2570
  #
2571
2571
  # withdraw
2572
2572
  #
@@ -2635,7 +2635,7 @@ class digifinex(Exchange, ImplicitAPI):
2635
2635
  }
2636
2636
  return self.safe_string(statuses, status, status)
2637
2637
 
2638
- def parse_transfer(self, transfer, currency=None):
2638
+ def parse_transfer(self, transfer, currency: Currency = None):
2639
2639
  #
2640
2640
  # transfer
2641
2641
  #
@@ -2735,7 +2735,7 @@ class digifinex(Exchange, ImplicitAPI):
2735
2735
  #
2736
2736
  return self.parse_transaction(response, currency)
2737
2737
 
2738
- async def fetch_borrow_interest(self, code: String = None, symbol: String = None, since: Int = None, limit: Int = None, params={}):
2738
+ async def fetch_borrow_interest(self, code: Str = None, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
2739
2739
  await self.load_markets()
2740
2740
  request = {}
2741
2741
  market = None
@@ -2768,7 +2768,7 @@ class digifinex(Exchange, ImplicitAPI):
2768
2768
  interest = self.parse_borrow_interests(rows, market)
2769
2769
  return self.filter_by_currency_since_limit(interest, code, since, limit)
2770
2770
 
2771
- def parse_borrow_interest(self, info, market=None):
2771
+ def parse_borrow_interest(self, info, market: Market = None):
2772
2772
  #
2773
2773
  # {
2774
2774
  # "amount": 0.0006103,
@@ -2828,7 +2828,7 @@ class digifinex(Exchange, ImplicitAPI):
2828
2828
  entry = data[i]
2829
2829
  if self.safe_string(entry, 'currency') == code:
2830
2830
  result = entry
2831
- currency = self.safe_string(result, 'currency')
2831
+ currency = self.currency(code)
2832
2832
  return self.parse_borrow_rate(result, currency)
2833
2833
 
2834
2834
  async def fetch_borrow_rates(self, params={}):
@@ -2859,7 +2859,7 @@ class digifinex(Exchange, ImplicitAPI):
2859
2859
  result = self.safe_value(response, 'list')
2860
2860
  return self.parse_borrow_rates(result, 'currency')
2861
2861
 
2862
- def parse_borrow_rate(self, info, currency=None):
2862
+ def parse_borrow_rate(self, info, currency: Currency = None):
2863
2863
  #
2864
2864
  # {
2865
2865
  # "valuation_rate": 1,
@@ -2893,7 +2893,7 @@ class digifinex(Exchange, ImplicitAPI):
2893
2893
  item = info[i]
2894
2894
  currency = self.safe_string(item, codeKey)
2895
2895
  code = self.safe_currency_code(currency)
2896
- borrowRate = self.parse_borrow_rate(item, currency)
2896
+ borrowRate = self.parse_borrow_rate(item)
2897
2897
  result[code] = borrowRate
2898
2898
  return result
2899
2899
 
@@ -2928,7 +2928,7 @@ class digifinex(Exchange, ImplicitAPI):
2928
2928
  data = self.safe_value(response, 'data', {})
2929
2929
  return self.parse_funding_rate(data, market)
2930
2930
 
2931
- def parse_funding_rate(self, contract, market=None):
2931
+ def parse_funding_rate(self, contract, market: Market = None):
2932
2932
  #
2933
2933
  # {
2934
2934
  # "instrument_id": "BTCUSDTPERP",
@@ -2961,7 +2961,7 @@ class digifinex(Exchange, ImplicitAPI):
2961
2961
  'previousFundingDatetime': None,
2962
2962
  }
2963
2963
 
2964
- async def fetch_funding_rate_history(self, symbol: String = None, since: Int = None, limit: Int = None, params={}):
2964
+ async def fetch_funding_rate_history(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
2965
2965
  """
2966
2966
  fetches historical funding rate prices
2967
2967
  :param str symbol: unified symbol of the market to fetch the funding rate history for
@@ -3045,7 +3045,7 @@ class digifinex(Exchange, ImplicitAPI):
3045
3045
  data = self.safe_value(response, 'data', {})
3046
3046
  return self.parse_trading_fee(data, market)
3047
3047
 
3048
- def parse_trading_fee(self, fee, market=None):
3048
+ def parse_trading_fee(self, fee, market: Market = None):
3049
3049
  #
3050
3050
  # {
3051
3051
  # "instrument_id": "BTCUSDTPERP",
@@ -3245,7 +3245,7 @@ class digifinex(Exchange, ImplicitAPI):
3245
3245
  position['marginRatio'] = self.safe_number(response, 'margin_rate')
3246
3246
  return position
3247
3247
 
3248
- def parse_position(self, position, market=None):
3248
+ def parse_position(self, position, market: Market = None):
3249
3249
  #
3250
3250
  # swap
3251
3251
  #
@@ -3326,7 +3326,7 @@ class digifinex(Exchange, ImplicitAPI):
3326
3326
  'takeProfitPrice': None,
3327
3327
  })
3328
3328
 
3329
- async def set_leverage(self, leverage, symbol: String = None, params={}):
3329
+ async def set_leverage(self, leverage, symbol: Str = None, params={}):
3330
3330
  """
3331
3331
  set the level of leverage for a market
3332
3332
  :see: https://docs.digifinex.com/en-ww/swap/v2/rest.html#setleverage
@@ -3374,7 +3374,7 @@ class digifinex(Exchange, ImplicitAPI):
3374
3374
  # }
3375
3375
  #
3376
3376
 
3377
- async def fetch_transfers(self, code: String = None, since: Int = None, limit: Int = None, params={}):
3377
+ async def fetch_transfers(self, code: Str = None, since: Int = None, limit: Int = None, params={}):
3378
3378
  """
3379
3379
  fetch the transfer history, only transfers between spot and swap accounts are supported
3380
3380
  :see: https://docs.digifinex.com/en-ww/swap/v2/rest.html#transferrecord
@@ -3546,7 +3546,7 @@ class digifinex(Exchange, ImplicitAPI):
3546
3546
  data = self.safe_value(response, 'data', {})
3547
3547
  return self.parse_market_leverage_tiers(data, market)
3548
3548
 
3549
- def parse_market_leverage_tiers(self, info, market=None):
3549
+ def parse_market_leverage_tiers(self, info, market: Market = None):
3550
3550
  #
3551
3551
  # {
3552
3552
  # "instrument_id": "BTCUSDTPERP",
@@ -3771,7 +3771,7 @@ class digifinex(Exchange, ImplicitAPI):
3771
3771
  'status': status,
3772
3772
  })
3773
3773
 
3774
- def parse_margin_modification(self, data, market=None):
3774
+ def parse_margin_modification(self, data, market: Market = None):
3775
3775
  #
3776
3776
  # {
3777
3777
  # "instrument_id": "BTCUSDTPERP",
@@ -3792,7 +3792,7 @@ class digifinex(Exchange, ImplicitAPI):
3792
3792
  'status': None,
3793
3793
  }
3794
3794
 
3795
- async def fetch_funding_history(self, symbol: String = None, since: Int = None, limit: Int = None, params={}):
3795
+ async def fetch_funding_history(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
3796
3796
  """
3797
3797
  fetch the history of funding payments paid and received on self account
3798
3798
  :see: https://docs.digifinex.com/en-ww/swap/v2/rest.html#funding-fee
@@ -3831,7 +3831,7 @@ class digifinex(Exchange, ImplicitAPI):
3831
3831
  data = self.safe_value(response, 'data', [])
3832
3832
  return self.parse_incomes(data, market, since, limit)
3833
3833
 
3834
- def parse_income(self, income, market=None):
3834
+ def parse_income(self, income, market: Market = None):
3835
3835
  #
3836
3836
  # {
3837
3837
  # "instrument_id": "BTCUSDTPERP",
@@ -3853,7 +3853,7 @@ class digifinex(Exchange, ImplicitAPI):
3853
3853
  'amount': self.safe_number(income, 'amount'),
3854
3854
  }
3855
3855
 
3856
- async def set_margin_mode(self, marginMode, symbol: String = None, params={}):
3856
+ async def set_margin_mode(self, marginMode, symbol: Str = None, params={}):
3857
3857
  """
3858
3858
  set margin mode to 'cross' or 'isolated'
3859
3859
  :see: https://docs.digifinex.com/en-ww/swap/v2/rest.html#positionmode
@@ -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, Int, 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
@@ -266,7 +266,7 @@ class exmo(Exchange, ImplicitAPI):
266
266
  margin['amount'] = amount
267
267
  return margin
268
268
 
269
- def parse_margin_modification(self, data, market=None):
269
+ def parse_margin_modification(self, data, market: Market = None):
270
270
  #
271
271
  # {}
272
272
  #
@@ -518,7 +518,7 @@ class exmo(Exchange, ImplicitAPI):
518
518
  self.options['transactionFees'] = result
519
519
  return result
520
520
 
521
- def parse_deposit_withdraw_fee(self, fee, currency=None):
521
+ def parse_deposit_withdraw_fee(self, fee, currency: Currency = None):
522
522
  #
523
523
  # [
524
524
  # {
@@ -848,7 +848,7 @@ class exmo(Exchange, ImplicitAPI):
848
848
  candles = self.safe_value(response, 'candles', [])
849
849
  return self.parse_ohlcvs(candles, market, timeframe, since, limit)
850
850
 
851
- def parse_ohlcv(self, ohlcv, market=None) -> list:
851
+ def parse_ohlcv(self, ohlcv, market: Market = None) -> list:
852
852
  #
853
853
  # {
854
854
  # "t":1584057600000,
@@ -991,7 +991,7 @@ class exmo(Exchange, ImplicitAPI):
991
991
  result[symbol] = self.parse_order_book(response[marketId], symbol, None, 'bid', 'ask')
992
992
  return result
993
993
 
994
- def parse_ticker(self, ticker, market=None) -> Ticker:
994
+ def parse_ticker(self, ticker, market: Market = None) -> Ticker:
995
995
  #
996
996
  # {
997
997
  # "buy_price":"0.00002996",
@@ -1078,7 +1078,7 @@ class exmo(Exchange, ImplicitAPI):
1078
1078
  market = self.market(symbol)
1079
1079
  return self.parse_ticker(response[market['id']], market)
1080
1080
 
1081
- def parse_trade(self, trade, market=None) -> Trade:
1081
+ def parse_trade(self, trade, market: Market = None) -> Trade:
1082
1082
  #
1083
1083
  # fetchTrades(public)
1084
1084
  #
@@ -1205,7 +1205,7 @@ class exmo(Exchange, ImplicitAPI):
1205
1205
  data = self.safe_value(response, market['id'], [])
1206
1206
  return self.parse_trades(data, market, since, limit)
1207
1207
 
1208
- async def fetch_my_trades(self, symbol: String = None, since: Int = None, limit: Int = None, params={}):
1208
+ async def fetch_my_trades(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
1209
1209
  """
1210
1210
  fetch all trades made by the user
1211
1211
  :see: https://documenter.getpostman.com/view/10287440/SzYXWKPi#b8d8d9af-4f46-46a1-939b-ad261d79f452 # spot
@@ -1387,7 +1387,7 @@ class exmo(Exchange, ImplicitAPI):
1387
1387
  response = await getattr(self, method)(self.extend(request, params))
1388
1388
  return self.parse_order(response, market)
1389
1389
 
1390
- async def cancel_order(self, id: str, symbol: String = None, params={}):
1390
+ async def cancel_order(self, id: str, symbol: Str = None, params={}):
1391
1391
  """
1392
1392
  cancels an open order
1393
1393
  :see: https://documenter.getpostman.com/view/10287440/SzYXWKPi#1f710d4b-75bc-4b65-ad68-006f863a3f26
@@ -1433,7 +1433,7 @@ class exmo(Exchange, ImplicitAPI):
1433
1433
  #
1434
1434
  return self.parse_order(response)
1435
1435
 
1436
- async def fetch_order(self, id: str, symbol: String = None, params={}):
1436
+ async def fetch_order(self, id: str, symbol: Str = None, params={}):
1437
1437
  """
1438
1438
  *spot only* fetches information on an order made by the user
1439
1439
  :see: https://documenter.getpostman.com/view/10287440/SzYXWKPi#cf27781e-28e5-4b39-a52d-3110f5d22459 # spot
@@ -1471,7 +1471,7 @@ class exmo(Exchange, ImplicitAPI):
1471
1471
  order['id'] = str(id)
1472
1472
  return order
1473
1473
 
1474
- async def fetch_order_trades(self, id: str, symbol: String = None, since: Int = None, limit: Int = None, params={}):
1474
+ async def fetch_order_trades(self, id: str, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
1475
1475
  """
1476
1476
  fetch all the trades made from a single order
1477
1477
  :see: https://documenter.getpostman.com/view/10287440/SzYXWKPi#cf27781e-28e5-4b39-a52d-3110f5d22459 # spot
@@ -1543,7 +1543,7 @@ class exmo(Exchange, ImplicitAPI):
1543
1543
  trades = self.safe_value(response, 'trades')
1544
1544
  return self.parse_trades(trades, market, since, limit)
1545
1545
 
1546
- async def fetch_open_orders(self, symbol: String = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
1546
+ async def fetch_open_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
1547
1547
  """
1548
1548
  fetch all unfilled currently open orders
1549
1549
  :see: https://documenter.getpostman.com/view/10287440/SzYXWKPi#0e135370-daa4-4689-8acd-b6876dee9ba1 # spot open orders
@@ -1658,7 +1658,7 @@ class exmo(Exchange, ImplicitAPI):
1658
1658
  }
1659
1659
  return self.safe_string(side, orderType, orderType)
1660
1660
 
1661
- def parse_order(self, order, market=None) -> Order:
1661
+ def parse_order(self, order, market: Market = None) -> Order:
1662
1662
  #
1663
1663
  # fetchOrders, fetchOpenOrders, fetchClosedOrders, fetchCanceledOrders
1664
1664
  #
@@ -1792,7 +1792,7 @@ class exmo(Exchange, ImplicitAPI):
1792
1792
  'info': order,
1793
1793
  }, market)
1794
1794
 
1795
- async def fetch_canceled_orders(self, symbol: String = None, since: Int = None, limit: Int = None, params={}):
1795
+ async def fetch_canceled_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
1796
1796
  """
1797
1797
  fetches information on multiple canceled orders made by the user
1798
1798
  :see: https://documenter.getpostman.com/view/10287440/SzYXWKPi#1d2524dd-ae6d-403a-a067-77b50d13fbe5 # margin
@@ -1999,7 +1999,7 @@ class exmo(Exchange, ImplicitAPI):
1999
1999
  }
2000
2000
  return self.safe_string(statuses, status, status)
2001
2001
 
2002
- def parse_transaction(self, transaction, currency=None) -> Transaction:
2002
+ def parse_transaction(self, transaction, currency: Currency = None) -> Transaction:
2003
2003
  #
2004
2004
  # fetchDepositsWithdrawals
2005
2005
  #
@@ -2123,7 +2123,7 @@ class exmo(Exchange, ImplicitAPI):
2123
2123
  'fee': fee,
2124
2124
  }
2125
2125
 
2126
- async def fetch_deposits_withdrawals(self, code: String = None, since: Int = None, limit: Int = None, params={}) -> List[Transaction]:
2126
+ async def fetch_deposits_withdrawals(self, code: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Transaction]:
2127
2127
  """
2128
2128
  fetch history of deposits and withdrawals
2129
2129
  :param str [code]: unified currency code for the currency of the deposit/withdrawals, default is None
@@ -2172,7 +2172,7 @@ class exmo(Exchange, ImplicitAPI):
2172
2172
  #
2173
2173
  return self.parse_transactions(response['history'], currency, since, limit)
2174
2174
 
2175
- async def fetch_withdrawals(self, code: String = None, since: Int = None, limit: Int = None, params={}) -> List[Transaction]:
2175
+ async def fetch_withdrawals(self, code: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Transaction]:
2176
2176
  """
2177
2177
  fetch all withdrawals made from an account
2178
2178
  :param str code: unified currency code
@@ -2221,7 +2221,7 @@ class exmo(Exchange, ImplicitAPI):
2221
2221
  items = self.safe_value(response, 'items', [])
2222
2222
  return self.parse_transactions(items, currency, since, limit)
2223
2223
 
2224
- async def fetch_withdrawal(self, id: str, code: String = None, params={}):
2224
+ async def fetch_withdrawal(self, id: str, code: Str = None, params={}):
2225
2225
  """
2226
2226
  fetch data on a currency withdrawal via the withdrawal id
2227
2227
  :param str id: withdrawal id
@@ -2269,7 +2269,7 @@ class exmo(Exchange, ImplicitAPI):
2269
2269
  first = self.safe_value(items, 0, {})
2270
2270
  return self.parse_transaction(first, currency)
2271
2271
 
2272
- async def fetch_deposit(self, id=None, code: String = None, params={}):
2272
+ async def fetch_deposit(self, id=None, code: Str = None, params={}):
2273
2273
  """
2274
2274
  fetch information on a deposit
2275
2275
  :param str id: deposit id
@@ -2317,7 +2317,7 @@ class exmo(Exchange, ImplicitAPI):
2317
2317
  first = self.safe_value(items, 0, {})
2318
2318
  return self.parse_transaction(first, currency)
2319
2319
 
2320
- async def fetch_deposits(self, code: String = None, since: Int = None, limit: Int = None, params={}) -> List[Transaction]:
2320
+ async def fetch_deposits(self, code: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Transaction]:
2321
2321
  """
2322
2322
  fetch all deposits made to an account
2323
2323
  :param str code: unified currency code