ccxt 4.3.30__py2.py3-none-any.whl → 4.3.32__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.
Files changed (260) hide show
  1. ccxt/__init__.py +1 -1
  2. ccxt/abstract/binance.py +2 -0
  3. ccxt/abstract/binancecoinm.py +2 -0
  4. ccxt/abstract/binanceus.py +2 -0
  5. ccxt/abstract/binanceusdm.py +2 -0
  6. ccxt/ace.py +14 -14
  7. ccxt/alpaca.py +16 -16
  8. ccxt/ascendex.py +46 -46
  9. ccxt/async_support/__init__.py +1 -1
  10. ccxt/async_support/ace.py +14 -14
  11. ccxt/async_support/alpaca.py +16 -16
  12. ccxt/async_support/ascendex.py +46 -46
  13. ccxt/async_support/base/exchange.py +23 -23
  14. ccxt/async_support/bigone.py +32 -32
  15. ccxt/async_support/binance.py +105 -96
  16. ccxt/async_support/bingx.py +21 -21
  17. ccxt/async_support/bit2c.py +13 -13
  18. ccxt/async_support/bitbank.py +19 -19
  19. ccxt/async_support/bitbns.py +17 -17
  20. ccxt/async_support/bitfinex.py +24 -24
  21. ccxt/async_support/bitfinex2.py +142 -109
  22. ccxt/async_support/bitflyer.py +23 -23
  23. ccxt/async_support/bitget.py +76 -76
  24. ccxt/async_support/bithumb.py +20 -20
  25. ccxt/async_support/bitmart.py +55 -55
  26. ccxt/async_support/bitmex.py +41 -41
  27. ccxt/async_support/bitopro.py +30 -30
  28. ccxt/async_support/bitrue.py +37 -37
  29. ccxt/async_support/bitso.py +30 -30
  30. ccxt/async_support/bitstamp.py +31 -31
  31. ccxt/async_support/bitteam.py +26 -26
  32. ccxt/async_support/bitvavo.py +27 -27
  33. ccxt/async_support/bl3p.py +8 -8
  34. ccxt/async_support/blockchaincom.py +24 -24
  35. ccxt/async_support/blofin.py +37 -37
  36. ccxt/async_support/btcalpha.py +19 -19
  37. ccxt/async_support/btcbox.py +11 -11
  38. ccxt/async_support/btcmarkets.py +22 -22
  39. ccxt/async_support/btcturk.py +13 -13
  40. ccxt/async_support/bybit.py +96 -96
  41. ccxt/async_support/cex.py +21 -21
  42. ccxt/async_support/coinbase.py +53 -53
  43. ccxt/async_support/coinbaseexchange.py +29 -29
  44. ccxt/async_support/coinbaseinternational.py +32 -32
  45. ccxt/async_support/coincheck.py +14 -14
  46. ccxt/async_support/coinex.py +208 -175
  47. ccxt/async_support/coinlist.py +35 -35
  48. ccxt/async_support/coinmate.py +22 -22
  49. ccxt/async_support/coinmetro.py +22 -22
  50. ccxt/async_support/coinone.py +18 -18
  51. ccxt/async_support/coinsph.py +32 -32
  52. ccxt/async_support/coinspot.py +8 -8
  53. ccxt/async_support/cryptocom.py +43 -43
  54. ccxt/async_support/currencycom.py +33 -33
  55. ccxt/async_support/delta.py +35 -35
  56. ccxt/async_support/deribit.py +54 -54
  57. ccxt/async_support/digifinex.py +56 -56
  58. ccxt/async_support/exmo.py +34 -34
  59. ccxt/async_support/gate.py +60 -60
  60. ccxt/async_support/gemini.py +24 -24
  61. ccxt/async_support/hitbtc.py +51 -51
  62. ccxt/async_support/hollaex.py +29 -29
  63. ccxt/async_support/htx.py +73 -73
  64. ccxt/async_support/huobijp.py +30 -30
  65. ccxt/async_support/hyperliquid.py +58 -58
  66. ccxt/async_support/idex.py +33 -33
  67. ccxt/async_support/independentreserve.py +12 -12
  68. ccxt/async_support/indodax.py +21 -21
  69. ccxt/async_support/kraken.py +46 -51
  70. ccxt/async_support/krakenfutures.py +29 -29
  71. ccxt/async_support/kucoin.py +51 -51
  72. ccxt/async_support/kucoinfutures.py +33 -33
  73. ccxt/async_support/kuna.py +27 -27
  74. ccxt/async_support/latoken.py +27 -27
  75. ccxt/async_support/lbank.py +35 -35
  76. ccxt/async_support/luno.py +19 -19
  77. ccxt/async_support/lykke.py +20 -20
  78. ccxt/async_support/mercado.py +17 -17
  79. ccxt/async_support/mexc.py +64 -64
  80. ccxt/async_support/ndax.py +38 -38
  81. ccxt/async_support/novadax.py +26 -26
  82. ccxt/async_support/oceanex.py +21 -21
  83. ccxt/async_support/okcoin.py +35 -35
  84. ccxt/async_support/okx.py +85 -85
  85. ccxt/async_support/onetrading.py +32 -32
  86. ccxt/async_support/p2b.py +14 -14
  87. ccxt/async_support/paymium.py +12 -12
  88. ccxt/async_support/phemex.py +50 -50
  89. ccxt/async_support/poloniex.py +35 -35
  90. ccxt/async_support/poloniexfutures.py +25 -21
  91. ccxt/async_support/probit.py +30 -30
  92. ccxt/async_support/timex.py +22 -22
  93. ccxt/async_support/tokocrypto.py +26 -26
  94. ccxt/async_support/tradeogre.py +12 -12
  95. ccxt/async_support/upbit.py +28 -28
  96. ccxt/async_support/wavesexchange.py +33 -33
  97. ccxt/async_support/wazirx.py +21 -21
  98. ccxt/async_support/whitebit.py +37 -37
  99. ccxt/async_support/woo.py +51 -51
  100. ccxt/async_support/woofipro.py +46 -46
  101. ccxt/async_support/yobit.py +20 -20
  102. ccxt/async_support/zaif.py +12 -12
  103. ccxt/async_support/zonda.py +22 -22
  104. ccxt/base/exchange.py +48 -36
  105. ccxt/base/types.py +13 -0
  106. ccxt/bigone.py +32 -32
  107. ccxt/binance.py +105 -96
  108. ccxt/bingx.py +21 -21
  109. ccxt/bit2c.py +13 -13
  110. ccxt/bitbank.py +19 -19
  111. ccxt/bitbns.py +17 -17
  112. ccxt/bitfinex.py +24 -24
  113. ccxt/bitfinex2.py +142 -109
  114. ccxt/bitflyer.py +23 -23
  115. ccxt/bitget.py +76 -76
  116. ccxt/bithumb.py +20 -20
  117. ccxt/bitmart.py +55 -55
  118. ccxt/bitmex.py +41 -41
  119. ccxt/bitopro.py +30 -30
  120. ccxt/bitrue.py +37 -37
  121. ccxt/bitso.py +30 -30
  122. ccxt/bitstamp.py +31 -31
  123. ccxt/bitteam.py +26 -26
  124. ccxt/bitvavo.py +27 -27
  125. ccxt/bl3p.py +8 -8
  126. ccxt/blockchaincom.py +24 -24
  127. ccxt/blofin.py +37 -37
  128. ccxt/btcalpha.py +19 -19
  129. ccxt/btcbox.py +11 -11
  130. ccxt/btcmarkets.py +22 -22
  131. ccxt/btcturk.py +13 -13
  132. ccxt/bybit.py +96 -96
  133. ccxt/cex.py +21 -21
  134. ccxt/coinbase.py +53 -53
  135. ccxt/coinbaseexchange.py +29 -29
  136. ccxt/coinbaseinternational.py +32 -32
  137. ccxt/coincheck.py +14 -14
  138. ccxt/coinex.py +208 -175
  139. ccxt/coinlist.py +35 -35
  140. ccxt/coinmate.py +22 -22
  141. ccxt/coinmetro.py +22 -22
  142. ccxt/coinone.py +18 -18
  143. ccxt/coinsph.py +32 -32
  144. ccxt/coinspot.py +8 -8
  145. ccxt/cryptocom.py +43 -43
  146. ccxt/currencycom.py +33 -33
  147. ccxt/delta.py +35 -35
  148. ccxt/deribit.py +54 -54
  149. ccxt/digifinex.py +56 -56
  150. ccxt/exmo.py +34 -34
  151. ccxt/gate.py +60 -60
  152. ccxt/gemini.py +24 -24
  153. ccxt/hitbtc.py +51 -51
  154. ccxt/hollaex.py +29 -29
  155. ccxt/htx.py +73 -73
  156. ccxt/huobijp.py +30 -30
  157. ccxt/hyperliquid.py +58 -58
  158. ccxt/idex.py +33 -33
  159. ccxt/independentreserve.py +12 -12
  160. ccxt/indodax.py +21 -21
  161. ccxt/kraken.py +46 -51
  162. ccxt/krakenfutures.py +29 -29
  163. ccxt/kucoin.py +51 -51
  164. ccxt/kucoinfutures.py +33 -33
  165. ccxt/kuna.py +27 -27
  166. ccxt/latoken.py +27 -27
  167. ccxt/lbank.py +35 -35
  168. ccxt/luno.py +19 -19
  169. ccxt/lykke.py +20 -20
  170. ccxt/mercado.py +17 -17
  171. ccxt/mexc.py +64 -64
  172. ccxt/ndax.py +38 -38
  173. ccxt/novadax.py +26 -26
  174. ccxt/oceanex.py +21 -21
  175. ccxt/okcoin.py +35 -35
  176. ccxt/okx.py +85 -85
  177. ccxt/onetrading.py +32 -32
  178. ccxt/p2b.py +14 -14
  179. ccxt/paymium.py +12 -12
  180. ccxt/phemex.py +50 -50
  181. ccxt/poloniex.py +35 -35
  182. ccxt/poloniexfutures.py +25 -21
  183. ccxt/pro/__init__.py +1 -1
  184. ccxt/pro/alpaca.py +8 -8
  185. ccxt/pro/ascendex.py +4 -4
  186. ccxt/pro/binance.py +56 -56
  187. ccxt/pro/bingx.py +5 -5
  188. ccxt/pro/bitfinex.py +6 -6
  189. ccxt/pro/bitfinex2.py +10 -10
  190. ccxt/pro/bitget.py +17 -17
  191. ccxt/pro/bithumb.py +6 -6
  192. ccxt/pro/bitmart.py +8 -8
  193. ccxt/pro/bitmex.py +16 -16
  194. ccxt/pro/bitopro.py +4 -4
  195. ccxt/pro/bitrue.py +8 -8
  196. ccxt/pro/bitstamp.py +5 -5
  197. ccxt/pro/bitvavo.py +14 -14
  198. ccxt/pro/blockchaincom.py +7 -7
  199. ccxt/pro/bybit.py +12 -12
  200. ccxt/pro/cex.py +20 -20
  201. ccxt/pro/coinbase.py +32 -2
  202. ccxt/pro/coinbaseexchange.py +10 -10
  203. ccxt/pro/coinbaseinternational.py +4 -4
  204. ccxt/pro/coincheck.py +2 -2
  205. ccxt/pro/coinex.py +15 -15
  206. ccxt/pro/coinone.py +4 -4
  207. ccxt/pro/cryptocom.py +11 -11
  208. ccxt/pro/currencycom.py +4 -4
  209. ccxt/pro/deribit.py +9 -9
  210. ccxt/pro/exmo.py +9 -9
  211. ccxt/pro/gate.py +12 -12
  212. ccxt/pro/gemini.py +11 -11
  213. ccxt/pro/hitbtc.py +13 -13
  214. ccxt/pro/hollaex.py +6 -6
  215. ccxt/pro/htx.py +15 -15
  216. ccxt/pro/huobijp.py +16 -16
  217. ccxt/pro/hyperliquid.py +9 -9
  218. ccxt/pro/idex.py +12 -12
  219. ccxt/pro/independentreserve.py +2 -2
  220. ccxt/pro/kraken.py +14 -14
  221. ccxt/pro/krakenfutures.py +12 -12
  222. ccxt/pro/kucoin.py +12 -12
  223. ccxt/pro/kucoinfutures.py +16 -16
  224. ccxt/pro/lbank.py +12 -12
  225. ccxt/pro/luno.py +4 -4
  226. ccxt/pro/mexc.py +14 -14
  227. ccxt/pro/ndax.py +12 -12
  228. ccxt/pro/okcoin.py +6 -6
  229. ccxt/pro/okx.py +30 -30
  230. ccxt/pro/onetrading.py +13 -13
  231. ccxt/pro/p2b.py +2 -2
  232. ccxt/pro/phemex.py +9 -9
  233. ccxt/pro/poloniex.py +9 -9
  234. ccxt/pro/poloniexfutures.py +10 -10
  235. ccxt/pro/probit.py +8 -8
  236. ccxt/pro/upbit.py +1 -1
  237. ccxt/pro/wazirx.py +10 -10
  238. ccxt/pro/whitebit.py +8 -8
  239. ccxt/pro/woo.py +14 -14
  240. ccxt/pro/woofipro.py +14 -14
  241. ccxt/probit.py +30 -30
  242. ccxt/test/base/test_shared_methods.py +1 -0
  243. ccxt/test/test_async.py +1 -1
  244. ccxt/test/test_sync.py +1 -1
  245. ccxt/timex.py +22 -22
  246. ccxt/tokocrypto.py +26 -26
  247. ccxt/tradeogre.py +12 -12
  248. ccxt/upbit.py +28 -28
  249. ccxt/wavesexchange.py +33 -33
  250. ccxt/wazirx.py +21 -21
  251. ccxt/whitebit.py +37 -37
  252. ccxt/woo.py +51 -51
  253. ccxt/woofipro.py +46 -46
  254. ccxt/yobit.py +20 -20
  255. ccxt/zaif.py +12 -12
  256. ccxt/zonda.py +22 -22
  257. {ccxt-4.3.30.dist-info → ccxt-4.3.32.dist-info}/METADATA +4 -4
  258. {ccxt-4.3.30.dist-info → ccxt-4.3.32.dist-info}/RECORD +260 -260
  259. {ccxt-4.3.30.dist-info → ccxt-4.3.32.dist-info}/WHEEL +0 -0
  260. {ccxt-4.3.30.dist-info → ccxt-4.3.32.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, CrossBorrowRate, CrossBorrowRates, Currencies, Currency, Int, MarginModification, Market, Num, Order, OrderBook, OrderRequest, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, TradingFeeInterface, Transaction, TransferEntry, TransferEntries
10
+ from ccxt.base.types import Balances, CrossBorrowRate, CrossBorrowRates, Currencies, Currency, Int, LeverageTier, LeverageTiers, MarginModification, Market, Num, Order, OrderBook, OrderRequest, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, TradingFeeInterface, Transaction, TransferEntry, TransferEntries
11
11
  from typing import List
12
12
  from ccxt.base.errors import ExchangeError
13
13
  from ccxt.base.errors import AuthenticationError
@@ -410,7 +410,7 @@ class digifinex(Exchange, ImplicitAPI):
410
410
  # }
411
411
  #
412
412
  data = self.safe_value(response, 'data', [])
413
- result = {}
413
+ result: dict = {}
414
414
  for i in range(0, len(data)):
415
415
  currency = data[i]
416
416
  id = self.safe_string(currency, 'currency')
@@ -433,7 +433,7 @@ class digifinex(Exchange, ImplicitAPI):
433
433
  networkCode = None
434
434
  if networkId is not None:
435
435
  networkCode = self.network_id_to_code(networkId)
436
- network = {
436
+ network: dict = {
437
437
  'info': currency,
438
438
  'id': networkId,
439
439
  'network': networkCode,
@@ -788,7 +788,7 @@ class digifinex(Exchange, ImplicitAPI):
788
788
  # "time_stamp": 1661487402396
789
789
  # }
790
790
  #
791
- result = {'info': response}
791
+ result: dict = {'info': response}
792
792
  for i in range(0, len(response)):
793
793
  balance = response[i]
794
794
  currencyId = self.safe_string(balance, 'currency')
@@ -878,7 +878,7 @@ class digifinex(Exchange, ImplicitAPI):
878
878
  self.load_markets()
879
879
  market = self.market(symbol)
880
880
  marketType, query = self.handle_market_type_and_params('fetchOrderBook', market, params)
881
- request = {}
881
+ request: dict = {}
882
882
  if limit is not None:
883
883
  request['limit'] = limit
884
884
  response = None
@@ -953,7 +953,7 @@ class digifinex(Exchange, ImplicitAPI):
953
953
  market = self.market(first)
954
954
  type = None
955
955
  type, params = self.handle_market_type_and_params('fetchTickers', market, params)
956
- request = {}
956
+ request: dict = {}
957
957
  response = None
958
958
  if type == 'swap':
959
959
  response = self.publicSwapGetPublicTickers(self.extend(request, params))
@@ -1007,7 +1007,7 @@ class digifinex(Exchange, ImplicitAPI):
1007
1007
  # ]
1008
1008
  # }
1009
1009
  #
1010
- result = {}
1010
+ result: dict = {}
1011
1011
  tickers = self.safe_value_2(response, 'ticker', 'data', [])
1012
1012
  date = self.safe_integer(response, 'date')
1013
1013
  for i in range(0, len(tickers)):
@@ -1030,7 +1030,7 @@ class digifinex(Exchange, ImplicitAPI):
1030
1030
  """
1031
1031
  self.load_markets()
1032
1032
  market = self.market(symbol)
1033
- request = {}
1033
+ request: dict = {}
1034
1034
  response = None
1035
1035
  if market['swap']:
1036
1036
  request['instrument_id'] = market['id']
@@ -1166,7 +1166,7 @@ class digifinex(Exchange, ImplicitAPI):
1166
1166
  'info': ticker,
1167
1167
  }, market)
1168
1168
 
1169
- def parse_trade(self, trade, market: Market = None) -> Trade:
1169
+ def parse_trade(self, trade: dict, market: Market = None) -> Trade:
1170
1170
  #
1171
1171
  # spot: fetchTrades
1172
1172
  #
@@ -1345,7 +1345,7 @@ class digifinex(Exchange, ImplicitAPI):
1345
1345
  """
1346
1346
  self.load_markets()
1347
1347
  market = self.market(symbol)
1348
- request = {}
1348
+ request: dict = {}
1349
1349
  if limit is not None:
1350
1350
  request['limit'] = min(limit, 100) if market['swap'] else limit
1351
1351
  response = None
@@ -1443,7 +1443,7 @@ class digifinex(Exchange, ImplicitAPI):
1443
1443
  """
1444
1444
  self.load_markets()
1445
1445
  market = self.market(symbol)
1446
- request = {}
1446
+ request: dict = {}
1447
1447
  response = None
1448
1448
  if market['swap']:
1449
1449
  request['instrument_id'] = market['id']
@@ -1592,7 +1592,7 @@ class digifinex(Exchange, ImplicitAPI):
1592
1592
  orderRequest = self.create_order_request(marketId, type, side, amount, price, orderParams)
1593
1593
  ordersRequests.append(orderRequest)
1594
1594
  market = self.market(symbol)
1595
- request = {}
1595
+ request: dict = {}
1596
1596
  response = None
1597
1597
  if market['swap']:
1598
1598
  response = self.privateSwapPostTradeBatchOrder(ordersRequests)
@@ -1630,7 +1630,7 @@ class digifinex(Exchange, ImplicitAPI):
1630
1630
  result = []
1631
1631
  for i in range(0, len(orders)):
1632
1632
  rawOrder = orders[i]
1633
- individualOrder = {}
1633
+ individualOrder: dict = {}
1634
1634
  individualOrder['order_id'] = data[i]
1635
1635
  individualOrder['instrument_id'] = market['id']
1636
1636
  individualOrder['amount'] = self.safe_number(rawOrder, 'amount')
@@ -1657,7 +1657,7 @@ class digifinex(Exchange, ImplicitAPI):
1657
1657
  marginMode, params = self.handle_margin_mode_and_params('createOrderRequest', params)
1658
1658
  if marginMode is not None:
1659
1659
  marketType = 'margin'
1660
- request = {}
1660
+ request: dict = {}
1661
1661
  swap = (marketType == 'swap')
1662
1662
  isMarketOrder = (type == 'market')
1663
1663
  isLimitOrder = (type == 'limit')
@@ -1762,7 +1762,7 @@ class digifinex(Exchange, ImplicitAPI):
1762
1762
  id = str(id)
1763
1763
  marketType = None
1764
1764
  marketType, params = self.handle_market_type_and_params('cancelOrder', market, params)
1765
- request = {
1765
+ request: dict = {
1766
1766
  'order_id': id,
1767
1767
  }
1768
1768
  if marketType == 'swap':
@@ -1822,7 +1822,7 @@ class digifinex(Exchange, ImplicitAPI):
1822
1822
  defaultType = self.safe_string(self.options, 'defaultType', 'spot')
1823
1823
  orderType = self.safe_string(params, 'type', defaultType)
1824
1824
  params = self.omit(params, 'type')
1825
- request = {
1825
+ request: dict = {
1826
1826
  'market': orderType,
1827
1827
  'order_id': ','.join(ids),
1828
1828
  }
@@ -1845,8 +1845,8 @@ class digifinex(Exchange, ImplicitAPI):
1845
1845
  raise OrderNotFound(self.id + ' cancelOrders() error')
1846
1846
  return response
1847
1847
 
1848
- def parse_order_status(self, status):
1849
- statuses = {
1848
+ def parse_order_status(self, status: Str):
1849
+ statuses: dict = {
1850
1850
  '0': 'open',
1851
1851
  '1': 'open', # partially filled
1852
1852
  '2': 'closed',
@@ -1855,7 +1855,7 @@ class digifinex(Exchange, ImplicitAPI):
1855
1855
  }
1856
1856
  return self.safe_string(statuses, status, status)
1857
1857
 
1858
- def parse_order(self, order, market: Market = None) -> Order:
1858
+ def parse_order(self, order: dict, market: Market = None) -> Order:
1859
1859
  #
1860
1860
  # spot: createOrder
1861
1861
  #
@@ -2006,7 +2006,7 @@ class digifinex(Exchange, ImplicitAPI):
2006
2006
  marketType = None
2007
2007
  marketType, params = self.handle_market_type_and_params('fetchOpenOrders', market, params)
2008
2008
  marginMode, query = self.handle_margin_mode_and_params('fetchOpenOrders', params)
2009
- request = {}
2009
+ request: dict = {}
2010
2010
  swap = (marketType == 'swap')
2011
2011
  if swap:
2012
2012
  if since is not None:
@@ -2100,7 +2100,7 @@ class digifinex(Exchange, ImplicitAPI):
2100
2100
  marketType = None
2101
2101
  marketType, params = self.handle_market_type_and_params('fetchOrders', market, params)
2102
2102
  marginMode, query = self.handle_margin_mode_and_params('fetchOrders', params)
2103
- request = {}
2103
+ request: dict = {}
2104
2104
  if marketType == 'swap':
2105
2105
  if since is not None:
2106
2106
  request['start_timestamp'] = since
@@ -2194,7 +2194,7 @@ class digifinex(Exchange, ImplicitAPI):
2194
2194
  marketType = None
2195
2195
  marketType, params = self.handle_market_type_and_params('fetchOrder', market, params)
2196
2196
  marginMode, query = self.handle_margin_mode_and_params('fetchOrder', params)
2197
- request = {
2197
+ request: dict = {
2198
2198
  'order_id': id,
2199
2199
  }
2200
2200
  if marketType == 'swap':
@@ -2279,7 +2279,7 @@ class digifinex(Exchange, ImplicitAPI):
2279
2279
  """
2280
2280
  self.load_markets()
2281
2281
  market = None
2282
- request = {}
2282
+ request: dict = {}
2283
2283
  if symbol is not None:
2284
2284
  market = self.market(symbol)
2285
2285
  marketType = None
@@ -2357,10 +2357,10 @@ class digifinex(Exchange, ImplicitAPI):
2357
2357
  return self.parse_trades(data, market, since, limit)
2358
2358
 
2359
2359
  def parse_ledger_entry_type(self, type):
2360
- types = {}
2360
+ types: dict = {}
2361
2361
  return self.safe_string(types, type, type)
2362
2362
 
2363
- def parse_ledger_entry(self, item, currency: Currency = None):
2363
+ def parse_ledger_entry(self, item: dict, currency: Currency = None):
2364
2364
  #
2365
2365
  # spot and margin
2366
2366
  #
@@ -2418,7 +2418,7 @@ class digifinex(Exchange, ImplicitAPI):
2418
2418
  :returns dict: a `ledger structure <https://docs.ccxt.com/#/?id=ledger-structure>`
2419
2419
  """
2420
2420
  self.load_markets()
2421
- request = {}
2421
+ request: dict = {}
2422
2422
  marketType = None
2423
2423
  marketType, params = self.handle_market_type_and_params('fetchLedger', None, params)
2424
2424
  marginMode, query = self.handle_margin_mode_and_params('fetchLedger', params)
@@ -2517,7 +2517,7 @@ class digifinex(Exchange, ImplicitAPI):
2517
2517
  """
2518
2518
  self.load_markets()
2519
2519
  currency = self.currency(code)
2520
- request = {
2520
+ request: dict = {
2521
2521
  'currency': currency['id'],
2522
2522
  }
2523
2523
  response = self.privateSpotGetDepositAddress(self.extend(request, params))
@@ -2544,7 +2544,7 @@ class digifinex(Exchange, ImplicitAPI):
2544
2544
  def fetch_transactions_by_type(self, type, code: Str = None, since: Int = None, limit: Int = None, params={}):
2545
2545
  self.load_markets()
2546
2546
  currency = None
2547
- request = {
2547
+ request: dict = {
2548
2548
  # 'currency': currency['id'],
2549
2549
  # 'from': 'fromId', # When direct is' prev ', from is 1, returning from old to new ascending, when direct is' next ', from is the ID of the most recent record, returned from the old descending order
2550
2550
  # 'size': 100, # default 100, max 500
@@ -2608,7 +2608,7 @@ class digifinex(Exchange, ImplicitAPI):
2608
2608
  def parse_transaction_status(self, status):
2609
2609
  # deposit state includes: 1(in deposit), 2(to be confirmed), 3(successfully deposited), 4(stopped)
2610
2610
  # withdrawal state includes: 1(application in progress), 2(to be confirmed), 3(completed), 4(rejected)
2611
- statuses = {
2611
+ statuses: dict = {
2612
2612
  '1': 'pending', # in Progress
2613
2613
  '2': 'pending', # to be confirmed
2614
2614
  '3': 'ok', # Completed
@@ -2616,7 +2616,7 @@ class digifinex(Exchange, ImplicitAPI):
2616
2616
  }
2617
2617
  return self.safe_string(statuses, status, status)
2618
2618
 
2619
- def parse_transaction(self, transaction, currency: Currency = None) -> Transaction:
2619
+ def parse_transaction(self, transaction: dict, currency: Currency = None) -> Transaction:
2620
2620
  #
2621
2621
  # withdraw
2622
2622
  #
@@ -2680,7 +2680,7 @@ class digifinex(Exchange, ImplicitAPI):
2680
2680
  }
2681
2681
 
2682
2682
  def parse_transfer_status(self, status: Str) -> Str:
2683
- statuses = {
2683
+ statuses: dict = {
2684
2684
  '0': 'ok',
2685
2685
  }
2686
2686
  return self.safe_string(statuses, status, status)
@@ -2740,7 +2740,7 @@ class digifinex(Exchange, ImplicitAPI):
2740
2740
  accountsByType = self.safe_value(self.options, 'accountsByType', {})
2741
2741
  fromId = self.safe_string(accountsByType, fromAccount, fromAccount)
2742
2742
  toId = self.safe_string(accountsByType, toAccount, toAccount)
2743
- request = {
2743
+ request: dict = {
2744
2744
  'currency_mark': currency['id'],
2745
2745
  'num': self.currency_to_precision(code, amount),
2746
2746
  'from': fromId, # 1 = SPOT, 2 = MARGIN, 3 = OTC
@@ -2768,7 +2768,7 @@ class digifinex(Exchange, ImplicitAPI):
2768
2768
  self.check_address(address)
2769
2769
  self.load_markets()
2770
2770
  currency = self.currency(code)
2771
- request = {
2771
+ request: dict = {
2772
2772
  # 'chain': 'ERC20', 'OMNI', 'TRC20', # required for USDT
2773
2773
  'address': address,
2774
2774
  'amount': self.currency_to_precision(code, amount),
@@ -2787,7 +2787,7 @@ class digifinex(Exchange, ImplicitAPI):
2787
2787
 
2788
2788
  def fetch_borrow_interest(self, code: Str = None, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
2789
2789
  self.load_markets()
2790
- request = {}
2790
+ request: dict = {}
2791
2791
  market = None
2792
2792
  if symbol is not None:
2793
2793
  market = self.market(symbol)
@@ -2818,7 +2818,7 @@ class digifinex(Exchange, ImplicitAPI):
2818
2818
  interest = self.parse_borrow_interests(rows, market)
2819
2819
  return self.filter_by_currency_since_limit(interest, code, since, limit)
2820
2820
 
2821
- def parse_borrow_interest(self, info, market: Market = None):
2821
+ def parse_borrow_interest(self, info: dict, market: Market = None):
2822
2822
  #
2823
2823
  # {
2824
2824
  # "amount": 0.0006103,
@@ -2860,7 +2860,7 @@ class digifinex(Exchange, ImplicitAPI):
2860
2860
  :returns dict: a `borrow rate structure <https://github.com/ccxt/ccxt/wiki/Manual#borrow-rate-structure>`
2861
2861
  """
2862
2862
  self.load_markets()
2863
- request = {}
2863
+ request: dict = {}
2864
2864
  response = self.privateSpotGetMarginAssets(self.extend(request, params))
2865
2865
  #
2866
2866
  # {
@@ -2946,7 +2946,7 @@ class digifinex(Exchange, ImplicitAPI):
2946
2946
  # "currency": "USDT"
2947
2947
  # },
2948
2948
  #
2949
- result = {}
2949
+ result: dict = {}
2950
2950
  for i in range(0, len(info)):
2951
2951
  item = info[i]
2952
2952
  currency = self.safe_string(item, codeKey)
@@ -2967,7 +2967,7 @@ class digifinex(Exchange, ImplicitAPI):
2967
2967
  market = self.market(symbol)
2968
2968
  if not market['swap']:
2969
2969
  raise BadSymbol(self.id + ' fetchFundingRate() supports swap contracts only')
2970
- request = {
2970
+ request: dict = {
2971
2971
  'instrument_id': market['id'],
2972
2972
  }
2973
2973
  response = self.publicSwapGetPublicFundingRate(self.extend(request, params))
@@ -3034,7 +3034,7 @@ class digifinex(Exchange, ImplicitAPI):
3034
3034
  market = self.market(symbol)
3035
3035
  if not market['swap']:
3036
3036
  raise BadSymbol(self.id + ' fetchFundingRateHistory() supports swap contracts only')
3037
- request = {
3037
+ request: dict = {
3038
3038
  'instrument_id': market['id'],
3039
3039
  }
3040
3040
  if since is not None:
@@ -3087,7 +3087,7 @@ class digifinex(Exchange, ImplicitAPI):
3087
3087
  market = self.market(symbol)
3088
3088
  if not market['swap']:
3089
3089
  raise BadRequest(self.id + ' fetchTradingFee() supports swap markets only')
3090
- request = {
3090
+ request: dict = {
3091
3091
  'instrument_id': market['id'],
3092
3092
  }
3093
3093
  response = self.privateSwapGetAccountTradingFeeRate(self.extend(request, params))
@@ -3104,7 +3104,7 @@ class digifinex(Exchange, ImplicitAPI):
3104
3104
  data = self.safe_value(response, 'data', {})
3105
3105
  return self.parse_trading_fee(data, market)
3106
3106
 
3107
- def parse_trading_fee(self, fee, market: Market = None) -> TradingFeeInterface:
3107
+ def parse_trading_fee(self, fee: dict, market: Market = None) -> TradingFeeInterface:
3108
3108
  #
3109
3109
  # {
3110
3110
  # "instrument_id": "BTCUSDTPERP",
@@ -3134,7 +3134,7 @@ class digifinex(Exchange, ImplicitAPI):
3134
3134
  """
3135
3135
  self.load_markets()
3136
3136
  symbols = self.market_symbols(symbols)
3137
- request = {}
3137
+ request: dict = {}
3138
3138
  market = None
3139
3139
  marketType = None
3140
3140
  if symbols is not None:
@@ -3232,7 +3232,7 @@ class digifinex(Exchange, ImplicitAPI):
3232
3232
  """
3233
3233
  self.load_markets()
3234
3234
  market = self.market(symbol)
3235
- request = {}
3235
+ request: dict = {}
3236
3236
  marketType = None
3237
3237
  marketType, params = self.handle_market_type_and_params('fetchPosition', market, params)
3238
3238
  marginMode, query = self.handle_margin_mode_and_params('fetchPosition', params)
@@ -3308,7 +3308,7 @@ class digifinex(Exchange, ImplicitAPI):
3308
3308
  position['marginRatio'] = self.safe_number(response, 'margin_rate')
3309
3309
  return position
3310
3310
 
3311
- def parse_position(self, position, market: Market = None):
3311
+ def parse_position(self, position: dict, market: Market = None):
3312
3312
  #
3313
3313
  # swap
3314
3314
  #
@@ -3408,7 +3408,7 @@ class digifinex(Exchange, ImplicitAPI):
3408
3408
  raise BadSymbol(self.id + ' setLeverage() supports swap contracts only')
3409
3409
  if (leverage < 1) or (leverage > 100):
3410
3410
  raise BadRequest(self.id + ' leverage should be between 1 and 100')
3411
- request = {
3411
+ request: dict = {
3412
3412
  'instrument_id': market['id'],
3413
3413
  'leverage': leverage,
3414
3414
  }
@@ -3450,7 +3450,7 @@ class digifinex(Exchange, ImplicitAPI):
3450
3450
  """
3451
3451
  self.load_markets()
3452
3452
  currency = None
3453
- request = {}
3453
+ request: dict = {}
3454
3454
  if code is not None:
3455
3455
  currency = self.safe_currency_code(code)
3456
3456
  request['currency'] = currency['id']
@@ -3477,7 +3477,7 @@ class digifinex(Exchange, ImplicitAPI):
3477
3477
  transfers = self.safe_list(response, 'data', [])
3478
3478
  return self.parse_transfers(transfers, currency, since, limit)
3479
3479
 
3480
- def fetch_leverage_tiers(self, symbols: Strings = None, params={}):
3480
+ def fetch_leverage_tiers(self, symbols: Strings = None, params={}) -> LeverageTiers:
3481
3481
  """
3482
3482
  :see: https://docs.digifinex.com/en-ww/swap/v2/rest.html#instruments
3483
3483
  retrieve information on the maximum leverage, for different trade sizes
@@ -3520,7 +3520,7 @@ class digifinex(Exchange, ImplicitAPI):
3520
3520
  symbols = self.market_symbols(symbols)
3521
3521
  return self.parse_leverage_tiers(data, symbols, 'instrument_id')
3522
3522
 
3523
- def fetch_market_leverage_tiers(self, symbol: str, params={}):
3523
+ def fetch_market_leverage_tiers(self, symbol: str, params={}) -> List[LeverageTier]:
3524
3524
  """
3525
3525
  :see: https://docs.digifinex.com/en-ww/swap/v2/rest.html#instrument
3526
3526
  retrieve information on the maximum leverage, for different trade sizes for a single market
@@ -3532,7 +3532,7 @@ class digifinex(Exchange, ImplicitAPI):
3532
3532
  market = self.market(symbol)
3533
3533
  if not market['swap']:
3534
3534
  raise BadRequest(self.id + ' fetchMarketLeverageTiers() supports swap markets only')
3535
- request = {
3535
+ request: dict = {
3536
3536
  'instrument_id': market['id'],
3537
3537
  }
3538
3538
  response = self.publicSwapGetPublicInstrument(self.extend(request, params))
@@ -3566,7 +3566,7 @@ class digifinex(Exchange, ImplicitAPI):
3566
3566
  data = self.safe_value(response, 'data', {})
3567
3567
  return self.parse_market_leverage_tiers(data, market)
3568
3568
 
3569
- def parse_market_leverage_tiers(self, info, market: Market = None):
3569
+ def parse_market_leverage_tiers(self, info, market: Market = None) -> List[LeverageTier]:
3570
3570
  #
3571
3571
  # {
3572
3572
  # "instrument_id": "BTCUSDTPERP",
@@ -3696,7 +3696,7 @@ class digifinex(Exchange, ImplicitAPI):
3696
3696
  # },
3697
3697
  # ]
3698
3698
  #
3699
- depositWithdrawFees = {}
3699
+ depositWithdrawFees: dict = {}
3700
3700
  codes = self.market_codes(codes)
3701
3701
  for i in range(0, len(response)):
3702
3702
  entry = response[i]
@@ -3710,11 +3710,11 @@ class digifinex(Exchange, ImplicitAPI):
3710
3710
  depositWithdrawFees[code]['info'].append(entry)
3711
3711
  networkId = self.safe_string(entry, 'chain')
3712
3712
  withdrawFee = self.safe_value(entry, 'min_withdraw_fee')
3713
- withdrawResult = {
3713
+ withdrawResult: dict = {
3714
3714
  'fee': withdrawFee,
3715
3715
  'percentage': False if (withdrawFee is not None) else None,
3716
3716
  }
3717
- depositResult = {
3717
+ depositResult: dict = {
3718
3718
  'fee': None,
3719
3719
  'percentage': None,
3720
3720
  }
@@ -3766,7 +3766,7 @@ class digifinex(Exchange, ImplicitAPI):
3766
3766
  self.load_markets()
3767
3767
  side = self.safe_string(params, 'side')
3768
3768
  market = self.market(symbol)
3769
- request = {
3769
+ request: dict = {
3770
3770
  'instrument_id': market['id'],
3771
3771
  'amount': self.number_to_string(amount),
3772
3772
  'type': type,
@@ -3827,7 +3827,7 @@ class digifinex(Exchange, ImplicitAPI):
3827
3827
  :returns dict: a `funding history structure <https://docs.ccxt.com/#/?id=funding-history-structure>`
3828
3828
  """
3829
3829
  self.load_markets()
3830
- request = {}
3830
+ request: dict = {}
3831
3831
  request, params = self.handle_until_option('end_timestamp', request, params)
3832
3832
  market = None
3833
3833
  if symbol is not None:
@@ -3892,7 +3892,7 @@ class digifinex(Exchange, ImplicitAPI):
3892
3892
  marginMode = marginMode.lower()
3893
3893
  if marginMode == 'cross':
3894
3894
  marginMode = 'crossed'
3895
- request = {
3895
+ request: dict = {
3896
3896
  'instrument_id': market['id'],
3897
3897
  'margin_mode': marginMode,
3898
3898
  }