ccxt 4.3.30__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 (258) 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 +168 -139
  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 +35 -35
  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 +168 -139
  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 +19 -19
  201. ccxt/pro/coinbase.py +2 -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/timex.py +22 -22
  244. ccxt/tokocrypto.py +26 -26
  245. ccxt/tradeogre.py +12 -12
  246. ccxt/upbit.py +28 -28
  247. ccxt/wavesexchange.py +33 -33
  248. ccxt/wazirx.py +21 -21
  249. ccxt/whitebit.py +37 -37
  250. ccxt/woo.py +51 -51
  251. ccxt/woofipro.py +46 -46
  252. ccxt/yobit.py +20 -20
  253. ccxt/zaif.py +12 -12
  254. ccxt/zonda.py +22 -22
  255. {ccxt-4.3.30.dist-info → ccxt-4.3.31.dist-info}/METADATA +4 -4
  256. {ccxt-4.3.30.dist-info → ccxt-4.3.31.dist-info}/RECORD +258 -258
  257. {ccxt-4.3.30.dist-info → ccxt-4.3.31.dist-info}/WHEEL +0 -0
  258. {ccxt-4.3.30.dist-info → ccxt-4.3.31.dist-info}/top_level.txt +0 -0
ccxt/woofipro.py CHANGED
@@ -539,7 +539,7 @@ class woofipro(Exchange, ImplicitAPI):
539
539
  :param dict [params]: extra parameters specific to the exchange API endpoint
540
540
  :returns dict: an associative dictionary of currencies
541
541
  """
542
- result = {}
542
+ result: dict = {}
543
543
  response = self.v1PublicGetPublicToken(params)
544
544
  #
545
545
  # {
@@ -571,7 +571,7 @@ class woofipro(Exchange, ImplicitAPI):
571
571
  networks = self.safe_list(token, 'chain_details')
572
572
  code = self.safe_currency_code(currencyId)
573
573
  minPrecision = None
574
- resultingNetworks = {}
574
+ resultingNetworks: dict = {}
575
575
  for j in range(0, len(networks)):
576
576
  network = networks[j]
577
577
  # TODO: transform chain id to human readable name
@@ -635,7 +635,7 @@ class woofipro(Exchange, ImplicitAPI):
635
635
  }
636
636
  return fee
637
637
 
638
- def parse_trade(self, trade, market: Market = None) -> Trade:
638
+ def parse_trade(self, trade: dict, market: Market = None) -> Trade:
639
639
  #
640
640
  # public/market_trades
641
641
  #
@@ -707,7 +707,7 @@ class woofipro(Exchange, ImplicitAPI):
707
707
  """
708
708
  self.load_markets()
709
709
  market = self.market(symbol)
710
- request = {
710
+ request: dict = {
711
711
  'symbol': market['id'],
712
712
  }
713
713
  if limit is not None:
@@ -780,7 +780,7 @@ class woofipro(Exchange, ImplicitAPI):
780
780
  """
781
781
  self.load_markets()
782
782
  market = self.market(symbol)
783
- request = {
783
+ request: dict = {
784
784
  'symbol': market['id'],
785
785
  }
786
786
  response = self.v1PublicGetPublicFundingRateSymbol(self.extend(request, params))
@@ -852,7 +852,7 @@ class woofipro(Exchange, ImplicitAPI):
852
852
  paginate, params = self.handle_option_and_params(params, 'fetchFundingRateHistory', 'paginate')
853
853
  if paginate:
854
854
  return self.fetch_paginated_call_incremental('fetchFundingRateHistory', symbol, since, limit, params, 'page', 25)
855
- request = {}
855
+ request: dict = {}
856
856
  if symbol is not None:
857
857
  market = self.market(symbol)
858
858
  symbol = market['symbol']
@@ -936,7 +936,7 @@ class woofipro(Exchange, ImplicitAPI):
936
936
  data = self.safe_dict(response, 'data', {})
937
937
  maker = self.safe_string(data, 'futures_maker_fee_rate')
938
938
  taker = self.safe_string(data, 'futures_taker_fee_rate')
939
- result = {}
939
+ result: dict = {}
940
940
  for i in range(0, len(self.symbols)):
941
941
  symbol = self.symbols[i]
942
942
  result[symbol] = {
@@ -960,7 +960,7 @@ class woofipro(Exchange, ImplicitAPI):
960
960
  """
961
961
  self.load_markets()
962
962
  market = self.market(symbol)
963
- request = {
963
+ request: dict = {
964
964
  'symbol': market['id'],
965
965
  }
966
966
  if limit is not None:
@@ -1011,7 +1011,7 @@ class woofipro(Exchange, ImplicitAPI):
1011
1011
  """
1012
1012
  self.load_markets()
1013
1013
  market = self.market(symbol)
1014
- request = {
1014
+ request: dict = {
1015
1015
  'symbol': market['id'],
1016
1016
  'type': self.safe_string(self.timeframes, timeframe, timeframe),
1017
1017
  }
@@ -1042,7 +1042,7 @@ class woofipro(Exchange, ImplicitAPI):
1042
1042
  rows = self.safe_list(data, 'rows', [])
1043
1043
  return self.parse_ohlcvs(rows, market, timeframe, since, limit)
1044
1044
 
1045
- def parse_order(self, order, market: Market = None) -> Order:
1045
+ def parse_order(self, order: dict, market: Market = None) -> Order:
1046
1046
  #
1047
1047
  # Possible input functions:
1048
1048
  # * createOrder
@@ -1155,17 +1155,17 @@ class woofipro(Exchange, ImplicitAPI):
1155
1155
  'info': order,
1156
1156
  }, market)
1157
1157
 
1158
- def parse_time_in_force(self, timeInForce):
1159
- timeInForces = {
1158
+ def parse_time_in_force(self, timeInForce: Str):
1159
+ timeInForces: dict = {
1160
1160
  'ioc': 'IOC',
1161
1161
  'fok': 'FOK',
1162
1162
  'post_only': 'PO',
1163
1163
  }
1164
1164
  return self.safe_string(timeInForces, timeInForce, None)
1165
1165
 
1166
- def parse_order_status(self, status):
1166
+ def parse_order_status(self, status: Str):
1167
1167
  if status is not None:
1168
- statuses = {
1168
+ statuses: dict = {
1169
1169
  'NEW': 'open',
1170
1170
  'FILLED': 'closed',
1171
1171
  'CANCEL_SENT': 'canceled',
@@ -1179,8 +1179,8 @@ class woofipro(Exchange, ImplicitAPI):
1179
1179
  return self.safe_string(statuses, status, status)
1180
1180
  return status
1181
1181
 
1182
- def parse_order_type(self, type):
1183
- types = {
1182
+ def parse_order_type(self, type: Str):
1183
+ types: dict = {
1184
1184
  'LIMIT': 'limit',
1185
1185
  'MARKET': 'market',
1186
1186
  'POST_ONLY': 'limit',
@@ -1203,7 +1203,7 @@ class woofipro(Exchange, ImplicitAPI):
1203
1203
  orderType = type.upper()
1204
1204
  market = self.market(symbol)
1205
1205
  orderSide = side.upper()
1206
- request = {
1206
+ request: dict = {
1207
1207
  'symbol': market['id'],
1208
1208
  'side': orderSide,
1209
1209
  }
@@ -1242,7 +1242,7 @@ class woofipro(Exchange, ImplicitAPI):
1242
1242
  request['algo_type'] = 'STOP'
1243
1243
  elif (stopLoss is not None) or (takeProfit is not None):
1244
1244
  request['algo_type'] = 'TP_SL'
1245
- outterOrder = {
1245
+ outterOrder: dict = {
1246
1246
  'symbol': market['id'],
1247
1247
  'reduce_only': False,
1248
1248
  'algo_type': 'POSITIONAL_TP_SL',
@@ -1251,7 +1251,7 @@ class woofipro(Exchange, ImplicitAPI):
1251
1251
  closeSide = 'SELL' if (orderSide == 'BUY') else 'BUY'
1252
1252
  if stopLoss is not None:
1253
1253
  stopLossPrice = self.safe_number_2(stopLoss, 'triggerPrice', 'price', stopLoss)
1254
- stopLossOrder = {
1254
+ stopLossOrder: dict = {
1255
1255
  'side': closeSide,
1256
1256
  'algo_type': 'TP_SL',
1257
1257
  'trigger_price': self.price_to_precision(symbol, stopLossPrice),
@@ -1261,7 +1261,7 @@ class woofipro(Exchange, ImplicitAPI):
1261
1261
  outterOrder['child_orders'].append(stopLossOrder)
1262
1262
  if takeProfit is not None:
1263
1263
  takeProfitPrice = self.safe_number_2(takeProfit, 'triggerPrice', 'price', takeProfit)
1264
- takeProfitOrder = {
1264
+ takeProfitOrder: dict = {
1265
1265
  'side': closeSide,
1266
1266
  'algo_type': 'TP_SL',
1267
1267
  'trigger_price': self.price_to_precision(symbol, takeProfitPrice),
@@ -1364,7 +1364,7 @@ class woofipro(Exchange, ImplicitAPI):
1364
1364
  raise NotSupported(self.id + 'createOrders() only support non-stop order')
1365
1365
  orderRequest = self.create_order_request(marketId, type, side, amount, price, orderParams)
1366
1366
  ordersRequests.append(orderRequest)
1367
- request = {
1367
+ request: dict = {
1368
1368
  'orders': ordersRequests,
1369
1369
  }
1370
1370
  response = self.v1PrivatePostBatchOrder(self.extend(request, params))
@@ -1408,7 +1408,7 @@ class woofipro(Exchange, ImplicitAPI):
1408
1408
  """
1409
1409
  self.load_markets()
1410
1410
  market = self.market(symbol)
1411
- request = {
1411
+ request: dict = {
1412
1412
  'order_id': id,
1413
1413
  }
1414
1414
  stopPrice = self.safe_string_n(params, ['triggerPrice', 'stopPrice', 'takeProfitPrice', 'stopLossPrice'])
@@ -1482,7 +1482,7 @@ class woofipro(Exchange, ImplicitAPI):
1482
1482
  market: Market = None
1483
1483
  if symbol is not None:
1484
1484
  market = self.market(symbol)
1485
- request = {
1485
+ request: dict = {
1486
1486
  'symbol': market['id'],
1487
1487
  }
1488
1488
  clientOrderIdUnified = self.safe_string_2(params, 'clOrdID', 'clientOrderId')
@@ -1520,7 +1520,7 @@ class woofipro(Exchange, ImplicitAPI):
1520
1520
  # "status": "CANCEL_SENT"
1521
1521
  # }
1522
1522
  #
1523
- extendParams = {'symbol': symbol}
1523
+ extendParams: dict = {'symbol': symbol}
1524
1524
  if isByClientOrder:
1525
1525
  extendParams['client_order_id'] = clientOrderIdExchangeSpecific
1526
1526
  else:
@@ -1544,7 +1544,7 @@ class woofipro(Exchange, ImplicitAPI):
1544
1544
  self.load_markets()
1545
1545
  clientOrderIds = self.safe_list_n(params, ['clOrdIDs', 'clientOrderIds', 'client_order_ids'])
1546
1546
  params = self.omit(params, ['clOrdIDs', 'clientOrderIds', 'client_order_ids'])
1547
- request = {}
1547
+ request: dict = {}
1548
1548
  response = None
1549
1549
  if clientOrderIds:
1550
1550
  request['client_order_ids'] = ','.join(clientOrderIds)
@@ -1576,7 +1576,7 @@ class woofipro(Exchange, ImplicitAPI):
1576
1576
  self.load_markets()
1577
1577
  stop = self.safe_bool_2(params, 'stop', 'trigger')
1578
1578
  params = self.omit(params, ['stop', 'trigger'])
1579
- request = {}
1579
+ request: dict = {}
1580
1580
  if symbol is not None:
1581
1581
  market = self.market(symbol)
1582
1582
  request['symbol'] = market['id']
@@ -1618,7 +1618,7 @@ class woofipro(Exchange, ImplicitAPI):
1618
1618
  self.load_markets()
1619
1619
  market = self.market(symbol) if (symbol is not None) else None
1620
1620
  stop = self.safe_bool_2(params, 'stop', 'trigger', False)
1621
- request = {}
1621
+ request: dict = {}
1622
1622
  clientOrderId = self.safe_string_n(params, ['clOrdID', 'clientOrderId', 'client_order_id'])
1623
1623
  params = self.omit(params, ['stop', 'trigger', 'clOrdID', 'clientOrderId', 'client_order_id'])
1624
1624
  response = None
@@ -1689,7 +1689,7 @@ class woofipro(Exchange, ImplicitAPI):
1689
1689
  paginate, params = self.handle_option_and_params(params, 'fetchOrders', 'paginate')
1690
1690
  if paginate:
1691
1691
  return self.fetch_paginated_call_incremental('fetchOrders', symbol, since, limit, params, 'page', maxLimit)
1692
- request = {}
1692
+ request: dict = {}
1693
1693
  market: Market = None
1694
1694
  params = self.omit(params, ['stop', 'trigger'])
1695
1695
  if symbol is not None:
@@ -1802,7 +1802,7 @@ class woofipro(Exchange, ImplicitAPI):
1802
1802
  market: Market = None
1803
1803
  if symbol is not None:
1804
1804
  market = self.market(symbol)
1805
- request = {
1805
+ request: dict = {
1806
1806
  'oid': id,
1807
1807
  }
1808
1808
  response = self.v1PrivateGetOrderOidTrades(self.extend(request, params))
@@ -1848,7 +1848,7 @@ class woofipro(Exchange, ImplicitAPI):
1848
1848
  paginate, params = self.handle_option_and_params(params, 'fetchMyTrades', 'paginate')
1849
1849
  if paginate:
1850
1850
  return self.fetch_paginated_call_incremental('fetchMyTrades', symbol, since, limit, params, 'page', 500)
1851
- request = {}
1851
+ request: dict = {}
1852
1852
  market: Market = None
1853
1853
  if symbol is not None:
1854
1854
  market = self.market(symbol)
@@ -1892,7 +1892,7 @@ class woofipro(Exchange, ImplicitAPI):
1892
1892
  return self.parse_trades(trades, market, since, limit, params)
1893
1893
 
1894
1894
  def parse_balance(self, response) -> Balances:
1895
- result = {
1895
+ result: dict = {
1896
1896
  'info': response,
1897
1897
  }
1898
1898
  balances = self.safe_list(response, 'holding', [])
@@ -1934,7 +1934,7 @@ class woofipro(Exchange, ImplicitAPI):
1934
1934
 
1935
1935
  def get_asset_history_rows(self, code: Str = None, since: Int = None, limit: Int = None, params={}) -> Any:
1936
1936
  self.load_markets()
1937
- request = {}
1937
+ request: dict = {}
1938
1938
  currency: Currency = None
1939
1939
  if code is not None:
1940
1940
  currency = self.currency(code)
@@ -1976,7 +1976,7 @@ class woofipro(Exchange, ImplicitAPI):
1976
1976
  data = self.safe_dict(response, 'data', {})
1977
1977
  return [currency, self.safe_list(data, 'rows', [])]
1978
1978
 
1979
- def parse_ledger_entry(self, item, currency: Currency = None):
1979
+ def parse_ledger_entry(self, item: dict, currency: Currency = None):
1980
1980
  code = self.safe_string(item, 'token')
1981
1981
  amount = self.safe_number(item, 'amount')
1982
1982
  side = self.safe_string(item, 'token_side')
@@ -2002,7 +2002,7 @@ class woofipro(Exchange, ImplicitAPI):
2002
2002
  }
2003
2003
 
2004
2004
  def parse_ledger_entry_type(self, type):
2005
- types = {
2005
+ types: dict = {
2006
2006
  'BALANCE': 'transaction', # Funds moved in/out wallet
2007
2007
  'COLLATERAL': 'transfer', # Funds moved between portfolios
2008
2008
  }
@@ -2021,7 +2021,7 @@ class woofipro(Exchange, ImplicitAPI):
2021
2021
  currency, rows = self.get_asset_history_rows(code, since, limit, params)
2022
2022
  return self.parse_ledger(rows, currency, since, limit, params)
2023
2023
 
2024
- def parse_transaction(self, transaction, currency: Currency = None) -> Transaction:
2024
+ def parse_transaction(self, transaction: dict, currency: Currency = None) -> Transaction:
2025
2025
  # example in fetchLedger
2026
2026
  code = self.safe_string(transaction, 'token')
2027
2027
  movementDirection = self.safe_string_lower(transaction, 'token_side')
@@ -2055,7 +2055,7 @@ class woofipro(Exchange, ImplicitAPI):
2055
2055
  }
2056
2056
 
2057
2057
  def parse_transaction_status(self, status):
2058
- statuses = {
2058
+ statuses: dict = {
2059
2059
  'NEW': 'pending',
2060
2060
  'CONFIRMING': 'pending',
2061
2061
  'PROCESSING': 'pending',
@@ -2074,7 +2074,7 @@ class woofipro(Exchange, ImplicitAPI):
2074
2074
  :param dict [params]: extra parameters specific to the exchange API endpoint
2075
2075
  :returns dict[]: a list of `transaction structures <https://docs.ccxt.com/#/?id=transaction-structure>`
2076
2076
  """
2077
- request = {
2077
+ request: dict = {
2078
2078
  'side': 'DEPOSIT',
2079
2079
  }
2080
2080
  return self.fetch_deposits_withdrawals(code, since, limit, self.extend(request, params))
@@ -2089,7 +2089,7 @@ class woofipro(Exchange, ImplicitAPI):
2089
2089
  :param dict [params]: extra parameters specific to the exchange API endpoint
2090
2090
  :returns dict[]: a list of `transaction structures <https://docs.ccxt.com/#/?id=transaction-structure>`
2091
2091
  """
2092
- request = {
2092
+ request: dict = {
2093
2093
  'side': 'WITHDRAW',
2094
2094
  }
2095
2095
  return self.fetch_deposits_withdrawals(code, since, limit, self.extend(request, params))
@@ -2104,7 +2104,7 @@ class woofipro(Exchange, ImplicitAPI):
2104
2104
  :param dict [params]: extra parameters specific to the exchange API endpoint
2105
2105
  :returns dict: a list of `transaction structure <https://docs.ccxt.com/#/?id=transaction-structure>`
2106
2106
  """
2107
- request = {}
2107
+ request: dict = {}
2108
2108
  currency, rows = self.get_asset_history_rows(code, since, limit, self.extend(request, params))
2109
2109
  #
2110
2110
  # {
@@ -2171,13 +2171,13 @@ class woofipro(Exchange, ImplicitAPI):
2171
2171
  raise BadRequest(self.id + ' withdraw() require chainId parameter')
2172
2172
  withdrawNonce = self.get_withdraw_nonce(params)
2173
2173
  nonce = self.nonce()
2174
- domain = {
2174
+ domain: dict = {
2175
2175
  'chainId': chainId,
2176
2176
  'name': 'Orderly',
2177
2177
  'verifyingContract': verifyingContractAddress,
2178
2178
  'version': '1',
2179
2179
  }
2180
- messageTypes = {
2180
+ messageTypes: dict = {
2181
2181
  'Withdraw': [
2182
2182
  {'name': 'brokerId', 'type': 'string'},
2183
2183
  {'name': 'chainId', 'type': 'uint256'},
@@ -2188,7 +2188,7 @@ class woofipro(Exchange, ImplicitAPI):
2188
2188
  {'name': 'timestamp', 'type': 'uint64'},
2189
2189
  ],
2190
2190
  }
2191
- withdrawRequest = {
2191
+ withdrawRequest: dict = {
2192
2192
  'brokerId': self.safe_string(self.options, 'keyBrokerId', 'woofi_pro'),
2193
2193
  'chainId': self.parse_to_int(chainId),
2194
2194
  'receiver': address,
@@ -2199,7 +2199,7 @@ class woofipro(Exchange, ImplicitAPI):
2199
2199
  }
2200
2200
  msg = self.eth_encode_structured_data(domain, messageTypes, withdrawRequest)
2201
2201
  signature = self.sign_message(msg, self.privateKey)
2202
- request = {
2202
+ request: dict = {
2203
2203
  'signature': signature,
2204
2204
  'userAddress': address,
2205
2205
  'verifyingContract': verifyingContractAddress,
@@ -2281,12 +2281,12 @@ class woofipro(Exchange, ImplicitAPI):
2281
2281
  self.load_markets()
2282
2282
  if (leverage < 1) or (leverage > 50):
2283
2283
  raise BadRequest(self.id + ' leverage should be between 1 and 50')
2284
- request = {
2284
+ request: dict = {
2285
2285
  'leverage': leverage,
2286
2286
  }
2287
2287
  return self.v1PrivatePostClientLeverage(self.extend(request, params))
2288
2288
 
2289
- def parse_position(self, position, market: Market = None):
2289
+ def parse_position(self, position: dict, market: Market = None):
2290
2290
  #
2291
2291
  # {
2292
2292
  # "IMR_withdraw_orders": 0.1,
@@ -2365,7 +2365,7 @@ class woofipro(Exchange, ImplicitAPI):
2365
2365
  """
2366
2366
  self.load_markets()
2367
2367
  market = self.market(symbol)
2368
- request = {
2368
+ request: dict = {
2369
2369
  'symbol': market['id'],
2370
2370
  }
2371
2371
  response = self.v1PrivateGetPositionSymbol(self.extend(request, params))
ccxt/yobit.py CHANGED
@@ -297,7 +297,7 @@ class yobit(Exchange, ImplicitAPI):
297
297
  def parse_balance(self, response) -> Balances:
298
298
  balances = self.safe_dict(response, 'return', {})
299
299
  timestamp = self.safe_integer(balances, 'server_time')
300
- result = {
300
+ result: dict = {
301
301
  'info': response,
302
302
  'timestamp': timestamp,
303
303
  'datetime': self.iso8601(timestamp),
@@ -455,7 +455,7 @@ class yobit(Exchange, ImplicitAPI):
455
455
  """
456
456
  self.load_markets()
457
457
  market = self.market(symbol)
458
- request = {
458
+ request: dict = {
459
459
  'pair': market['id'],
460
460
  }
461
461
  if limit is not None:
@@ -487,14 +487,14 @@ class yobit(Exchange, ImplicitAPI):
487
487
  else:
488
488
  ids = self.market_ids(symbols)
489
489
  ids = '-'.join(ids)
490
- request = {
490
+ request: dict = {
491
491
  'pair': ids,
492
492
  # 'ignore_invalid': True,
493
493
  }
494
494
  if limit is not None:
495
495
  request['limit'] = limit
496
496
  response = self.publicGetDepthPair(self.extend(request, params))
497
- result = {}
497
+ result: dict = {}
498
498
  ids = list(response.keys())
499
499
  for i in range(0, len(ids)):
500
500
  id = ids[i]
@@ -566,11 +566,11 @@ class yobit(Exchange, ImplicitAPI):
566
566
  actualLength = len(idsString) + lenghtOfBaseUrl
567
567
  if actualLength > maxLength:
568
568
  raise ArgumentsRequired(self.id + ' fetchTickers() is being requested for ' + str(idsLength) + ' markets(which has an URL length of ' + str(actualLength) + ' characters), but it exceedes max URL length(' + str(maxLength) + '), please pass limisted symbols array to fetchTickers to fit in one request')
569
- request = {
569
+ request: dict = {
570
570
  'pair': idsString,
571
571
  }
572
572
  tickers = self.publicGetTickerPair(self.extend(request, params))
573
- result = {}
573
+ result: dict = {}
574
574
  keys = list(tickers.keys())
575
575
  for k in range(0, len(keys)):
576
576
  id = keys[k]
@@ -591,7 +591,7 @@ class yobit(Exchange, ImplicitAPI):
591
591
  tickers = self.fetch_tickers([symbol], params)
592
592
  return tickers[symbol]
593
593
 
594
- def parse_trade(self, trade, market: Market = None) -> Trade:
594
+ def parse_trade(self, trade: dict, market: Market = None) -> Trade:
595
595
  #
596
596
  # fetchTrades(public)
597
597
  #
@@ -677,7 +677,7 @@ class yobit(Exchange, ImplicitAPI):
677
677
  """
678
678
  self.load_markets()
679
679
  market = self.market(symbol)
680
- request = {
680
+ request: dict = {
681
681
  'pair': market['id'],
682
682
  }
683
683
  if limit is not None:
@@ -733,7 +733,7 @@ class yobit(Exchange, ImplicitAPI):
733
733
  #
734
734
  pairs = self.safe_dict(response, 'pairs', {})
735
735
  marketIds = list(pairs.keys())
736
- result = {}
736
+ result: dict = {}
737
737
  for i in range(0, len(marketIds)):
738
738
  marketId = marketIds[i]
739
739
  pair = self.safe_dict(pairs, marketId, {})
@@ -768,7 +768,7 @@ class yobit(Exchange, ImplicitAPI):
768
768
  raise ExchangeError(self.id + ' createOrder() allows limit orders only')
769
769
  self.load_markets()
770
770
  market = self.market(symbol)
771
- request = {
771
+ request: dict = {
772
772
  'pair': market['id'],
773
773
  'type': side,
774
774
  'amount': self.amount_to_precision(symbol, amount),
@@ -809,7 +809,7 @@ class yobit(Exchange, ImplicitAPI):
809
809
  :returns dict: An `order structure <https://docs.ccxt.com/#/?id=order-structure>`
810
810
  """
811
811
  self.load_markets()
812
- request = {
812
+ request: dict = {
813
813
  'order_id': int(id),
814
814
  }
815
815
  response = self.privatePostCancelOrder(self.extend(request, params))
@@ -835,8 +835,8 @@ class yobit(Exchange, ImplicitAPI):
835
835
  result = self.safe_dict(response, 'return', {})
836
836
  return self.parse_order(result)
837
837
 
838
- def parse_order_status(self, status):
839
- statuses = {
838
+ def parse_order_status(self, status: Str):
839
+ statuses: dict = {
840
840
  '0': 'open',
841
841
  '1': 'closed',
842
842
  '2': 'canceled',
@@ -844,7 +844,7 @@ class yobit(Exchange, ImplicitAPI):
844
844
  }
845
845
  return self.safe_string(statuses, status, status)
846
846
 
847
- def parse_order(self, order, market: Market = None) -> Order:
847
+ def parse_order(self, order: dict, market: Market = None) -> Order:
848
848
  #
849
849
  # createOrder(private)
850
850
  #
@@ -955,7 +955,7 @@ class yobit(Exchange, ImplicitAPI):
955
955
  :returns dict: An `order structure <https://docs.ccxt.com/#/?id=order-structure>`
956
956
  """
957
957
  self.load_markets()
958
- request = {
958
+ request: dict = {
959
959
  'order_id': int(id),
960
960
  }
961
961
  response = self.privatePostOrderInfo(self.extend(request, params))
@@ -992,7 +992,7 @@ class yobit(Exchange, ImplicitAPI):
992
992
  if symbol is None:
993
993
  raise ArgumentsRequired(self.id + ' fetchOpenOrders() requires a symbol argument')
994
994
  self.load_markets()
995
- request = {}
995
+ request: dict = {}
996
996
  market = None
997
997
  if symbol is not None:
998
998
  marketInner = self.market(symbol)
@@ -1039,7 +1039,7 @@ class yobit(Exchange, ImplicitAPI):
1039
1039
  self.load_markets()
1040
1040
  market = self.market(symbol)
1041
1041
  # some derived classes use camelcase notation for request fields
1042
- request = {
1042
+ request: dict = {
1043
1043
  # 'from': 123456789, # trade ID, from which the display starts numerical 0(test result: liqui ignores self field)
1044
1044
  # 'count': 1000, # the number of trades for display numerical, default = 1000
1045
1045
  # 'from_id': trade ID, from which the display starts numerical 0
@@ -1089,7 +1089,7 @@ class yobit(Exchange, ImplicitAPI):
1089
1089
  :param dict [params]: extra parameters specific to the exchange API endpoint
1090
1090
  :returns dict: an `address structure <https://docs.ccxt.com/#/?id=address-structure>`
1091
1091
  """
1092
- request = {
1092
+ request: dict = {
1093
1093
  'need_new': 1,
1094
1094
  }
1095
1095
  response = self.fetch_deposit_address(code, self.extend(request, params))
@@ -1120,7 +1120,7 @@ class yobit(Exchange, ImplicitAPI):
1120
1120
  if network != 'ERC20':
1121
1121
  currencyId = currencyId + network.lower()
1122
1122
  params = self.omit(params, 'network')
1123
- request = {
1123
+ request: dict = {
1124
1124
  'coinName': currencyId,
1125
1125
  'need_new': 0,
1126
1126
  }
@@ -1168,7 +1168,7 @@ class yobit(Exchange, ImplicitAPI):
1168
1168
  self.check_address(address)
1169
1169
  self.load_markets()
1170
1170
  currency = self.currency(code)
1171
- request = {
1171
+ request: dict = {
1172
1172
  'coinName': currency['id'],
1173
1173
  'amount': amount,
1174
1174
  'address': address,
ccxt/zaif.py CHANGED
@@ -234,7 +234,7 @@ class zaif(Exchange, ImplicitAPI):
234
234
  def parse_balance(self, response) -> Balances:
235
235
  balances = self.safe_value(response, 'return', {})
236
236
  deposit = self.safe_value(balances, 'deposit')
237
- result = {
237
+ result: dict = {
238
238
  'info': response,
239
239
  'timestamp': None,
240
240
  'datetime': None,
@@ -276,7 +276,7 @@ class zaif(Exchange, ImplicitAPI):
276
276
  """
277
277
  self.load_markets()
278
278
  market = self.market(symbol)
279
- request = {
279
+ request: dict = {
280
280
  'pair': market['id'],
281
281
  }
282
282
  response = self.publicGetDepthPair(self.extend(request, params))
@@ -332,7 +332,7 @@ class zaif(Exchange, ImplicitAPI):
332
332
  """
333
333
  self.load_markets()
334
334
  market = self.market(symbol)
335
- request = {
335
+ request: dict = {
336
336
  'pair': market['id'],
337
337
  }
338
338
  ticker = self.publicGetTickerPair(self.extend(request, params))
@@ -349,7 +349,7 @@ class zaif(Exchange, ImplicitAPI):
349
349
  #
350
350
  return self.parse_ticker(ticker, market)
351
351
 
352
- def parse_trade(self, trade, market: Market = None) -> Trade:
352
+ def parse_trade(self, trade: dict, market: Market = None) -> Trade:
353
353
  #
354
354
  # fetchTrades(public)
355
355
  #
@@ -398,7 +398,7 @@ class zaif(Exchange, ImplicitAPI):
398
398
  """
399
399
  self.load_markets()
400
400
  market = self.market(symbol)
401
- request = {
401
+ request: dict = {
402
402
  'pair': market['id'],
403
403
  }
404
404
  response = self.publicGetTradesPair(self.extend(request, params))
@@ -437,7 +437,7 @@ class zaif(Exchange, ImplicitAPI):
437
437
  if type != 'limit':
438
438
  raise ExchangeError(self.id + ' createOrder() allows limit orders only')
439
439
  market = self.market(symbol)
440
- request = {
440
+ request: dict = {
441
441
  'currency_pair': market['id'],
442
442
  'action': 'bid' if (side == 'buy') else 'ask',
443
443
  'amount': amount,
@@ -458,12 +458,12 @@ class zaif(Exchange, ImplicitAPI):
458
458
  :param dict [params]: extra parameters specific to the exchange API endpoint
459
459
  :returns dict: An `order structure <https://docs.ccxt.com/#/?id=order-structure>`
460
460
  """
461
- request = {
461
+ request: dict = {
462
462
  'order_id': id,
463
463
  }
464
464
  return self.privatePostCancelOrder(self.extend(request, params))
465
465
 
466
- def parse_order(self, order, market: Market = None) -> Order:
466
+ def parse_order(self, order: dict, market: Market = None) -> Order:
467
467
  #
468
468
  # {
469
469
  # "currency_pair": "btc_jpy",
@@ -519,7 +519,7 @@ class zaif(Exchange, ImplicitAPI):
519
519
  """
520
520
  self.load_markets()
521
521
  market: Market = None
522
- request = {
522
+ request: dict = {
523
523
  # 'is_token': False,
524
524
  # 'is_token_both': False,
525
525
  }
@@ -541,7 +541,7 @@ class zaif(Exchange, ImplicitAPI):
541
541
  """
542
542
  self.load_markets()
543
543
  market: Market = None
544
- request = {
544
+ request: dict = {
545
545
  # 'from': 0,
546
546
  # 'count': 1000,
547
547
  # 'from_id': 0,
@@ -574,7 +574,7 @@ class zaif(Exchange, ImplicitAPI):
574
574
  currency = self.currency(code)
575
575
  if code == 'JPY':
576
576
  raise ExchangeError(self.id + ' withdraw() does not allow ' + code + ' withdrawals')
577
- request = {
577
+ request: dict = {
578
578
  'currency': currency['id'],
579
579
  'amount': amount,
580
580
  'address': address,
@@ -603,7 +603,7 @@ class zaif(Exchange, ImplicitAPI):
603
603
  returnData = self.safe_dict(result, 'return')
604
604
  return self.parse_transaction(returnData, currency)
605
605
 
606
- def parse_transaction(self, transaction, currency: Currency = None) -> Transaction:
606
+ def parse_transaction(self, transaction: dict, currency: Currency = None) -> Transaction:
607
607
  #
608
608
  # {
609
609
  # "id": 23634,