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/bitrue.py CHANGED
@@ -523,7 +523,7 @@ class bitrue(Exchange, ImplicitAPI):
523
523
 
524
524
  def safe_network(self, networkId):
525
525
  uppercaseNetworkId = networkId.upper()
526
- networksById = {
526
+ networksById: dict = {
527
527
  'Aeternity': 'Aeternity',
528
528
  'AION': 'AION',
529
529
  'Algorand': 'Algorand',
@@ -645,7 +645,7 @@ class bitrue(Exchange, ImplicitAPI):
645
645
  # ],
646
646
  # }
647
647
  #
648
- result = {}
648
+ result: dict = {}
649
649
  coins = self.safe_value(response, 'coins', [])
650
650
  for i in range(0, len(coins)):
651
651
  currency = coins[i]
@@ -658,7 +658,7 @@ class bitrue(Exchange, ImplicitAPI):
658
658
  maxWithdrawString = None
659
659
  minWithdrawFeeString = None
660
660
  networkDetails = self.safe_value(currency, 'chainDetail', [])
661
- networks = {}
661
+ networks: dict = {}
662
662
  for j in range(0, len(networkDetails)):
663
663
  entry = networkDetails[j]
664
664
  networkId = self.safe_string(entry, 'chain')
@@ -955,7 +955,7 @@ class bitrue(Exchange, ImplicitAPI):
955
955
  # ]
956
956
  # }
957
957
  #
958
- result = {
958
+ result: dict = {
959
959
  'info': response,
960
960
  }
961
961
  timestamp = self.safe_integer(response, 'updateTime')
@@ -1094,7 +1094,7 @@ class bitrue(Exchange, ImplicitAPI):
1094
1094
  market = self.market(symbol)
1095
1095
  response = None
1096
1096
  if market['swap']:
1097
- request = {
1097
+ request: dict = {
1098
1098
  'contractName': market['id'],
1099
1099
  }
1100
1100
  if limit is not None:
@@ -1106,7 +1106,7 @@ class bitrue(Exchange, ImplicitAPI):
1106
1106
  elif market['inverse']:
1107
1107
  response = self.dapiV1PublicGetDepth(self.extend(request, params))
1108
1108
  elif market['spot']:
1109
- request = {
1109
+ request: dict = {
1110
1110
  'symbol': market['id'],
1111
1111
  }
1112
1112
  if limit is not None:
@@ -1228,7 +1228,7 @@ class bitrue(Exchange, ImplicitAPI):
1228
1228
  response = None
1229
1229
  data = None
1230
1230
  if market['swap']:
1231
- request = {
1231
+ request: dict = {
1232
1232
  'contractName': market['id'],
1233
1233
  }
1234
1234
  if market['linear']:
@@ -1237,7 +1237,7 @@ class bitrue(Exchange, ImplicitAPI):
1237
1237
  response = self.dapiV1PublicGetTicker(self.extend(request, params))
1238
1238
  data = response
1239
1239
  elif market['spot']:
1240
- request = {
1240
+ request: dict = {
1241
1241
  'symbol': market['id'],
1242
1242
  }
1243
1243
  response = self.spotV1PublicGetTicker24hr(self.extend(request, params))
@@ -1304,7 +1304,7 @@ class bitrue(Exchange, ImplicitAPI):
1304
1304
  data = None
1305
1305
  if market['swap']:
1306
1306
  timeframesFuture = self.safe_value(timeframes, 'future', {})
1307
- request = {
1307
+ request: dict = {
1308
1308
  'contractName': market['id'],
1309
1309
  # 1min / 5min / 15min / 30min / 1h / 1day / 1week / 1month
1310
1310
  'interval': self.safe_string(timeframesFuture, timeframe, '1min'),
@@ -1318,7 +1318,7 @@ class bitrue(Exchange, ImplicitAPI):
1318
1318
  data = response
1319
1319
  elif market['spot']:
1320
1320
  timeframesSpot = self.safe_value(timeframes, 'spot', {})
1321
- request = {
1321
+ request: dict = {
1322
1322
  'symbol': market['id'],
1323
1323
  # 1m / 5m / 15m / 30m / 1H / 2H / 4H / 12H / 1D / 1W
1324
1324
  'scale': self.safe_string(timeframesSpot, timeframe, '1m'),
@@ -1418,7 +1418,7 @@ class bitrue(Exchange, ImplicitAPI):
1418
1418
  market = self.market(first)
1419
1419
  response = None
1420
1420
  if market['swap']:
1421
- request = {
1421
+ request: dict = {
1422
1422
  'contractName': market['id'],
1423
1423
  }
1424
1424
  if market['linear']:
@@ -1426,7 +1426,7 @@ class bitrue(Exchange, ImplicitAPI):
1426
1426
  elif market['inverse']:
1427
1427
  response = self.dapiV1PublicGetTicker(self.extend(request, params))
1428
1428
  elif market['spot']:
1429
- request = {
1429
+ request: dict = {
1430
1430
  'symbol': market['id'],
1431
1431
  }
1432
1432
  response = self.spotV1PublicGetTickerBookTicker(self.extend(request, params))
@@ -1456,7 +1456,7 @@ class bitrue(Exchange, ImplicitAPI):
1456
1456
  # "time": 1699348013000
1457
1457
  # }
1458
1458
  #
1459
- data = {}
1459
+ data: dict = {}
1460
1460
  data[market['id']] = response
1461
1461
  return self.parse_tickers(data, symbols)
1462
1462
 
@@ -1474,7 +1474,7 @@ class bitrue(Exchange, ImplicitAPI):
1474
1474
  symbols = self.market_symbols(symbols)
1475
1475
  response = None
1476
1476
  data = None
1477
- request = {}
1477
+ request: dict = {}
1478
1478
  type = None
1479
1479
  if symbols is not None:
1480
1480
  first = self.safe_string(symbols, 0)
@@ -1533,14 +1533,14 @@ class bitrue(Exchange, ImplicitAPI):
1533
1533
  # the exchange returns market ids with an underscore from the tickers endpoint
1534
1534
  # the market ids do not have an underscore, so it has to be removed
1535
1535
  # https://github.com/ccxt/ccxt/issues/13856
1536
- tickers = {}
1536
+ tickers: dict = {}
1537
1537
  for i in range(0, len(data)):
1538
1538
  ticker = self.safe_value(data, i, {})
1539
1539
  market = self.market(self.safe_value(ticker, 'symbol'))
1540
1540
  tickers[market['id']] = ticker
1541
1541
  return self.parse_tickers(tickers, symbols)
1542
1542
 
1543
- def parse_trade(self, trade, market: Market = None) -> Trade:
1543
+ def parse_trade(self, trade: dict, market: Market = None) -> Trade:
1544
1544
  #
1545
1545
  # fetchTrades
1546
1546
  #
@@ -1643,7 +1643,7 @@ class bitrue(Exchange, ImplicitAPI):
1643
1643
  market = self.market(symbol)
1644
1644
  response = None
1645
1645
  if market['spot']:
1646
- request = {
1646
+ request: dict = {
1647
1647
  'symbol': market['id'],
1648
1648
  # 'limit': 100, # default 100, max = 1000
1649
1649
  }
@@ -1668,8 +1668,8 @@ class bitrue(Exchange, ImplicitAPI):
1668
1668
  #
1669
1669
  return self.parse_trades(response, market, since, limit)
1670
1670
 
1671
- def parse_order_status(self, status):
1672
- statuses = {
1671
+ def parse_order_status(self, status: Str):
1672
+ statuses: dict = {
1673
1673
  'INIT': 'open',
1674
1674
  'PENDING_CREATE': 'open',
1675
1675
  'NEW': 'open',
@@ -1682,7 +1682,7 @@ class bitrue(Exchange, ImplicitAPI):
1682
1682
  }
1683
1683
  return self.safe_string(statuses, status, status)
1684
1684
 
1685
- def parse_order(self, order, market: Market = None) -> Order:
1685
+ def parse_order(self, order: dict, market: Market = None) -> Order:
1686
1686
  #
1687
1687
  # createOrder - spot
1688
1688
  #
@@ -1842,7 +1842,7 @@ class bitrue(Exchange, ImplicitAPI):
1842
1842
  response = None
1843
1843
  data = None
1844
1844
  uppercaseType = type.upper()
1845
- request = {
1845
+ request: dict = {
1846
1846
  'side': side.upper(),
1847
1847
  'type': uppercaseType,
1848
1848
  # 'timeInForce': '',
@@ -1953,7 +1953,7 @@ class bitrue(Exchange, ImplicitAPI):
1953
1953
  params = self.omit(params, ['origClientOrderId', 'clientOrderId'])
1954
1954
  response = None
1955
1955
  data = None
1956
- request = {}
1956
+ request: dict = {}
1957
1957
  if origClientOrderId is None:
1958
1958
  request['orderId'] = id
1959
1959
  else:
@@ -2036,7 +2036,7 @@ class bitrue(Exchange, ImplicitAPI):
2036
2036
  market = self.market(symbol)
2037
2037
  if not market['spot']:
2038
2038
  raise NotSupported(self.id + ' fetchClosedOrders only support spot markets')
2039
- request = {
2039
+ request: dict = {
2040
2040
  'symbol': market['id'],
2041
2041
  # 'orderId': 123445, # long
2042
2042
  # 'startTime': since,
@@ -2090,7 +2090,7 @@ class bitrue(Exchange, ImplicitAPI):
2090
2090
  market = self.market(symbol)
2091
2091
  response = None
2092
2092
  data = None
2093
- request = {}
2093
+ request: dict = {}
2094
2094
  if market['swap']:
2095
2095
  request['contractName'] = market['id']
2096
2096
  if market['linear']:
@@ -2171,7 +2171,7 @@ class bitrue(Exchange, ImplicitAPI):
2171
2171
  params = self.omit(params, ['origClientOrderId', 'clientOrderId'])
2172
2172
  response = None
2173
2173
  data = None
2174
- request = {}
2174
+ request: dict = {}
2175
2175
  if origClientOrderId is None:
2176
2176
  request['orderId'] = id
2177
2177
  else:
@@ -2229,7 +2229,7 @@ class bitrue(Exchange, ImplicitAPI):
2229
2229
  response = None
2230
2230
  data = None
2231
2231
  if market['swap']:
2232
- request = {
2232
+ request: dict = {
2233
2233
  'contractName': market['id'],
2234
2234
  }
2235
2235
  if market['linear']:
@@ -2268,7 +2268,7 @@ class bitrue(Exchange, ImplicitAPI):
2268
2268
  market = self.market(symbol)
2269
2269
  response = None
2270
2270
  data = None
2271
- request = {}
2271
+ request: dict = {}
2272
2272
  if since is not None:
2273
2273
  request['startTime'] = since
2274
2274
  if limit is not None:
@@ -2349,7 +2349,7 @@ class bitrue(Exchange, ImplicitAPI):
2349
2349
  raise ArgumentsRequired(self.id + ' fetchDeposits() requires a code argument')
2350
2350
  self.load_markets()
2351
2351
  currency = self.currency(code)
2352
- request = {
2352
+ request: dict = {
2353
2353
  'coin': currency['id'],
2354
2354
  'status': 1, # 0 init, 1 finished, default 0
2355
2355
  # 'offset': 0,
@@ -2416,7 +2416,7 @@ class bitrue(Exchange, ImplicitAPI):
2416
2416
  raise ArgumentsRequired(self.id + ' fetchWithdrawals() requires a code argument')
2417
2417
  self.load_markets()
2418
2418
  currency = self.currency(code)
2419
- request = {
2419
+ request: dict = {
2420
2420
  'coin': currency['id'],
2421
2421
  'status': 5, # 0 init, 5 finished, 6 canceled, default 0
2422
2422
  # 'offset': 0,
@@ -2457,7 +2457,7 @@ class bitrue(Exchange, ImplicitAPI):
2457
2457
  return self.parse_transactions(data, currency)
2458
2458
 
2459
2459
  def parse_transaction_status_by_type(self, status, type=None):
2460
- statusesByType = {
2460
+ statusesByType: dict = {
2461
2461
  'deposit': {
2462
2462
  '0': 'pending',
2463
2463
  '1': 'ok',
@@ -2471,7 +2471,7 @@ class bitrue(Exchange, ImplicitAPI):
2471
2471
  statuses = self.safe_value(statusesByType, type, {})
2472
2472
  return self.safe_string(statuses, status, status)
2473
2473
 
2474
- def parse_transaction(self, transaction, currency: Currency = None) -> Transaction:
2474
+ def parse_transaction(self, transaction: dict, currency: Currency = None) -> Transaction:
2475
2475
  #
2476
2476
  # fetchDeposits
2477
2477
  #
@@ -2606,7 +2606,7 @@ class bitrue(Exchange, ImplicitAPI):
2606
2606
  self.check_address(address)
2607
2607
  self.load_markets()
2608
2608
  currency = self.currency(code)
2609
- request = {
2609
+ request: dict = {
2610
2610
  'coin': currency['id'],
2611
2611
  'amount': amount,
2612
2612
  'addressTo': address,
@@ -2651,7 +2651,7 @@ class bitrue(Exchange, ImplicitAPI):
2651
2651
  #
2652
2652
  chainDetails = self.safe_value(fee, 'chainDetail', [])
2653
2653
  chainDetailLength = len(chainDetails)
2654
- result = {
2654
+ result: dict = {
2655
2655
  'info': fee,
2656
2656
  'withdraw': {
2657
2657
  'fee': None,
@@ -2742,7 +2742,7 @@ class bitrue(Exchange, ImplicitAPI):
2742
2742
  """
2743
2743
  self.load_markets()
2744
2744
  type = self.safe_string_2(params, 'type', 'transferType')
2745
- request = {
2745
+ request: dict = {
2746
2746
  'transferType': type,
2747
2747
  }
2748
2748
  currency = None
@@ -2793,7 +2793,7 @@ class bitrue(Exchange, ImplicitAPI):
2793
2793
  accountTypes = self.safe_value(self.options, 'accountsByType', {})
2794
2794
  fromId = self.safe_string(accountTypes, fromAccount, fromAccount)
2795
2795
  toId = self.safe_string(accountTypes, toAccount, toAccount)
2796
- request = {
2796
+ request: dict = {
2797
2797
  'coinSymbol': currency['id'],
2798
2798
  'amount': self.currency_to_precision(code, amount),
2799
2799
  'transferType': fromId + '_to_' + toId,
@@ -2826,7 +2826,7 @@ class bitrue(Exchange, ImplicitAPI):
2826
2826
  self.load_markets()
2827
2827
  market = self.market(symbol)
2828
2828
  response = None
2829
- request = {
2829
+ request: dict = {
2830
2830
  'contractName': market['id'],
2831
2831
  'leverage': leverage,
2832
2832
  }
@@ -2876,7 +2876,7 @@ class bitrue(Exchange, ImplicitAPI):
2876
2876
  if not market['swap']:
2877
2877
  raise NotSupported(self.id + ' setMargin only support swap markets')
2878
2878
  response = None
2879
- request = {
2879
+ request: dict = {
2880
2880
  'contractName': market['id'],
2881
2881
  'amount': self.parse_to_numeric(amount),
2882
2882
  }
ccxt/bitso.py CHANGED
@@ -201,7 +201,7 @@ class bitso(Exchange, ImplicitAPI):
201
201
  :param dict [params]: extra parameters specific to the exchange API endpoint
202
202
  :returns dict: a `ledger structure <https://docs.ccxt.com/#/?id=ledger-structure>`
203
203
  """
204
- request = {}
204
+ request: dict = {}
205
205
  if limit is not None:
206
206
  request['limit'] = limit
207
207
  response = self.privateGetLedger(self.extend(request, params))
@@ -233,7 +233,7 @@ class bitso(Exchange, ImplicitAPI):
233
233
  return self.parse_ledger(payload, currency, since, limit)
234
234
 
235
235
  def parse_ledger_entry_type(self, type):
236
- types = {
236
+ types: dict = {
237
237
  'funding': 'transaction',
238
238
  'withdrawal': 'transaction',
239
239
  'trade': 'trade',
@@ -241,7 +241,7 @@ class bitso(Exchange, ImplicitAPI):
241
241
  }
242
242
  return self.safe_string(types, type, type)
243
243
 
244
- def parse_ledger_entry(self, item, currency: Currency = None):
244
+ def parse_ledger_entry(self, item: dict, currency: Currency = None):
245
245
  #
246
246
  # {
247
247
  # "eid": "2510b3e2bc1c87f584500a18084f35ed",
@@ -416,7 +416,7 @@ class bitso(Exchange, ImplicitAPI):
416
416
  if j == 0:
417
417
  fee['taker'] = takerFee
418
418
  fee['maker'] = makerFee
419
- tiers = {
419
+ tiers: dict = {
420
420
  'taker': takerFees,
421
421
  'maker': makerFees,
422
422
  }
@@ -479,7 +479,7 @@ class bitso(Exchange, ImplicitAPI):
479
479
  def parse_balance(self, response) -> Balances:
480
480
  payload = self.safe_value(response, 'payload', {})
481
481
  balances = self.safe_value(payload, 'balances', [])
482
- result = {
482
+ result: dict = {
483
483
  'info': response,
484
484
  'timestamp': None,
485
485
  'datetime': None,
@@ -542,7 +542,7 @@ class bitso(Exchange, ImplicitAPI):
542
542
  """
543
543
  self.load_markets()
544
544
  market = self.market(symbol)
545
- request = {
545
+ request: dict = {
546
546
  'book': market['id'],
547
547
  }
548
548
  response = self.publicGetOrderBook(self.extend(request, params))
@@ -604,7 +604,7 @@ class bitso(Exchange, ImplicitAPI):
604
604
  """
605
605
  self.load_markets()
606
606
  market = self.market(symbol)
607
- request = {
607
+ request: dict = {
608
608
  'book': market['id'],
609
609
  }
610
610
  response = self.publicGetTicker(self.extend(request, params))
@@ -640,7 +640,7 @@ class bitso(Exchange, ImplicitAPI):
640
640
  """
641
641
  self.load_markets()
642
642
  market = self.market(symbol)
643
- request = {
643
+ request: dict = {
644
644
  'book': market['id'],
645
645
  'time_bucket': self.safe_string(self.timeframes, timeframe, timeframe),
646
646
  }
@@ -700,7 +700,7 @@ class bitso(Exchange, ImplicitAPI):
700
700
  self.safe_number(ohlcv, 'volume'),
701
701
  ]
702
702
 
703
- def parse_trade(self, trade, market: Market = None) -> Trade:
703
+ def parse_trade(self, trade: dict, market: Market = None) -> Trade:
704
704
  #
705
705
  # fetchTrades(public)
706
706
  #
@@ -811,7 +811,7 @@ class bitso(Exchange, ImplicitAPI):
811
811
  """
812
812
  self.load_markets()
813
813
  market = self.market(symbol)
814
- request = {
814
+ request: dict = {
815
815
  'book': market['id'],
816
816
  }
817
817
  response = self.publicGetTrades(self.extend(request, params))
@@ -871,7 +871,7 @@ class bitso(Exchange, ImplicitAPI):
871
871
  #
872
872
  payload = self.safe_value(response, 'payload', {})
873
873
  fees = self.safe_value(payload, 'fees', [])
874
- result = {}
874
+ result: dict = {}
875
875
  for i in range(0, len(fees)):
876
876
  fee = fees[i]
877
877
  marketId = self.safe_string(fee, 'book')
@@ -911,7 +911,7 @@ class bitso(Exchange, ImplicitAPI):
911
911
  params = self.extend(params, {
912
912
  'marker': int(params['marker']),
913
913
  })
914
- request = {
914
+ request: dict = {
915
915
  'book': market['id'],
916
916
  'limit': limit, # default = 25, max = 100
917
917
  # 'sort': 'desc', # default = desc
@@ -934,7 +934,7 @@ class bitso(Exchange, ImplicitAPI):
934
934
  """
935
935
  self.load_markets()
936
936
  market = self.market(symbol)
937
- request = {
937
+ request: dict = {
938
938
  'book': market['id'],
939
939
  'side': side,
940
940
  'type': type,
@@ -959,7 +959,7 @@ class bitso(Exchange, ImplicitAPI):
959
959
  :returns dict: An `order structure <https://docs.ccxt.com/#/?id=order-structure>`
960
960
  """
961
961
  self.load_markets()
962
- request = {
962
+ request: dict = {
963
963
  'oid': id,
964
964
  }
965
965
  return self.privateDeleteOrdersOid(self.extend(request, params))
@@ -979,7 +979,7 @@ class bitso(Exchange, ImplicitAPI):
979
979
  if symbol is not None:
980
980
  market = self.market(symbol)
981
981
  oids = ','.join(ids)
982
- request = {
982
+ request: dict = {
983
983
  'oids': oids,
984
984
  }
985
985
  response = self.privateDeleteOrders(self.extend(request, params))
@@ -1020,8 +1020,8 @@ class bitso(Exchange, ImplicitAPI):
1020
1020
  canceledOrders.append(order)
1021
1021
  return canceledOrders
1022
1022
 
1023
- def parse_order_status(self, status):
1024
- statuses = {
1023
+ def parse_order_status(self, status: Str):
1024
+ statuses: dict = {
1025
1025
  'partial-fill': 'open', # self is a common substitution in ccxt
1026
1026
  'partially filled': 'open',
1027
1027
  'queued': 'open',
@@ -1029,7 +1029,7 @@ class bitso(Exchange, ImplicitAPI):
1029
1029
  }
1030
1030
  return self.safe_string(statuses, status, status)
1031
1031
 
1032
- def parse_order(self, order, market: Market = None) -> Order:
1032
+ def parse_order(self, order: dict, market: Market = None) -> Order:
1033
1033
  #
1034
1034
  #
1035
1035
  # canceledOrder
@@ -1100,7 +1100,7 @@ class bitso(Exchange, ImplicitAPI):
1100
1100
  params = self.extend(params, {
1101
1101
  'marker': int(params['marker']),
1102
1102
  })
1103
- request = {
1103
+ request: dict = {
1104
1104
  'book': market['id'],
1105
1105
  'limit': limit, # default = 25, max = 100
1106
1106
  # 'sort': 'desc', # default = desc
@@ -1142,7 +1142,7 @@ class bitso(Exchange, ImplicitAPI):
1142
1142
  """
1143
1143
  self.load_markets()
1144
1144
  market = self.market(symbol)
1145
- request = {
1145
+ request: dict = {
1146
1146
  'oid': id,
1147
1147
  }
1148
1148
  response = self.privateGetOrderTradesOid(self.extend(request, params))
@@ -1158,7 +1158,7 @@ class bitso(Exchange, ImplicitAPI):
1158
1158
  :returns dict: a `transaction structure <https://docs.ccxt.com/#/?id=transaction-structure>`
1159
1159
  """
1160
1160
  self.load_markets()
1161
- request = {
1161
+ request: dict = {
1162
1162
  'fid': id,
1163
1163
  }
1164
1164
  response = self.privateGetFundingsFid(self.extend(request, params))
@@ -1239,7 +1239,7 @@ class bitso(Exchange, ImplicitAPI):
1239
1239
  """
1240
1240
  self.load_markets()
1241
1241
  currency = self.currency(code)
1242
- request = {
1242
+ request: dict = {
1243
1243
  'fund_currency': currency['id'],
1244
1244
  }
1245
1245
  response = self.privateGetFundingDestination(self.extend(request, params))
@@ -1258,7 +1258,7 @@ class bitso(Exchange, ImplicitAPI):
1258
1258
  'info': response,
1259
1259
  }
1260
1260
 
1261
- def fetch_transaction_fees(self, codes: List[str] = None, params={}):
1261
+ def fetch_transaction_fees(self, codes: Strings = None, params={}):
1262
1262
  """
1263
1263
  * @deprecated
1264
1264
  please use fetchDepositWithdrawFees instead
@@ -1312,7 +1312,7 @@ class bitso(Exchange, ImplicitAPI):
1312
1312
  # }
1313
1313
  # }
1314
1314
  #
1315
- result = {}
1315
+ result: dict = {}
1316
1316
  payload = self.safe_value(response, 'payload', {})
1317
1317
  depositFees = self.safe_value(payload, 'deposit_fees', [])
1318
1318
  for i in range(0, len(depositFees)):
@@ -1443,7 +1443,7 @@ class bitso(Exchange, ImplicitAPI):
1443
1443
  # }
1444
1444
  # }
1445
1445
  #
1446
- result = {}
1446
+ result: dict = {}
1447
1447
  depositResponse = self.safe_value(response, 'deposit_fees', [])
1448
1448
  withdrawalResponse = self.safe_value(response, 'withdrawal_fees', [])
1449
1449
  for i in range(0, len(depositResponse)):
@@ -1489,7 +1489,7 @@ class bitso(Exchange, ImplicitAPI):
1489
1489
  tag, params = self.handle_withdraw_tag_and_params(tag, params)
1490
1490
  self.check_address(address)
1491
1491
  self.load_markets()
1492
- methods = {
1492
+ methods: dict = {
1493
1493
  'BTC': 'Bitcoin',
1494
1494
  'ETH': 'Ether',
1495
1495
  'XRP': 'Ripple',
@@ -1500,7 +1500,7 @@ class bitso(Exchange, ImplicitAPI):
1500
1500
  method = methods[code] if (code in methods) else None
1501
1501
  if method is None:
1502
1502
  raise ExchangeError(self.id + ' not valid withdraw coin: ' + code)
1503
- request = {
1503
+ request: dict = {
1504
1504
  'amount': amount,
1505
1505
  'address': address,
1506
1506
  'destination_tag': tag,
@@ -1534,7 +1534,7 @@ class bitso(Exchange, ImplicitAPI):
1534
1534
  if networkId is None:
1535
1535
  return None
1536
1536
  networkId = networkId.upper()
1537
- networksById = {
1537
+ networksById: dict = {
1538
1538
  'trx': 'TRC20',
1539
1539
  'erc20': 'ERC20',
1540
1540
  'bsc': 'BEP20',
@@ -1542,7 +1542,7 @@ class bitso(Exchange, ImplicitAPI):
1542
1542
  }
1543
1543
  return self.safe_string(networksById, networkId, networkId)
1544
1544
 
1545
- def parse_transaction(self, transaction, currency: Currency = None) -> Transaction:
1545
+ def parse_transaction(self, transaction: dict, currency: Currency = None) -> Transaction:
1546
1546
  #
1547
1547
  # deposit
1548
1548
  # {
@@ -1612,7 +1612,7 @@ class bitso(Exchange, ImplicitAPI):
1612
1612
  }
1613
1613
 
1614
1614
  def parse_transaction_status(self, status):
1615
- statuses = {
1615
+ statuses: dict = {
1616
1616
  'pending': 'pending',
1617
1617
  'in_progress': 'pending',
1618
1618
  'complete': 'ok',