ccxt 4.3.29__py2.py3-none-any.whl → 4.3.31__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/base/ws/aiohttp_client.py +1 -0
  15. ccxt/async_support/base/ws/future.py +27 -29
  16. ccxt/async_support/bigone.py +32 -32
  17. ccxt/async_support/binance.py +105 -96
  18. ccxt/async_support/bingx.py +22 -22
  19. ccxt/async_support/bit2c.py +13 -13
  20. ccxt/async_support/bitbank.py +19 -19
  21. ccxt/async_support/bitbns.py +17 -17
  22. ccxt/async_support/bitfinex.py +24 -24
  23. ccxt/async_support/bitfinex2.py +142 -109
  24. ccxt/async_support/bitflyer.py +23 -23
  25. ccxt/async_support/bitget.py +76 -76
  26. ccxt/async_support/bithumb.py +20 -20
  27. ccxt/async_support/bitmart.py +55 -55
  28. ccxt/async_support/bitmex.py +41 -41
  29. ccxt/async_support/bitopro.py +30 -30
  30. ccxt/async_support/bitrue.py +37 -37
  31. ccxt/async_support/bitso.py +30 -30
  32. ccxt/async_support/bitstamp.py +31 -31
  33. ccxt/async_support/bitteam.py +26 -26
  34. ccxt/async_support/bitvavo.py +27 -27
  35. ccxt/async_support/bl3p.py +8 -8
  36. ccxt/async_support/blockchaincom.py +24 -24
  37. ccxt/async_support/blofin.py +37 -37
  38. ccxt/async_support/btcalpha.py +19 -19
  39. ccxt/async_support/btcbox.py +11 -11
  40. ccxt/async_support/btcmarkets.py +22 -22
  41. ccxt/async_support/btcturk.py +13 -13
  42. ccxt/async_support/bybit.py +96 -96
  43. ccxt/async_support/cex.py +21 -21
  44. ccxt/async_support/coinbase.py +53 -53
  45. ccxt/async_support/coinbaseexchange.py +29 -29
  46. ccxt/async_support/coinbaseinternational.py +32 -32
  47. ccxt/async_support/coincheck.py +14 -14
  48. ccxt/async_support/coinex.py +424 -448
  49. ccxt/async_support/coinlist.py +35 -35
  50. ccxt/async_support/coinmate.py +22 -22
  51. ccxt/async_support/coinmetro.py +22 -22
  52. ccxt/async_support/coinone.py +18 -18
  53. ccxt/async_support/coinsph.py +32 -32
  54. ccxt/async_support/coinspot.py +8 -8
  55. ccxt/async_support/cryptocom.py +43 -43
  56. ccxt/async_support/currencycom.py +33 -33
  57. ccxt/async_support/delta.py +35 -35
  58. ccxt/async_support/deribit.py +54 -54
  59. ccxt/async_support/digifinex.py +56 -56
  60. ccxt/async_support/exmo.py +34 -34
  61. ccxt/async_support/gate.py +60 -60
  62. ccxt/async_support/gemini.py +24 -24
  63. ccxt/async_support/hitbtc.py +51 -51
  64. ccxt/async_support/hollaex.py +29 -29
  65. ccxt/async_support/htx.py +73 -73
  66. ccxt/async_support/huobijp.py +30 -30
  67. ccxt/async_support/hyperliquid.py +58 -58
  68. ccxt/async_support/idex.py +33 -33
  69. ccxt/async_support/independentreserve.py +12 -12
  70. ccxt/async_support/indodax.py +21 -21
  71. ccxt/async_support/kraken.py +46 -51
  72. ccxt/async_support/krakenfutures.py +29 -29
  73. ccxt/async_support/kucoin.py +51 -51
  74. ccxt/async_support/kucoinfutures.py +33 -33
  75. ccxt/async_support/kuna.py +27 -27
  76. ccxt/async_support/latoken.py +27 -27
  77. ccxt/async_support/lbank.py +35 -35
  78. ccxt/async_support/luno.py +19 -19
  79. ccxt/async_support/lykke.py +20 -20
  80. ccxt/async_support/mercado.py +17 -17
  81. ccxt/async_support/mexc.py +64 -64
  82. ccxt/async_support/ndax.py +38 -38
  83. ccxt/async_support/novadax.py +26 -26
  84. ccxt/async_support/oceanex.py +21 -21
  85. ccxt/async_support/okcoin.py +35 -35
  86. ccxt/async_support/okx.py +85 -85
  87. ccxt/async_support/onetrading.py +32 -32
  88. ccxt/async_support/p2b.py +14 -14
  89. ccxt/async_support/paymium.py +12 -12
  90. ccxt/async_support/phemex.py +50 -50
  91. ccxt/async_support/poloniex.py +35 -35
  92. ccxt/async_support/poloniexfutures.py +25 -21
  93. ccxt/async_support/probit.py +30 -30
  94. ccxt/async_support/timex.py +22 -22
  95. ccxt/async_support/tokocrypto.py +26 -26
  96. ccxt/async_support/tradeogre.py +12 -12
  97. ccxt/async_support/upbit.py +28 -28
  98. ccxt/async_support/wavesexchange.py +33 -33
  99. ccxt/async_support/wazirx.py +21 -21
  100. ccxt/async_support/whitebit.py +80 -40
  101. ccxt/async_support/woo.py +51 -51
  102. ccxt/async_support/woofipro.py +46 -46
  103. ccxt/async_support/yobit.py +20 -20
  104. ccxt/async_support/zaif.py +12 -12
  105. ccxt/async_support/zonda.py +22 -22
  106. ccxt/base/exchange.py +39 -35
  107. ccxt/base/types.py +13 -0
  108. ccxt/bigone.py +32 -32
  109. ccxt/binance.py +105 -96
  110. ccxt/bingx.py +22 -22
  111. ccxt/bit2c.py +13 -13
  112. ccxt/bitbank.py +19 -19
  113. ccxt/bitbns.py +17 -17
  114. ccxt/bitfinex.py +24 -24
  115. ccxt/bitfinex2.py +142 -109
  116. ccxt/bitflyer.py +23 -23
  117. ccxt/bitget.py +76 -76
  118. ccxt/bithumb.py +20 -20
  119. ccxt/bitmart.py +55 -55
  120. ccxt/bitmex.py +41 -41
  121. ccxt/bitopro.py +30 -30
  122. ccxt/bitrue.py +37 -37
  123. ccxt/bitso.py +30 -30
  124. ccxt/bitstamp.py +31 -31
  125. ccxt/bitteam.py +26 -26
  126. ccxt/bitvavo.py +27 -27
  127. ccxt/bl3p.py +8 -8
  128. ccxt/blockchaincom.py +24 -24
  129. ccxt/blofin.py +37 -37
  130. ccxt/btcalpha.py +19 -19
  131. ccxt/btcbox.py +11 -11
  132. ccxt/btcmarkets.py +22 -22
  133. ccxt/btcturk.py +13 -13
  134. ccxt/bybit.py +96 -96
  135. ccxt/cex.py +21 -21
  136. ccxt/coinbase.py +53 -53
  137. ccxt/coinbaseexchange.py +29 -29
  138. ccxt/coinbaseinternational.py +32 -32
  139. ccxt/coincheck.py +14 -14
  140. ccxt/coinex.py +424 -448
  141. ccxt/coinlist.py +35 -35
  142. ccxt/coinmate.py +22 -22
  143. ccxt/coinmetro.py +22 -22
  144. ccxt/coinone.py +18 -18
  145. ccxt/coinsph.py +32 -32
  146. ccxt/coinspot.py +8 -8
  147. ccxt/cryptocom.py +43 -43
  148. ccxt/currencycom.py +33 -33
  149. ccxt/delta.py +35 -35
  150. ccxt/deribit.py +54 -54
  151. ccxt/digifinex.py +56 -56
  152. ccxt/exmo.py +34 -34
  153. ccxt/gate.py +60 -60
  154. ccxt/gemini.py +24 -24
  155. ccxt/hitbtc.py +51 -51
  156. ccxt/hollaex.py +29 -29
  157. ccxt/htx.py +73 -73
  158. ccxt/huobijp.py +30 -30
  159. ccxt/hyperliquid.py +58 -58
  160. ccxt/idex.py +33 -33
  161. ccxt/independentreserve.py +12 -12
  162. ccxt/indodax.py +21 -21
  163. ccxt/kraken.py +46 -51
  164. ccxt/krakenfutures.py +29 -29
  165. ccxt/kucoin.py +51 -51
  166. ccxt/kucoinfutures.py +33 -33
  167. ccxt/kuna.py +27 -27
  168. ccxt/latoken.py +27 -27
  169. ccxt/lbank.py +35 -35
  170. ccxt/luno.py +19 -19
  171. ccxt/lykke.py +20 -20
  172. ccxt/mercado.py +17 -17
  173. ccxt/mexc.py +64 -64
  174. ccxt/ndax.py +38 -38
  175. ccxt/novadax.py +26 -26
  176. ccxt/oceanex.py +21 -21
  177. ccxt/okcoin.py +35 -35
  178. ccxt/okx.py +85 -85
  179. ccxt/onetrading.py +32 -32
  180. ccxt/p2b.py +14 -14
  181. ccxt/paymium.py +12 -12
  182. ccxt/phemex.py +50 -50
  183. ccxt/poloniex.py +35 -35
  184. ccxt/poloniexfutures.py +25 -21
  185. ccxt/pro/__init__.py +1 -1
  186. ccxt/pro/alpaca.py +8 -8
  187. ccxt/pro/ascendex.py +4 -4
  188. ccxt/pro/binance.py +56 -56
  189. ccxt/pro/bingx.py +5 -5
  190. ccxt/pro/bitfinex.py +6 -6
  191. ccxt/pro/bitfinex2.py +10 -10
  192. ccxt/pro/bitget.py +17 -17
  193. ccxt/pro/bithumb.py +6 -6
  194. ccxt/pro/bitmart.py +8 -8
  195. ccxt/pro/bitmex.py +16 -16
  196. ccxt/pro/bitopro.py +4 -4
  197. ccxt/pro/bitrue.py +8 -8
  198. ccxt/pro/bitstamp.py +5 -5
  199. ccxt/pro/bitvavo.py +14 -14
  200. ccxt/pro/blockchaincom.py +7 -7
  201. ccxt/pro/bybit.py +12 -12
  202. ccxt/pro/cex.py +19 -19
  203. ccxt/pro/coinbase.py +2 -2
  204. ccxt/pro/coinbaseexchange.py +10 -10
  205. ccxt/pro/coinbaseinternational.py +4 -4
  206. ccxt/pro/coincheck.py +2 -2
  207. ccxt/pro/coinex.py +15 -15
  208. ccxt/pro/coinone.py +4 -4
  209. ccxt/pro/cryptocom.py +11 -11
  210. ccxt/pro/currencycom.py +4 -4
  211. ccxt/pro/deribit.py +9 -9
  212. ccxt/pro/exmo.py +9 -9
  213. ccxt/pro/gate.py +12 -12
  214. ccxt/pro/gemini.py +11 -11
  215. ccxt/pro/hitbtc.py +13 -13
  216. ccxt/pro/hollaex.py +6 -6
  217. ccxt/pro/htx.py +15 -15
  218. ccxt/pro/huobijp.py +16 -16
  219. ccxt/pro/hyperliquid.py +9 -9
  220. ccxt/pro/idex.py +12 -12
  221. ccxt/pro/independentreserve.py +2 -2
  222. ccxt/pro/kraken.py +14 -14
  223. ccxt/pro/krakenfutures.py +12 -12
  224. ccxt/pro/kucoin.py +12 -12
  225. ccxt/pro/kucoinfutures.py +16 -16
  226. ccxt/pro/lbank.py +12 -12
  227. ccxt/pro/luno.py +4 -4
  228. ccxt/pro/mexc.py +14 -14
  229. ccxt/pro/ndax.py +12 -12
  230. ccxt/pro/okcoin.py +6 -6
  231. ccxt/pro/okx.py +30 -30
  232. ccxt/pro/onetrading.py +13 -13
  233. ccxt/pro/p2b.py +2 -2
  234. ccxt/pro/phemex.py +9 -9
  235. ccxt/pro/poloniex.py +9 -9
  236. ccxt/pro/poloniexfutures.py +10 -10
  237. ccxt/pro/probit.py +8 -8
  238. ccxt/pro/upbit.py +1 -1
  239. ccxt/pro/wazirx.py +10 -10
  240. ccxt/pro/whitebit.py +8 -8
  241. ccxt/pro/woo.py +14 -14
  242. ccxt/pro/woofipro.py +14 -14
  243. ccxt/probit.py +30 -30
  244. ccxt/test/base/test_shared_methods.py +1 -0
  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 +80 -40
  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.29.dist-info → ccxt-4.3.31.dist-info}/METADATA +4 -4
  258. {ccxt-4.3.29.dist-info → ccxt-4.3.31.dist-info}/RECORD +260 -260
  259. {ccxt-4.3.29.dist-info → ccxt-4.3.31.dist-info}/WHEEL +0 -0
  260. {ccxt-4.3.29.dist-info → ccxt-4.3.31.dist-info}/top_level.txt +0 -0
ccxt/cryptocom.py CHANGED
@@ -593,7 +593,7 @@ class cryptocom(Exchange, ImplicitAPI):
593
593
  """
594
594
  self.load_markets()
595
595
  market = None
596
- request = {}
596
+ request: dict = {}
597
597
  if symbols is not None:
598
598
  symbol = None
599
599
  if isinstance(symbols, list):
@@ -665,7 +665,7 @@ class cryptocom(Exchange, ImplicitAPI):
665
665
  if paginate:
666
666
  return self.fetch_paginated_call_dynamic('fetchOrders', symbol, since, limit, params)
667
667
  market = None
668
- request = {}
668
+ request: dict = {}
669
669
  if symbol is not None:
670
670
  market = self.market(symbol)
671
671
  request['instrument_name'] = market['id']
@@ -739,7 +739,7 @@ class cryptocom(Exchange, ImplicitAPI):
739
739
  if paginate:
740
740
  return self.fetch_paginated_call_dynamic('fetchTrades', symbol, since, limit, params)
741
741
  market = self.market(symbol)
742
- request = {
742
+ request: dict = {
743
743
  'instrument_name': market['id'],
744
744
  }
745
745
  if since is not None:
@@ -794,7 +794,7 @@ class cryptocom(Exchange, ImplicitAPI):
794
794
  if paginate:
795
795
  return self.fetch_paginated_call_deterministic('fetchOHLCV', symbol, since, limit, timeframe, params, 300)
796
796
  market = self.market(symbol)
797
- request = {
797
+ request: dict = {
798
798
  'instrument_name': market['id'],
799
799
  'timeframe': self.safe_string(self.timeframes, timeframe, timeframe),
800
800
  }
@@ -843,7 +843,7 @@ class cryptocom(Exchange, ImplicitAPI):
843
843
  """
844
844
  self.load_markets()
845
845
  market = self.market(symbol)
846
- request = {
846
+ request: dict = {
847
847
  'instrument_name': market['id'],
848
848
  }
849
849
  if limit:
@@ -877,7 +877,7 @@ class cryptocom(Exchange, ImplicitAPI):
877
877
  responseResult = self.safe_value(response, 'result', {})
878
878
  data = self.safe_value(responseResult, 'data', [])
879
879
  positionBalances = self.safe_value(data[0], 'position_balances', [])
880
- result = {'info': response}
880
+ result: dict = {'info': response}
881
881
  for i in range(0, len(positionBalances)):
882
882
  balance = positionBalances[i]
883
883
  currencyId = self.safe_string(balance, 'instrument_name')
@@ -954,7 +954,7 @@ class cryptocom(Exchange, ImplicitAPI):
954
954
  market = None
955
955
  if symbol is not None:
956
956
  market = self.market(symbol)
957
- request = {
957
+ request: dict = {
958
958
  'order_id': id,
959
959
  }
960
960
  response = self.v1PrivatePostPrivateGetOrderDetail(self.extend(request, params))
@@ -997,7 +997,7 @@ class cryptocom(Exchange, ImplicitAPI):
997
997
  def create_order_request(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: Num = None, params={}):
998
998
  market = self.market(symbol)
999
999
  uppercaseType = type.upper()
1000
- request = {
1000
+ request: dict = {
1001
1001
  'instrument_name': market['id'],
1002
1002
  'side': side.upper(),
1003
1003
  'quantity': self.amount_to_precision(symbol, amount),
@@ -1132,7 +1132,7 @@ class cryptocom(Exchange, ImplicitAPI):
1132
1132
  orderRequest = self.create_advanced_order_request(marketId, type, side, amount, price, orderParams)
1133
1133
  ordersRequests.append(orderRequest)
1134
1134
  contigency = self.safe_string(params, 'contingency_type', 'LIST')
1135
- request = {
1135
+ request: dict = {
1136
1136
  'contingency_type': contigency, # or OCO
1137
1137
  'order_list': ordersRequests,
1138
1138
  }
@@ -1192,7 +1192,7 @@ class cryptocom(Exchange, ImplicitAPI):
1192
1192
  # and market-buy orders need to send notional instead of quantity
1193
1193
  market = self.market(symbol)
1194
1194
  uppercaseType = type.upper()
1195
- request = {
1195
+ request: dict = {
1196
1196
  'instrument_name': market['id'],
1197
1197
  'side': side.upper(),
1198
1198
  }
@@ -1291,7 +1291,7 @@ class cryptocom(Exchange, ImplicitAPI):
1291
1291
  """
1292
1292
  self.load_markets()
1293
1293
  market = None
1294
- request = {}
1294
+ request: dict = {}
1295
1295
  if symbol is not None:
1296
1296
  market = self.market(symbol)
1297
1297
  request['instrument_name'] = market['id']
@@ -1310,7 +1310,7 @@ class cryptocom(Exchange, ImplicitAPI):
1310
1310
  market = None
1311
1311
  if symbol is not None:
1312
1312
  market = self.market(symbol)
1313
- request = {
1313
+ request: dict = {
1314
1314
  'order_id': id,
1315
1315
  }
1316
1316
  response = self.v1PrivatePostPrivateCancelOrder(self.extend(request, params))
@@ -1345,12 +1345,12 @@ class cryptocom(Exchange, ImplicitAPI):
1345
1345
  orderRequests = []
1346
1346
  for i in range(0, len(ids)):
1347
1347
  id = ids[i]
1348
- order = {
1348
+ order: dict = {
1349
1349
  'instrument_name': market['id'],
1350
1350
  'order_id': str(id),
1351
1351
  }
1352
1352
  orderRequests.append(order)
1353
- request = {
1353
+ request: dict = {
1354
1354
  'contingency_type': 'LIST',
1355
1355
  'order_list': orderRequests,
1356
1356
  }
@@ -1373,12 +1373,12 @@ class cryptocom(Exchange, ImplicitAPI):
1373
1373
  id = self.safe_string(order, 'id')
1374
1374
  symbol = self.safe_string(order, 'symbol')
1375
1375
  market = self.market(symbol)
1376
- orderItem = {
1376
+ orderItem: dict = {
1377
1377
  'instrument_name': market['id'],
1378
1378
  'order_id': str(id),
1379
1379
  }
1380
1380
  orderRequests.append(orderItem)
1381
- request = {
1381
+ request: dict = {
1382
1382
  'contingency_type': 'LIST',
1383
1383
  'order_list': orderRequests,
1384
1384
  }
@@ -1398,7 +1398,7 @@ class cryptocom(Exchange, ImplicitAPI):
1398
1398
  """
1399
1399
  self.load_markets()
1400
1400
  market = None
1401
- request = {}
1401
+ request: dict = {}
1402
1402
  if symbol is not None:
1403
1403
  market = self.market(symbol)
1404
1404
  request['instrument_name'] = market['id']
@@ -1461,7 +1461,7 @@ class cryptocom(Exchange, ImplicitAPI):
1461
1461
  paginate, params = self.handle_option_and_params(params, 'fetchMyTrades', 'paginate')
1462
1462
  if paginate:
1463
1463
  return self.fetch_paginated_call_dynamic('fetchMyTrades', symbol, since, limit, params)
1464
- request = {}
1464
+ request: dict = {}
1465
1465
  market = None
1466
1466
  if symbol is not None:
1467
1467
  market = self.market(symbol)
@@ -1534,7 +1534,7 @@ class cryptocom(Exchange, ImplicitAPI):
1534
1534
  tag, params = self.handle_withdraw_tag_and_params(tag, params)
1535
1535
  self.load_markets()
1536
1536
  currency = self.safe_currency(code) # for instance, USDC is not inferred from markets but it's still available
1537
- request = {
1537
+ request: dict = {
1538
1538
  'currency': currency['id'],
1539
1539
  'amount': amount,
1540
1540
  'address': address,
@@ -1576,7 +1576,7 @@ class cryptocom(Exchange, ImplicitAPI):
1576
1576
  """
1577
1577
  self.load_markets()
1578
1578
  currency = self.safe_currency(code)
1579
- request = {
1579
+ request: dict = {
1580
1580
  'currency': currency['id'],
1581
1581
  }
1582
1582
  response = self.v1PrivatePostPrivateGetDepositAddress(self.extend(request, params))
@@ -1604,7 +1604,7 @@ class cryptocom(Exchange, ImplicitAPI):
1604
1604
  addressesLength = len(addresses)
1605
1605
  if addressesLength == 0:
1606
1606
  raise ExchangeError(self.id + ' fetchDepositAddressesByNetwork() generating address...')
1607
- result = {}
1607
+ result: dict = {}
1608
1608
  for i in range(0, addressesLength):
1609
1609
  value = self.safe_value(addresses, i)
1610
1610
  addressString = self.safe_string(value, 'address')
@@ -1640,7 +1640,7 @@ class cryptocom(Exchange, ImplicitAPI):
1640
1640
  return depositAddresses[keys[0]]
1641
1641
 
1642
1642
  def safe_network(self, networkId):
1643
- networksById = {
1643
+ networksById: dict = {
1644
1644
  'BTC': 'BTC',
1645
1645
  'ETH': 'ETH',
1646
1646
  'SOL': 'SOL',
@@ -1664,7 +1664,7 @@ class cryptocom(Exchange, ImplicitAPI):
1664
1664
  """
1665
1665
  self.load_markets()
1666
1666
  currency = None
1667
- request = {}
1667
+ request: dict = {}
1668
1668
  if code is not None:
1669
1669
  currency = self.safe_currency(code)
1670
1670
  request['currency'] = currency['id']
@@ -1717,7 +1717,7 @@ class cryptocom(Exchange, ImplicitAPI):
1717
1717
  """
1718
1718
  self.load_markets()
1719
1719
  currency = None
1720
- request = {}
1720
+ request: dict = {}
1721
1721
  if code is not None:
1722
1722
  currency = self.safe_currency(code)
1723
1723
  request['currency'] = currency['id']
@@ -1820,7 +1820,7 @@ class cryptocom(Exchange, ImplicitAPI):
1820
1820
  'info': ticker,
1821
1821
  }, market)
1822
1822
 
1823
- def parse_trade(self, trade, market: Market = None) -> Trade:
1823
+ def parse_trade(self, trade: dict, market: Market = None) -> Trade:
1824
1824
  #
1825
1825
  # fetchTrades
1826
1826
  #
@@ -1899,8 +1899,8 @@ class cryptocom(Exchange, ImplicitAPI):
1899
1899
  self.safe_number(ohlcv, 'v'),
1900
1900
  ]
1901
1901
 
1902
- def parse_order_status(self, status):
1903
- statuses = {
1902
+ def parse_order_status(self, status: Str):
1903
+ statuses: dict = {
1904
1904
  'ACTIVE': 'open',
1905
1905
  'CANCELED': 'canceled',
1906
1906
  'FILLED': 'closed',
@@ -1909,15 +1909,15 @@ class cryptocom(Exchange, ImplicitAPI):
1909
1909
  }
1910
1910
  return self.safe_string(statuses, status, status)
1911
1911
 
1912
- def parse_time_in_force(self, timeInForce):
1913
- timeInForces = {
1912
+ def parse_time_in_force(self, timeInForce: Str):
1913
+ timeInForces: dict = {
1914
1914
  'GOOD_TILL_CANCEL': 'GTC',
1915
1915
  'IMMEDIATE_OR_CANCEL': 'IOC',
1916
1916
  'FILL_OR_KILL': 'FOK',
1917
1917
  }
1918
1918
  return self.safe_string(timeInForces, timeInForce, timeInForce)
1919
1919
 
1920
- def parse_order(self, order, market: Market = None) -> Order:
1920
+ def parse_order(self, order: dict, market: Market = None) -> Order:
1921
1921
  #
1922
1922
  # createOrder, cancelOrder
1923
1923
  #
@@ -2012,7 +2012,7 @@ class cryptocom(Exchange, ImplicitAPI):
2012
2012
  }, market)
2013
2013
 
2014
2014
  def parse_deposit_status(self, status):
2015
- statuses = {
2015
+ statuses: dict = {
2016
2016
  '0': 'pending',
2017
2017
  '1': 'ok',
2018
2018
  '2': 'failed',
@@ -2021,7 +2021,7 @@ class cryptocom(Exchange, ImplicitAPI):
2021
2021
  return self.safe_string(statuses, status, status)
2022
2022
 
2023
2023
  def parse_withdrawal_status(self, status):
2024
- statuses = {
2024
+ statuses: dict = {
2025
2025
  '0': 'pending',
2026
2026
  '1': 'pending',
2027
2027
  '2': 'failed',
@@ -2032,7 +2032,7 @@ class cryptocom(Exchange, ImplicitAPI):
2032
2032
  }
2033
2033
  return self.safe_string(statuses, status, status)
2034
2034
 
2035
- def parse_transaction(self, transaction, currency: Currency = None) -> Transaction:
2035
+ def parse_transaction(self, transaction: dict, currency: Currency = None) -> Transaction:
2036
2036
  #
2037
2037
  # fetchDeposits
2038
2038
  #
@@ -2156,7 +2156,7 @@ class cryptocom(Exchange, ImplicitAPI):
2156
2156
  #
2157
2157
  networkList = self.safe_value(fee, 'network_list')
2158
2158
  networkListLength = len(networkList)
2159
- result = {
2159
+ result: dict = {
2160
2160
  'info': fee,
2161
2161
  'withdraw': {
2162
2162
  'fee': None,
@@ -2209,7 +2209,7 @@ class cryptocom(Exchange, ImplicitAPI):
2209
2209
  :returns dict: a `ledger structure <https://docs.ccxt.com/#/?id=ledger-structure>`
2210
2210
  """
2211
2211
  self.load_markets()
2212
- request = {}
2212
+ request: dict = {}
2213
2213
  currency = None
2214
2214
  if code is not None:
2215
2215
  currency = self.safe_currency(code)
@@ -2255,7 +2255,7 @@ class cryptocom(Exchange, ImplicitAPI):
2255
2255
  ledger = self.safe_value(result, 'data', [])
2256
2256
  return self.parse_ledger(ledger, currency, since, limit)
2257
2257
 
2258
- def parse_ledger_entry(self, item, currency: Currency = None):
2258
+ def parse_ledger_entry(self, item: dict, currency: Currency = None):
2259
2259
  #
2260
2260
  # {
2261
2261
  # "account_id": "ce075cef-1234-4321-bd6e-gf9007351e64",
@@ -2307,7 +2307,7 @@ class cryptocom(Exchange, ImplicitAPI):
2307
2307
  }
2308
2308
 
2309
2309
  def parse_ledger_entry_type(self, type):
2310
- ledgerType = {
2310
+ ledgerType: dict = {
2311
2311
  'TRADING': 'trade',
2312
2312
  'TRADE_FEE': 'fee',
2313
2313
  'WITHDRAW_FEE': 'fee',
@@ -2431,7 +2431,7 @@ class cryptocom(Exchange, ImplicitAPI):
2431
2431
  self.check_required_argument('fetchSettlementHistory', type, 'type', ['future', 'option', 'WARRANT', 'FUTURE'])
2432
2432
  if type == 'option':
2433
2433
  type = 'WARRANT'
2434
- request = {
2434
+ request: dict = {
2435
2435
  'instrument_type': type.upper(),
2436
2436
  }
2437
2437
  response = self.v1PublicGetPublicGetExpiredSettlementPrice(self.extend(request, params))
@@ -2515,7 +2515,7 @@ class cryptocom(Exchange, ImplicitAPI):
2515
2515
  market = self.market(symbol)
2516
2516
  if not market['swap']:
2517
2517
  raise BadSymbol(self.id + ' fetchFundingRateHistory() supports swap contracts only')
2518
- request = {
2518
+ request: dict = {
2519
2519
  'instrument_name': market['id'],
2520
2520
  'valuation_type': 'funding_hist',
2521
2521
  }
@@ -2571,7 +2571,7 @@ class cryptocom(Exchange, ImplicitAPI):
2571
2571
  """
2572
2572
  self.load_markets()
2573
2573
  market = self.market(symbol)
2574
- request = {
2574
+ request: dict = {
2575
2575
  'instrument_name': market['id'],
2576
2576
  }
2577
2577
  response = self.v1PrivatePostPrivateGetPositions(self.extend(request, params))
@@ -2611,7 +2611,7 @@ class cryptocom(Exchange, ImplicitAPI):
2611
2611
  """
2612
2612
  self.load_markets()
2613
2613
  symbols = self.market_symbols(symbols)
2614
- request = {}
2614
+ request: dict = {}
2615
2615
  market = None
2616
2616
  if symbols is not None:
2617
2617
  symbol = None
@@ -2657,7 +2657,7 @@ class cryptocom(Exchange, ImplicitAPI):
2657
2657
  result.append(self.parse_position(entry, marketInner))
2658
2658
  return self.filter_by_array_positions(result, 'symbol', None, False)
2659
2659
 
2660
- def parse_position(self, position, market: Market = None):
2660
+ def parse_position(self, position: dict, market: Market = None):
2661
2661
  #
2662
2662
  # {
2663
2663
  # "account_id": "ce075bef-b600-4277-bd6e-ff9007251e63",
@@ -2749,7 +2749,7 @@ class cryptocom(Exchange, ImplicitAPI):
2749
2749
  """
2750
2750
  self.load_markets()
2751
2751
  market = self.market(symbol)
2752
- request = {
2752
+ request: dict = {
2753
2753
  'instrument_name': market['id'],
2754
2754
  'type': 'MARKET',
2755
2755
  }
ccxt/currencycom.py CHANGED
@@ -362,7 +362,7 @@ class currencycom(Exchange, ImplicitAPI):
362
362
  # },
363
363
  # ]
364
364
  #
365
- result = {}
365
+ result: dict = {}
366
366
  for i in range(0, len(response)):
367
367
  currency = response[i]
368
368
  id = self.safe_string(currency, 'displaySymbol')
@@ -498,7 +498,7 @@ class currencycom(Exchange, ImplicitAPI):
498
498
  if (maxPrice is not None) and (Precise.string_gt(maxPrice, '0')):
499
499
  limitPriceMax = maxPrice
500
500
  precisionAmount = self.parse_number(self.parse_precision(self.safe_string(market, 'baseAssetPrecision')))
501
- limitAmount = {
501
+ limitAmount: dict = {
502
502
  'min': None,
503
503
  'max': None,
504
504
  }
@@ -509,7 +509,7 @@ class currencycom(Exchange, ImplicitAPI):
509
509
  'min': self.safe_number(filter, 'minQty'),
510
510
  'max': self.safe_number(filter, 'maxQty'),
511
511
  }
512
- limitMarket = {
512
+ limitMarket: dict = {
513
513
  'min': None,
514
514
  'max': None,
515
515
  }
@@ -654,7 +654,7 @@ class currencycom(Exchange, ImplicitAPI):
654
654
  #
655
655
  makerFee = self.safe_number(response, 'makerCommission')
656
656
  takerFee = self.safe_number(response, 'takerCommission')
657
- result = {}
657
+ result: dict = {}
658
658
  for i in range(0, len(self.symbols)):
659
659
  symbol = self.symbols[i]
660
660
  result[symbol] = {
@@ -690,7 +690,7 @@ class currencycom(Exchange, ImplicitAPI):
690
690
  # ]
691
691
  # }
692
692
  #
693
- result = {'info': response}
693
+ result: dict = {'info': response}
694
694
  balances = self.safe_value(response, 'balances', [])
695
695
  for i in range(0, len(balances)):
696
696
  balance = balances[i]
@@ -755,7 +755,7 @@ class currencycom(Exchange, ImplicitAPI):
755
755
  """
756
756
  self.load_markets()
757
757
  market = self.market(symbol)
758
- request = {
758
+ request: dict = {
759
759
  'symbol': market['id'],
760
760
  }
761
761
  if limit is not None:
@@ -868,7 +868,7 @@ class currencycom(Exchange, ImplicitAPI):
868
868
  """
869
869
  self.load_markets()
870
870
  market = self.market(symbol)
871
- request = {
871
+ request: dict = {
872
872
  'symbol': market['id'],
873
873
  }
874
874
  response = self.publicGetV2Ticker24hr(self.extend(request, params))
@@ -957,7 +957,7 @@ class currencycom(Exchange, ImplicitAPI):
957
957
  """
958
958
  self.load_markets()
959
959
  market = self.market(symbol)
960
- request = {
960
+ request: dict = {
961
961
  'symbol': market['id'],
962
962
  'interval': self.safe_string(self.timeframes, timeframe, timeframe),
963
963
  }
@@ -975,7 +975,7 @@ class currencycom(Exchange, ImplicitAPI):
975
975
  #
976
976
  return self.parse_ohlcvs(response, market, timeframe, since, limit)
977
977
 
978
- def parse_trade(self, trade, market: Market = None) -> Trade:
978
+ def parse_trade(self, trade: dict, market: Market = None) -> Trade:
979
979
  #
980
980
  # fetchTrades(public aggregate trades)
981
981
  #
@@ -1062,7 +1062,7 @@ class currencycom(Exchange, ImplicitAPI):
1062
1062
  """
1063
1063
  self.load_markets()
1064
1064
  market = self.market(symbol)
1065
- request = {
1065
+ request: dict = {
1066
1066
  'symbol': market['id'],
1067
1067
  # 'limit': 500, # default 500, max 1000
1068
1068
  }
@@ -1084,7 +1084,7 @@ class currencycom(Exchange, ImplicitAPI):
1084
1084
  #
1085
1085
  return self.parse_trades(response, market, since, limit)
1086
1086
 
1087
- def parse_order(self, order, market: Market = None) -> Order:
1087
+ def parse_order(self, order: dict, market: Market = None) -> Order:
1088
1088
  #
1089
1089
  # createOrder
1090
1090
  #
@@ -1188,8 +1188,8 @@ class currencycom(Exchange, ImplicitAPI):
1188
1188
  'trades': fills,
1189
1189
  }, market)
1190
1190
 
1191
- def parse_order_status(self, status):
1192
- statuses = {
1191
+ def parse_order_status(self, status: Str):
1192
+ statuses: dict = {
1193
1193
  'NEW': 'open',
1194
1194
  'CREATED': 'open',
1195
1195
  'MODIFIED': 'open',
@@ -1203,7 +1203,7 @@ class currencycom(Exchange, ImplicitAPI):
1203
1203
  return self.safe_string(statuses, status, status)
1204
1204
 
1205
1205
  def parse_order_type(self, status):
1206
- statuses = {
1206
+ statuses: dict = {
1207
1207
  'MARKET': 'market',
1208
1208
  'LIMIT': 'limit',
1209
1209
  'STOP': 'stop',
@@ -1217,7 +1217,7 @@ class currencycom(Exchange, ImplicitAPI):
1217
1217
  return self.safe_string(statuses, status, status)
1218
1218
 
1219
1219
  def parse_order_time_in_force(self, status):
1220
- statuses = {
1220
+ statuses: dict = {
1221
1221
  'GTC': 'GTC',
1222
1222
  'FOK': 'FOK',
1223
1223
  'IOC': 'IOC',
@@ -1225,7 +1225,7 @@ class currencycom(Exchange, ImplicitAPI):
1225
1225
  return self.safe_string(statuses, status, status)
1226
1226
 
1227
1227
  def parse_order_side(self, status):
1228
- statuses = {
1228
+ statuses: dict = {
1229
1229
  'BUY': 'buy',
1230
1230
  'SELL': 'sell',
1231
1231
  }
@@ -1252,7 +1252,7 @@ class currencycom(Exchange, ImplicitAPI):
1252
1252
  if accountId is None:
1253
1253
  raise ArgumentsRequired(self.id + " createOrder() requires an accountId parameter or an exchange.options['accountId'] option for " + market['type'] + ' markets')
1254
1254
  newOrderRespType = self.safe_value(self.options['newOrderRespType'], type, 'RESULT')
1255
- request = {
1255
+ request: dict = {
1256
1256
  'symbol': market['id'],
1257
1257
  'quantity': self.amount_to_precision(symbol, amount),
1258
1258
  'type': type.upper(),
@@ -1331,7 +1331,7 @@ class currencycom(Exchange, ImplicitAPI):
1331
1331
  raise ArgumentsRequired(self.id + ' fetchOrder() requires a symbol argument')
1332
1332
  self.load_markets()
1333
1333
  market = self.market(symbol)
1334
- request = {
1334
+ request: dict = {
1335
1335
  'orderId': id,
1336
1336
  'symbol': market['id'],
1337
1337
  }
@@ -1372,7 +1372,7 @@ class currencycom(Exchange, ImplicitAPI):
1372
1372
  """
1373
1373
  self.load_markets()
1374
1374
  market = None
1375
- request = {}
1375
+ request: dict = {}
1376
1376
  if symbol is not None:
1377
1377
  market = self.market(symbol)
1378
1378
  request['symbol'] = market['id']
@@ -1417,7 +1417,7 @@ class currencycom(Exchange, ImplicitAPI):
1417
1417
  self.load_markets()
1418
1418
  market = self.market(symbol)
1419
1419
  origClientOrderId = self.safe_value(params, 'origClientOrderId')
1420
- request = {
1420
+ request: dict = {
1421
1421
  'symbol': market['id'],
1422
1422
  # 'orderId': int(id),
1423
1423
  # 'origClientOrderId': id,
@@ -1456,7 +1456,7 @@ class currencycom(Exchange, ImplicitAPI):
1456
1456
  raise ArgumentsRequired(self.id + ' fetchMyTrades() requires a symbol argument')
1457
1457
  self.load_markets()
1458
1458
  market = self.market(symbol)
1459
- request = {
1459
+ request: dict = {
1460
1460
  'symbol': market['id'],
1461
1461
  }
1462
1462
  if limit is not None:
@@ -1520,7 +1520,7 @@ class currencycom(Exchange, ImplicitAPI):
1520
1520
 
1521
1521
  def fetch_transactions_by_method(self, method, code: Str = None, since: Int = None, limit: Int = None, params={}):
1522
1522
  self.load_markets()
1523
- request = {}
1523
+ request: dict = {}
1524
1524
  currency = None
1525
1525
  if code is not None:
1526
1526
  currency = self.currency(code)
@@ -1555,7 +1555,7 @@ class currencycom(Exchange, ImplicitAPI):
1555
1555
  #
1556
1556
  return self.parse_transactions(response, currency, since, limit, params)
1557
1557
 
1558
- def parse_transaction(self, transaction, currency: Currency = None) -> Transaction:
1558
+ def parse_transaction(self, transaction: dict, currency: Currency = None) -> Transaction:
1559
1559
  #
1560
1560
  # {
1561
1561
  # "id": "616769213",
@@ -1606,14 +1606,14 @@ class currencycom(Exchange, ImplicitAPI):
1606
1606
  }
1607
1607
 
1608
1608
  def parse_transaction_status(self, status):
1609
- statuses = {
1609
+ statuses: dict = {
1610
1610
  'APPROVAL': 'pending',
1611
1611
  'PROCESSED': 'ok',
1612
1612
  }
1613
1613
  return self.safe_string(statuses, status, status)
1614
1614
 
1615
1615
  def parse_transaction_type(self, type):
1616
- types = {
1616
+ types: dict = {
1617
1617
  'deposit': 'deposit',
1618
1618
  'withdrawal': 'withdrawal',
1619
1619
  }
@@ -1630,7 +1630,7 @@ class currencycom(Exchange, ImplicitAPI):
1630
1630
  :returns dict: a `ledger structure <https://docs.ccxt.com/#/?id=ledger-structure>`
1631
1631
  """
1632
1632
  self.load_markets()
1633
- request = {}
1633
+ request: dict = {}
1634
1634
  currency = None
1635
1635
  if code is not None:
1636
1636
  currency = self.currency(code)
@@ -1668,7 +1668,7 @@ class currencycom(Exchange, ImplicitAPI):
1668
1668
  #
1669
1669
  return self.parse_ledger(response, currency, since, limit)
1670
1670
 
1671
- def parse_ledger_entry(self, item, currency: Currency = None):
1671
+ def parse_ledger_entry(self, item: dict, currency: Currency = None):
1672
1672
  id = self.safe_string(item, 'id')
1673
1673
  amountString = self.safe_string(item, 'amount')
1674
1674
  amount = Precise.string_abs(amountString)
@@ -1680,7 +1680,7 @@ class currencycom(Exchange, ImplicitAPI):
1680
1680
  if feeCost is not None:
1681
1681
  fee = {'currency': code, 'cost': feeCost}
1682
1682
  direction = 'out' if Precise.string_lt(amountString, '0') else 'in'
1683
- result = {
1683
+ result: dict = {
1684
1684
  'id': id,
1685
1685
  'timestamp': timestamp,
1686
1686
  'datetime': self.iso8601(timestamp),
@@ -1700,7 +1700,7 @@ class currencycom(Exchange, ImplicitAPI):
1700
1700
  return result
1701
1701
 
1702
1702
  def parse_ledger_entry_status(self, status):
1703
- statuses = {
1703
+ statuses: dict = {
1704
1704
  'APPROVAL': 'pending',
1705
1705
  'PROCESSED': 'ok',
1706
1706
  'CANCELLED': 'canceled',
@@ -1708,7 +1708,7 @@ class currencycom(Exchange, ImplicitAPI):
1708
1708
  return self.safe_string(statuses, status, status)
1709
1709
 
1710
1710
  def parse_ledger_entry_type(self, type):
1711
- types = {
1711
+ types: dict = {
1712
1712
  'deposit': 'transaction',
1713
1713
  'withdrawal': 'transaction',
1714
1714
  'exchange_commission': 'fee',
@@ -1725,7 +1725,7 @@ class currencycom(Exchange, ImplicitAPI):
1725
1725
  """
1726
1726
  self.load_markets()
1727
1727
  market = self.market(symbol)
1728
- request = {
1728
+ request: dict = {
1729
1729
  'symbol': market['id'],
1730
1730
  }
1731
1731
  response = self.privateGetV2LeverageSettings(self.extend(request, params))
@@ -1757,7 +1757,7 @@ class currencycom(Exchange, ImplicitAPI):
1757
1757
  """
1758
1758
  self.load_markets()
1759
1759
  currency = self.currency(code)
1760
- request = {
1760
+ request: dict = {
1761
1761
  'coin': currency['id'],
1762
1762
  }
1763
1763
  response = self.privateGetV2DepositAddress(self.extend(request, params))
@@ -1851,7 +1851,7 @@ class currencycom(Exchange, ImplicitAPI):
1851
1851
  data = self.safe_list(response, 'positions', [])
1852
1852
  return self.parse_positions(data, symbols)
1853
1853
 
1854
- def parse_position(self, position, market: Market = None):
1854
+ def parse_position(self, position: dict, market: Market = None):
1855
1855
  #
1856
1856
  # {
1857
1857
  # "accountId": "109698017416453793",