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/digifinex.py CHANGED
@@ -7,7 +7,7 @@ from ccxt.base.exchange import Exchange
7
7
  from ccxt.abstract.digifinex import ImplicitAPI
8
8
  import hashlib
9
9
  import json
10
- from ccxt.base.types import Balances, Int, Order, OrderBook, OrderRequest, OrderSide, OrderType, String, Strings, Ticker, Tickers, Trade, Transaction
10
+ from ccxt.base.types import Balances, Currency, Int, Market, Order, OrderBook, OrderRequest, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, Transaction
11
11
  from typing import List
12
12
  from ccxt.base.errors import ExchangeError
13
13
  from ccxt.base.errors import PermissionDenied
@@ -1081,7 +1081,7 @@ class digifinex(Exchange, ImplicitAPI):
1081
1081
  result = self.extend({'date': date}, firstTicker)
1082
1082
  return self.parse_ticker(result, market)
1083
1083
 
1084
- def parse_ticker(self, ticker, market=None) -> Ticker:
1084
+ def parse_ticker(self, ticker, market: Market = None) -> Ticker:
1085
1085
  #
1086
1086
  # spot: fetchTicker, fetchTickers
1087
1087
  #
@@ -1151,7 +1151,7 @@ class digifinex(Exchange, ImplicitAPI):
1151
1151
  'info': ticker,
1152
1152
  }, market)
1153
1153
 
1154
- def parse_trade(self, trade, market=None) -> Trade:
1154
+ def parse_trade(self, trade, market: Market = None) -> Trade:
1155
1155
  #
1156
1156
  # spot: fetchTrades
1157
1157
  #
@@ -1384,7 +1384,7 @@ class digifinex(Exchange, ImplicitAPI):
1384
1384
  data = self.safe_value(response, 'data', [])
1385
1385
  return self.parse_trades(data, market, since, limit)
1386
1386
 
1387
- def parse_ohlcv(self, ohlcv, market=None) -> list:
1387
+ def parse_ohlcv(self, ohlcv, market: Market = None) -> list:
1388
1388
  #
1389
1389
  # [
1390
1390
  # 1556712900,
@@ -1704,7 +1704,7 @@ class digifinex(Exchange, ImplicitAPI):
1704
1704
  params = self.omit(params, ['postOnly'])
1705
1705
  return self.extend(request, params)
1706
1706
 
1707
- def cancel_order(self, id: str, symbol: String = None, params={}):
1707
+ def cancel_order(self, id: str, symbol: Str = None, params={}):
1708
1708
  """
1709
1709
  cancels an open order
1710
1710
  :see: https://docs.digifinex.com/en-ww/spot/v3/rest.html#cancel-order
@@ -1767,7 +1767,7 @@ class digifinex(Exchange, ImplicitAPI):
1767
1767
  raise OrderNotFound(self.id + ' cancelOrder() ' + id + ' not found')
1768
1768
  return response
1769
1769
 
1770
- def cancel_orders(self, ids, symbol: String = None, params={}):
1770
+ def cancel_orders(self, ids, symbol: Str = None, params={}):
1771
1771
  """
1772
1772
  cancel multiple orders
1773
1773
  :param str[] ids: order ids
@@ -1812,7 +1812,7 @@ class digifinex(Exchange, ImplicitAPI):
1812
1812
  }
1813
1813
  return self.safe_string(statuses, status, status)
1814
1814
 
1815
- def parse_order(self, order, market=None) -> Order:
1815
+ def parse_order(self, order, market: Market = None) -> Order:
1816
1816
  #
1817
1817
  # spot: createOrder
1818
1818
  #
@@ -1945,7 +1945,7 @@ class digifinex(Exchange, ImplicitAPI):
1945
1945
  'trades': None,
1946
1946
  }, market)
1947
1947
 
1948
- def fetch_open_orders(self, symbol: String = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
1948
+ def fetch_open_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
1949
1949
  """
1950
1950
  fetch all unfilled currently open orders
1951
1951
  :see: https://docs.digifinex.com/en-ww/spot/v3/rest.html#current-active-orders
@@ -2038,7 +2038,7 @@ class digifinex(Exchange, ImplicitAPI):
2038
2038
  data = self.safe_value(response, 'data', [])
2039
2039
  return self.parse_orders(data, market, since, limit)
2040
2040
 
2041
- def fetch_orders(self, symbol: String = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
2041
+ def fetch_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
2042
2042
  """
2043
2043
  fetches information on multiple orders made by the user
2044
2044
  :see: https://docs.digifinex.com/en-ww/spot/v3/rest.html#get-all-orders-including-history-orders
@@ -2132,7 +2132,7 @@ class digifinex(Exchange, ImplicitAPI):
2132
2132
  data = self.safe_value(response, 'data', [])
2133
2133
  return self.parse_orders(data, market, since, limit)
2134
2134
 
2135
- def fetch_order(self, id: str, symbol: String = None, params={}):
2135
+ def fetch_order(self, id: str, symbol: Str = None, params={}):
2136
2136
  """
2137
2137
  fetches information on an order made by the user
2138
2138
  :see: https://docs.digifinex.com/en-ww/spot/v3/rest.html#get-order-status
@@ -2220,7 +2220,7 @@ class digifinex(Exchange, ImplicitAPI):
2220
2220
  raise OrderNotFound(self.id + ' fetchOrder() order ' + str(id) + ' not found')
2221
2221
  return self.parse_order(order, market)
2222
2222
 
2223
- def fetch_my_trades(self, symbol: String = None, since: Int = None, limit: Int = None, params={}):
2223
+ def fetch_my_trades(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
2224
2224
  """
2225
2225
  fetch all trades made by the user
2226
2226
  :see: https://docs.digifinex.com/en-ww/spot/v3/rest.html#customer-39-s-trades
@@ -2313,7 +2313,7 @@ class digifinex(Exchange, ImplicitAPI):
2313
2313
  types = {}
2314
2314
  return self.safe_string(types, type, type)
2315
2315
 
2316
- def parse_ledger_entry(self, item, currency=None):
2316
+ def parse_ledger_entry(self, item, currency: Currency = None):
2317
2317
  #
2318
2318
  # spot and margin
2319
2319
  #
@@ -2359,7 +2359,7 @@ class digifinex(Exchange, ImplicitAPI):
2359
2359
  'fee': None,
2360
2360
  }
2361
2361
 
2362
- def fetch_ledger(self, code: String = None, since: Int = None, limit: Int = None, params={}):
2362
+ def fetch_ledger(self, code: Str = None, since: Int = None, limit: Int = None, params={}):
2363
2363
  """
2364
2364
  fetch the history of changes, actions done by the user or operations that altered balance of the user
2365
2365
  :see: https://docs.digifinex.com/en-ww/spot/v3/rest.html#spot-margin-otc-financial-logs
@@ -2439,7 +2439,7 @@ class digifinex(Exchange, ImplicitAPI):
2439
2439
  ledger = self.safe_value(data, 'finance', [])
2440
2440
  return self.parse_ledger(ledger, currency, since, limit)
2441
2441
 
2442
- def parse_deposit_address(self, depositAddress, currency=None):
2442
+ def parse_deposit_address(self, depositAddress, currency: Currency = None):
2443
2443
  #
2444
2444
  # {
2445
2445
  # "addressTag":"",
@@ -2493,7 +2493,7 @@ class digifinex(Exchange, ImplicitAPI):
2493
2493
  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.')
2494
2494
  return address
2495
2495
 
2496
- def fetch_transactions_by_type(self, type, code: String = None, since: Int = None, limit: Int = None, params={}):
2496
+ def fetch_transactions_by_type(self, type, code: Str = None, since: Int = None, limit: Int = None, params={}):
2497
2497
  self.load_markets()
2498
2498
  currency = None
2499
2499
  request = {
@@ -2532,7 +2532,7 @@ class digifinex(Exchange, ImplicitAPI):
2532
2532
  data = self.safe_value(response, 'data', [])
2533
2533
  return self.parse_transactions(data, currency, since, limit, {'type': type})
2534
2534
 
2535
- def fetch_deposits(self, code: String = None, since: Int = None, limit: Int = None, params={}) -> List[Transaction]:
2535
+ def fetch_deposits(self, code: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Transaction]:
2536
2536
  """
2537
2537
  fetch all deposits made to an account
2538
2538
  :param str code: unified currency code
@@ -2543,7 +2543,7 @@ class digifinex(Exchange, ImplicitAPI):
2543
2543
  """
2544
2544
  return self.fetch_transactions_by_type('deposit', code, since, limit, params)
2545
2545
 
2546
- def fetch_withdrawals(self, code: String = None, since: Int = None, limit: Int = None, params={}) -> List[Transaction]:
2546
+ def fetch_withdrawals(self, code: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Transaction]:
2547
2547
  """
2548
2548
  fetch all withdrawals made from an account
2549
2549
  :param str code: unified currency code
@@ -2565,7 +2565,7 @@ class digifinex(Exchange, ImplicitAPI):
2565
2565
  }
2566
2566
  return self.safe_string(statuses, status, status)
2567
2567
 
2568
- def parse_transaction(self, transaction, currency=None) -> Transaction:
2568
+ def parse_transaction(self, transaction, currency: Currency = None) -> Transaction:
2569
2569
  #
2570
2570
  # withdraw
2571
2571
  #
@@ -2634,7 +2634,7 @@ class digifinex(Exchange, ImplicitAPI):
2634
2634
  }
2635
2635
  return self.safe_string(statuses, status, status)
2636
2636
 
2637
- def parse_transfer(self, transfer, currency=None):
2637
+ def parse_transfer(self, transfer, currency: Currency = None):
2638
2638
  #
2639
2639
  # transfer
2640
2640
  #
@@ -2734,7 +2734,7 @@ class digifinex(Exchange, ImplicitAPI):
2734
2734
  #
2735
2735
  return self.parse_transaction(response, currency)
2736
2736
 
2737
- def fetch_borrow_interest(self, code: String = None, symbol: String = None, since: Int = None, limit: Int = None, params={}):
2737
+ def fetch_borrow_interest(self, code: Str = None, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
2738
2738
  self.load_markets()
2739
2739
  request = {}
2740
2740
  market = None
@@ -2767,7 +2767,7 @@ class digifinex(Exchange, ImplicitAPI):
2767
2767
  interest = self.parse_borrow_interests(rows, market)
2768
2768
  return self.filter_by_currency_since_limit(interest, code, since, limit)
2769
2769
 
2770
- def parse_borrow_interest(self, info, market=None):
2770
+ def parse_borrow_interest(self, info, market: Market = None):
2771
2771
  #
2772
2772
  # {
2773
2773
  # "amount": 0.0006103,
@@ -2827,7 +2827,7 @@ class digifinex(Exchange, ImplicitAPI):
2827
2827
  entry = data[i]
2828
2828
  if self.safe_string(entry, 'currency') == code:
2829
2829
  result = entry
2830
- currency = self.safe_string(result, 'currency')
2830
+ currency = self.currency(code)
2831
2831
  return self.parse_borrow_rate(result, currency)
2832
2832
 
2833
2833
  def fetch_borrow_rates(self, params={}):
@@ -2858,7 +2858,7 @@ class digifinex(Exchange, ImplicitAPI):
2858
2858
  result = self.safe_value(response, 'list')
2859
2859
  return self.parse_borrow_rates(result, 'currency')
2860
2860
 
2861
- def parse_borrow_rate(self, info, currency=None):
2861
+ def parse_borrow_rate(self, info, currency: Currency = None):
2862
2862
  #
2863
2863
  # {
2864
2864
  # "valuation_rate": 1,
@@ -2892,7 +2892,7 @@ class digifinex(Exchange, ImplicitAPI):
2892
2892
  item = info[i]
2893
2893
  currency = self.safe_string(item, codeKey)
2894
2894
  code = self.safe_currency_code(currency)
2895
- borrowRate = self.parse_borrow_rate(item, currency)
2895
+ borrowRate = self.parse_borrow_rate(item)
2896
2896
  result[code] = borrowRate
2897
2897
  return result
2898
2898
 
@@ -2927,7 +2927,7 @@ class digifinex(Exchange, ImplicitAPI):
2927
2927
  data = self.safe_value(response, 'data', {})
2928
2928
  return self.parse_funding_rate(data, market)
2929
2929
 
2930
- def parse_funding_rate(self, contract, market=None):
2930
+ def parse_funding_rate(self, contract, market: Market = None):
2931
2931
  #
2932
2932
  # {
2933
2933
  # "instrument_id": "BTCUSDTPERP",
@@ -2960,7 +2960,7 @@ class digifinex(Exchange, ImplicitAPI):
2960
2960
  'previousFundingDatetime': None,
2961
2961
  }
2962
2962
 
2963
- def fetch_funding_rate_history(self, symbol: String = None, since: Int = None, limit: Int = None, params={}):
2963
+ def fetch_funding_rate_history(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
2964
2964
  """
2965
2965
  fetches historical funding rate prices
2966
2966
  :param str symbol: unified symbol of the market to fetch the funding rate history for
@@ -3044,7 +3044,7 @@ class digifinex(Exchange, ImplicitAPI):
3044
3044
  data = self.safe_value(response, 'data', {})
3045
3045
  return self.parse_trading_fee(data, market)
3046
3046
 
3047
- def parse_trading_fee(self, fee, market=None):
3047
+ def parse_trading_fee(self, fee, market: Market = None):
3048
3048
  #
3049
3049
  # {
3050
3050
  # "instrument_id": "BTCUSDTPERP",
@@ -3244,7 +3244,7 @@ class digifinex(Exchange, ImplicitAPI):
3244
3244
  position['marginRatio'] = self.safe_number(response, 'margin_rate')
3245
3245
  return position
3246
3246
 
3247
- def parse_position(self, position, market=None):
3247
+ def parse_position(self, position, market: Market = None):
3248
3248
  #
3249
3249
  # swap
3250
3250
  #
@@ -3325,7 +3325,7 @@ class digifinex(Exchange, ImplicitAPI):
3325
3325
  'takeProfitPrice': None,
3326
3326
  })
3327
3327
 
3328
- def set_leverage(self, leverage, symbol: String = None, params={}):
3328
+ def set_leverage(self, leverage, symbol: Str = None, params={}):
3329
3329
  """
3330
3330
  set the level of leverage for a market
3331
3331
  :see: https://docs.digifinex.com/en-ww/swap/v2/rest.html#setleverage
@@ -3373,7 +3373,7 @@ class digifinex(Exchange, ImplicitAPI):
3373
3373
  # }
3374
3374
  #
3375
3375
 
3376
- def fetch_transfers(self, code: String = None, since: Int = None, limit: Int = None, params={}):
3376
+ def fetch_transfers(self, code: Str = None, since: Int = None, limit: Int = None, params={}):
3377
3377
  """
3378
3378
  fetch the transfer history, only transfers between spot and swap accounts are supported
3379
3379
  :see: https://docs.digifinex.com/en-ww/swap/v2/rest.html#transferrecord
@@ -3545,7 +3545,7 @@ class digifinex(Exchange, ImplicitAPI):
3545
3545
  data = self.safe_value(response, 'data', {})
3546
3546
  return self.parse_market_leverage_tiers(data, market)
3547
3547
 
3548
- def parse_market_leverage_tiers(self, info, market=None):
3548
+ def parse_market_leverage_tiers(self, info, market: Market = None):
3549
3549
  #
3550
3550
  # {
3551
3551
  # "instrument_id": "BTCUSDTPERP",
@@ -3770,7 +3770,7 @@ class digifinex(Exchange, ImplicitAPI):
3770
3770
  'status': status,
3771
3771
  })
3772
3772
 
3773
- def parse_margin_modification(self, data, market=None):
3773
+ def parse_margin_modification(self, data, market: Market = None):
3774
3774
  #
3775
3775
  # {
3776
3776
  # "instrument_id": "BTCUSDTPERP",
@@ -3791,7 +3791,7 @@ class digifinex(Exchange, ImplicitAPI):
3791
3791
  'status': None,
3792
3792
  }
3793
3793
 
3794
- def fetch_funding_history(self, symbol: String = None, since: Int = None, limit: Int = None, params={}):
3794
+ def fetch_funding_history(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
3795
3795
  """
3796
3796
  fetch the history of funding payments paid and received on self account
3797
3797
  :see: https://docs.digifinex.com/en-ww/swap/v2/rest.html#funding-fee
@@ -3830,7 +3830,7 @@ class digifinex(Exchange, ImplicitAPI):
3830
3830
  data = self.safe_value(response, 'data', [])
3831
3831
  return self.parse_incomes(data, market, since, limit)
3832
3832
 
3833
- def parse_income(self, income, market=None):
3833
+ def parse_income(self, income, market: Market = None):
3834
3834
  #
3835
3835
  # {
3836
3836
  # "instrument_id": "BTCUSDTPERP",
@@ -3852,7 +3852,7 @@ class digifinex(Exchange, ImplicitAPI):
3852
3852
  'amount': self.safe_number(income, 'amount'),
3853
3853
  }
3854
3854
 
3855
- def set_margin_mode(self, marginMode, symbol: String = None, params={}):
3855
+ def set_margin_mode(self, marginMode, symbol: Str = None, params={}):
3856
3856
  """
3857
3857
  set margin mode to 'cross' or 'isolated'
3858
3858
  :see: https://docs.digifinex.com/en-ww/swap/v2/rest.html#positionmode
ccxt/exmo.py CHANGED
@@ -6,7 +6,7 @@
6
6
  from ccxt.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
- def fetch_my_trades(self, symbol: String = None, since: Int = None, limit: Int = None, params={}):
1208
+ 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 = getattr(self, method)(self.extend(request, params))
1388
1388
  return self.parse_order(response, market)
1389
1389
 
1390
- def cancel_order(self, id: str, symbol: String = None, params={}):
1390
+ 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
- def fetch_order(self, id: str, symbol: String = None, params={}):
1436
+ 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
- def fetch_order_trades(self, id: str, symbol: String = None, since: Int = None, limit: Int = None, params={}):
1474
+ 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
- def fetch_open_orders(self, symbol: String = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
1546
+ 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
- def fetch_canceled_orders(self, symbol: String = None, since: Int = None, limit: Int = None, params={}):
1795
+ 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
- def fetch_deposits_withdrawals(self, code: String = None, since: Int = None, limit: Int = None, params={}) -> List[Transaction]:
2126
+ 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
- def fetch_withdrawals(self, code: String = None, since: Int = None, limit: Int = None, params={}) -> List[Transaction]:
2175
+ 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
- def fetch_withdrawal(self, id: str, code: String = None, params={}):
2224
+ 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
- def fetch_deposit(self, id=None, code: String = None, params={}):
2272
+ 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
- def fetch_deposits(self, code: String = None, since: Int = None, limit: Int = None, params={}) -> List[Transaction]:
2320
+ 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