ccxt 4.4.99__py2.py3-none-any.whl → 4.5.0__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 (198) hide show
  1. ccxt/__init__.py +1 -1
  2. ccxt/abstract/bingx.py +1 -0
  3. ccxt/alpaca.py +1 -1
  4. ccxt/apex.py +1 -1
  5. ccxt/ascendex.py +1 -1
  6. ccxt/async_support/__init__.py +1 -1
  7. ccxt/async_support/alpaca.py +1 -1
  8. ccxt/async_support/apex.py +1 -1
  9. ccxt/async_support/ascendex.py +1 -1
  10. ccxt/async_support/base/exchange.py +44 -9
  11. ccxt/async_support/base/ws/client.py +3 -1
  12. ccxt/async_support/bigone.py +1 -1
  13. ccxt/async_support/binance.py +3 -2
  14. ccxt/async_support/bingx.py +33 -4
  15. ccxt/async_support/bitbank.py +1 -1
  16. ccxt/async_support/bitfinex.py +4 -1
  17. ccxt/async_support/bitflyer.py +1 -1
  18. ccxt/async_support/bitget.py +32 -14
  19. ccxt/async_support/bithumb.py +1 -1
  20. ccxt/async_support/bitmart.py +2 -2
  21. ccxt/async_support/bitmex.py +3 -2
  22. ccxt/async_support/bitopro.py +1 -1
  23. ccxt/async_support/bitrue.py +2 -2
  24. ccxt/async_support/bitso.py +1 -1
  25. ccxt/async_support/bitstamp.py +1 -1
  26. ccxt/async_support/bittrade.py +1 -1
  27. ccxt/async_support/bitvavo.py +1 -1
  28. ccxt/async_support/blockchaincom.py +1 -1
  29. ccxt/async_support/blofin.py +1 -1
  30. ccxt/async_support/btcmarkets.py +1 -1
  31. ccxt/async_support/bybit.py +2 -2
  32. ccxt/async_support/coinbase.py +1 -1
  33. ccxt/async_support/coinbaseexchange.py +1 -1
  34. ccxt/async_support/coinbaseinternational.py +1 -1
  35. ccxt/async_support/coincatch.py +2 -2
  36. ccxt/async_support/coinex.py +3 -3
  37. ccxt/async_support/coinmate.py +1 -1
  38. ccxt/async_support/coinsph.py +1 -1
  39. ccxt/async_support/cryptocom.py +1 -1
  40. ccxt/async_support/defx.py +2 -2
  41. ccxt/async_support/delta.py +1 -1
  42. ccxt/async_support/deribit.py +1 -1
  43. ccxt/async_support/digifinex.py +2 -2
  44. ccxt/async_support/ellipx.py +1 -1
  45. ccxt/async_support/exmo.py +1 -1
  46. ccxt/async_support/foxbit.py +3 -3
  47. ccxt/async_support/gate.py +17 -2
  48. ccxt/async_support/gemini.py +1 -1
  49. ccxt/async_support/hashkey.py +2 -2
  50. ccxt/async_support/hibachi.py +1 -1
  51. ccxt/async_support/hitbtc.py +2 -2
  52. ccxt/async_support/hollaex.py +1 -1
  53. ccxt/async_support/htx.py +4 -3
  54. ccxt/async_support/hyperliquid.py +71 -29
  55. ccxt/async_support/independentreserve.py +1 -1
  56. ccxt/async_support/indodax.py +1 -1
  57. ccxt/async_support/kraken.py +1 -1
  58. ccxt/async_support/krakenfutures.py +2 -1
  59. ccxt/async_support/kucoin.py +2 -2
  60. ccxt/async_support/kucoinfutures.py +2 -1
  61. ccxt/async_support/lbank.py +2 -2
  62. ccxt/async_support/mercado.py +1 -1
  63. ccxt/async_support/mexc.py +9 -2
  64. ccxt/async_support/modetrade.py +93 -2
  65. ccxt/async_support/ndax.py +1 -1
  66. ccxt/async_support/novadax.py +1 -1
  67. ccxt/async_support/okcoin.py +1 -1
  68. ccxt/async_support/okx.py +2 -2
  69. ccxt/async_support/onetrading.py +33 -0
  70. ccxt/async_support/oxfun.py +1 -1
  71. ccxt/async_support/p2b.py +32 -0
  72. ccxt/async_support/paradex.py +2 -1
  73. ccxt/async_support/phemex.py +2 -2
  74. ccxt/async_support/poloniex.py +2 -2
  75. ccxt/async_support/probit.py +36 -1
  76. ccxt/async_support/tokocrypto.py +1 -1
  77. ccxt/async_support/upbit.py +1 -1
  78. ccxt/async_support/vertex.py +1 -1
  79. ccxt/async_support/wavesexchange.py +1 -1
  80. ccxt/async_support/whitebit.py +2 -2
  81. ccxt/async_support/woo.py +4 -4
  82. ccxt/async_support/woofipro.py +93 -2
  83. ccxt/async_support/xt.py +2 -2
  84. ccxt/async_support/yobit.py +1 -1
  85. ccxt/async_support/zaif.py +1 -1
  86. ccxt/async_support/zonda.py +1 -1
  87. ccxt/base/errors.py +6 -0
  88. ccxt/base/exchange.py +11 -9
  89. ccxt/base/types.py +1 -0
  90. ccxt/bigone.py +1 -1
  91. ccxt/binance.py +3 -2
  92. ccxt/bingx.py +33 -4
  93. ccxt/bitbank.py +1 -1
  94. ccxt/bitfinex.py +4 -1
  95. ccxt/bitflyer.py +1 -1
  96. ccxt/bitget.py +32 -14
  97. ccxt/bithumb.py +1 -1
  98. ccxt/bitmart.py +2 -2
  99. ccxt/bitmex.py +3 -2
  100. ccxt/bitopro.py +1 -1
  101. ccxt/bitrue.py +2 -2
  102. ccxt/bitso.py +1 -1
  103. ccxt/bitstamp.py +1 -1
  104. ccxt/bittrade.py +1 -1
  105. ccxt/bitvavo.py +1 -1
  106. ccxt/blockchaincom.py +1 -1
  107. ccxt/blofin.py +1 -1
  108. ccxt/btcmarkets.py +1 -1
  109. ccxt/bybit.py +2 -2
  110. ccxt/coinbase.py +1 -1
  111. ccxt/coinbaseexchange.py +1 -1
  112. ccxt/coinbaseinternational.py +1 -1
  113. ccxt/coincatch.py +2 -2
  114. ccxt/coinex.py +3 -3
  115. ccxt/coinmate.py +1 -1
  116. ccxt/coinsph.py +1 -1
  117. ccxt/cryptocom.py +1 -1
  118. ccxt/defx.py +2 -2
  119. ccxt/delta.py +1 -1
  120. ccxt/deribit.py +1 -1
  121. ccxt/digifinex.py +2 -2
  122. ccxt/ellipx.py +1 -1
  123. ccxt/exmo.py +1 -1
  124. ccxt/foxbit.py +3 -3
  125. ccxt/gate.py +17 -2
  126. ccxt/gemini.py +1 -1
  127. ccxt/hashkey.py +2 -2
  128. ccxt/hibachi.py +1 -1
  129. ccxt/hitbtc.py +2 -2
  130. ccxt/hollaex.py +1 -1
  131. ccxt/htx.py +4 -3
  132. ccxt/hyperliquid.py +71 -29
  133. ccxt/independentreserve.py +1 -1
  134. ccxt/indodax.py +1 -1
  135. ccxt/kraken.py +1 -1
  136. ccxt/krakenfutures.py +2 -1
  137. ccxt/kucoin.py +2 -2
  138. ccxt/kucoinfutures.py +2 -1
  139. ccxt/lbank.py +2 -2
  140. ccxt/mercado.py +1 -1
  141. ccxt/mexc.py +9 -2
  142. ccxt/modetrade.py +93 -2
  143. ccxt/ndax.py +1 -1
  144. ccxt/novadax.py +1 -1
  145. ccxt/okcoin.py +1 -1
  146. ccxt/okx.py +2 -2
  147. ccxt/onetrading.py +33 -0
  148. ccxt/oxfun.py +1 -1
  149. ccxt/p2b.py +32 -0
  150. ccxt/paradex.py +2 -1
  151. ccxt/phemex.py +2 -2
  152. ccxt/poloniex.py +2 -2
  153. ccxt/pro/__init__.py +1 -1
  154. ccxt/pro/binance.py +2 -1
  155. ccxt/pro/bitvavo.py +1 -1
  156. ccxt/pro/bybit.py +1 -0
  157. ccxt/pro/coinex.py +1 -1
  158. ccxt/pro/hyperliquid.py +99 -12
  159. ccxt/pro/kucoin.py +1 -1
  160. ccxt/pro/kucoinfutures.py +1 -1
  161. ccxt/pro/mexc.py +337 -149
  162. ccxt/pro/okx.py +2 -1
  163. ccxt/pro/oxfun.py +1 -1
  164. ccxt/probit.py +36 -1
  165. ccxt/protobuf/__init__.py +0 -0
  166. ccxt/protobuf/mexc/PrivateAccountV3Api_pb2.py +37 -0
  167. ccxt/protobuf/mexc/PrivateDealsV3Api_pb2.py +37 -0
  168. ccxt/protobuf/mexc/PrivateOrdersV3Api_pb2.py +37 -0
  169. ccxt/protobuf/mexc/PublicAggreBookTickerV3Api_pb2.py +37 -0
  170. ccxt/protobuf/mexc/PublicAggreDealsV3Api_pb2.py +39 -0
  171. ccxt/protobuf/mexc/PublicAggreDepthsV3Api_pb2.py +39 -0
  172. ccxt/protobuf/mexc/PublicBookTickerBatchV3Api_pb2.py +38 -0
  173. ccxt/protobuf/mexc/PublicBookTickerV3Api_pb2.py +37 -0
  174. ccxt/protobuf/mexc/PublicDealsV3Api_pb2.py +39 -0
  175. ccxt/protobuf/mexc/PublicIncreaseDepthsBatchV3Api_pb2.py +38 -0
  176. ccxt/protobuf/mexc/PublicIncreaseDepthsV3Api_pb2.py +39 -0
  177. ccxt/protobuf/mexc/PublicLimitDepthsV3Api_pb2.py +39 -0
  178. ccxt/protobuf/mexc/PublicMiniTickerV3Api_pb2.py +37 -0
  179. ccxt/protobuf/mexc/PublicMiniTickersV3Api_pb2.py +38 -0
  180. ccxt/protobuf/mexc/PublicSpotKlineV3Api_pb2.py +37 -0
  181. ccxt/protobuf/mexc/PushDataV3ApiWrapper_pb2.py +52 -0
  182. ccxt/protobuf/mexc/__init__.py +0 -0
  183. ccxt/tokocrypto.py +1 -1
  184. ccxt/upbit.py +1 -1
  185. ccxt/vertex.py +1 -1
  186. ccxt/wavesexchange.py +1 -1
  187. ccxt/whitebit.py +2 -2
  188. ccxt/woo.py +4 -4
  189. ccxt/woofipro.py +93 -2
  190. ccxt/xt.py +2 -2
  191. ccxt/yobit.py +1 -1
  192. ccxt/zaif.py +1 -1
  193. ccxt/zonda.py +1 -1
  194. {ccxt-4.4.99.dist-info → ccxt-4.5.0.dist-info}/METADATA +5 -5
  195. {ccxt-4.4.99.dist-info → ccxt-4.5.0.dist-info}/RECORD +198 -180
  196. {ccxt-4.4.99.dist-info → ccxt-4.5.0.dist-info}/LICENSE.txt +0 -0
  197. {ccxt-4.4.99.dist-info → ccxt-4.5.0.dist-info}/WHEEL +0 -0
  198. {ccxt-4.4.99.dist-info → ccxt-4.5.0.dist-info}/top_level.txt +0 -0
ccxt/bitrue.py CHANGED
@@ -2748,7 +2748,7 @@ class bitrue(Exchange, ImplicitAPI):
2748
2748
  'fee': fee,
2749
2749
  }
2750
2750
 
2751
- def withdraw(self, code: str, amount: float, address: str, tag=None, params={}) -> Transaction:
2751
+ def withdraw(self, code: str, amount: float, address: str, tag: Str = None, params={}) -> Transaction:
2752
2752
  """
2753
2753
  make a withdrawal
2754
2754
 
@@ -2974,7 +2974,7 @@ class bitrue(Exchange, ImplicitAPI):
2974
2974
  data = self.safe_dict(response, 'data', {})
2975
2975
  return self.parse_transfer(data, currency)
2976
2976
 
2977
- def set_leverage(self, leverage: Int, symbol: Str = None, params={}):
2977
+ def set_leverage(self, leverage: int, symbol: Str = None, params={}):
2978
2978
  """
2979
2979
  set the level of leverage for a market
2980
2980
 
ccxt/bitso.py CHANGED
@@ -1630,7 +1630,7 @@ class bitso(Exchange, ImplicitAPI):
1630
1630
  result[code]['info'][code] = withdrawFee
1631
1631
  return result
1632
1632
 
1633
- def withdraw(self, code: str, amount: float, address: str, tag=None, params={}) -> Transaction:
1633
+ def withdraw(self, code: str, amount: float, address: str, tag: Str = None, params={}) -> Transaction:
1634
1634
  """
1635
1635
  make a withdrawal
1636
1636
  :param str code: unified currency code
ccxt/bitstamp.py CHANGED
@@ -2148,7 +2148,7 @@ class bitstamp(Exchange, ImplicitAPI):
2148
2148
  'tag': tag,
2149
2149
  }
2150
2150
 
2151
- def withdraw(self, code: str, amount: float, address: str, tag=None, params={}) -> Transaction:
2151
+ def withdraw(self, code: str, amount: float, address: str, tag: Str = None, params={}) -> Transaction:
2152
2152
  """
2153
2153
  make a withdrawal
2154
2154
 
ccxt/bittrade.py CHANGED
@@ -1824,7 +1824,7 @@ class bittrade(Exchange, ImplicitAPI):
1824
1824
  }
1825
1825
  return self.safe_string(statuses, status, status)
1826
1826
 
1827
- def withdraw(self, code: str, amount: float, address: str, tag=None, params={}) -> Transaction:
1827
+ def withdraw(self, code: str, amount: float, address: str, tag: Str = None, params={}) -> Transaction:
1828
1828
  """
1829
1829
  make a withdrawal
1830
1830
  :param str code: unified currency code
ccxt/bitvavo.py CHANGED
@@ -1788,7 +1788,7 @@ class bitvavo(Exchange, ImplicitAPI):
1788
1788
  request['paymentId'] = tag
1789
1789
  return self.extend(request, params)
1790
1790
 
1791
- def withdraw(self, code: str, amount: float, address: str, tag=None, params={}) -> Transaction:
1791
+ def withdraw(self, code: str, amount: float, address: str, tag: Str = None, params={}) -> Transaction:
1792
1792
  """
1793
1793
  make a withdrawal
1794
1794
  :param str code: unified currency code
ccxt/blockchaincom.py CHANGED
@@ -976,7 +976,7 @@ class blockchaincom(Exchange, ImplicitAPI):
976
976
  'fee': fee,
977
977
  }
978
978
 
979
- def withdraw(self, code: str, amount: float, address: str, tag=None, params={}) -> Transaction:
979
+ def withdraw(self, code: str, amount: float, address: str, tag: Str = None, params={}) -> Transaction:
980
980
  """
981
981
  make a withdrawal
982
982
 
ccxt/blofin.py CHANGED
@@ -2159,7 +2159,7 @@ class blofin(Exchange, ImplicitAPI):
2159
2159
  'shortLeverage': leverageValue,
2160
2160
  }
2161
2161
 
2162
- def set_leverage(self, leverage: Int, symbol: Str = None, params={}):
2162
+ def set_leverage(self, leverage: int, symbol: Str = None, params={}):
2163
2163
  """
2164
2164
  set the level of leverage for a market
2165
2165
 
ccxt/btcmarkets.py CHANGED
@@ -1280,7 +1280,7 @@ class btcmarkets(Exchange, ImplicitAPI):
1280
1280
  #
1281
1281
  return self.parse_trades(response, market, since, limit)
1282
1282
 
1283
- def withdraw(self, code: str, amount: float, address: str, tag=None, params={}) -> Transaction:
1283
+ def withdraw(self, code: str, amount: float, address: str, tag: Str = None, params={}) -> Transaction:
1284
1284
  """
1285
1285
  make a withdrawal
1286
1286
 
ccxt/bybit.py CHANGED
@@ -5841,7 +5841,7 @@ classic accounts only/ spot not supported* fetches information on an order made
5841
5841
  }
5842
5842
  return self.safe_string(types, type, type)
5843
5843
 
5844
- def withdraw(self, code: str, amount: float, address: str, tag=None, params={}) -> Transaction:
5844
+ def withdraw(self, code: str, amount: float, address: str, tag: Str = None, params={}) -> Transaction:
5845
5845
  """
5846
5846
  make a withdrawal
5847
5847
 
@@ -6405,7 +6405,7 @@ classic accounts only/ spot not supported* fetches information on an order made
6405
6405
  response = self.privatePostV5PositionSwitchIsolated(self.extend(request, params))
6406
6406
  return response
6407
6407
 
6408
- def set_leverage(self, leverage: Int, symbol: Str = None, params={}):
6408
+ def set_leverage(self, leverage: int, symbol: Str = None, params={}):
6409
6409
  """
6410
6410
  set the level of leverage for a market
6411
6411
 
ccxt/coinbase.py CHANGED
@@ -3900,7 +3900,7 @@ class coinbase(Exchange, ImplicitAPI):
3900
3900
  tickers = self.safe_list(response, 'pricebooks', [])
3901
3901
  return self.parse_tickers(tickers, symbols)
3902
3902
 
3903
- def withdraw(self, code: str, amount: float, address: str, tag=None, params={}) -> Transaction:
3903
+ def withdraw(self, code: str, amount: float, address: str, tag: Str = None, params={}) -> Transaction:
3904
3904
  """
3905
3905
  make a withdrawal
3906
3906
 
ccxt/coinbaseexchange.py CHANGED
@@ -1566,7 +1566,7 @@ class coinbaseexchange(Exchange, ImplicitAPI):
1566
1566
  def fetch_payment_methods(self, params={}):
1567
1567
  return self.privateGetPaymentMethods(params)
1568
1568
 
1569
- def withdraw(self, code: str, amount: float, address: str, tag=None, params={}) -> Transaction:
1569
+ def withdraw(self, code: str, amount: float, address: str, tag: Str = None, params={}) -> Transaction:
1570
1570
  """
1571
1571
  make a withdrawal
1572
1572
 
@@ -2127,7 +2127,7 @@ class coinbaseinternational(Exchange, ImplicitAPI):
2127
2127
  trades = self.safe_list(response, 'results', [])
2128
2128
  return self.parse_trades(trades, market, since, limit)
2129
2129
 
2130
- def withdraw(self, code: str, amount: float, address: str, tag=None, params={}) -> Transaction:
2130
+ def withdraw(self, code: str, amount: float, address: str, tag: Str = None, params={}) -> Transaction:
2131
2131
  """
2132
2132
  make a withdrawal
2133
2133
 
ccxt/coincatch.py CHANGED
@@ -2085,7 +2085,7 @@ class coincatch(Exchange, ImplicitAPI):
2085
2085
  data = self.safe_list(response, 'data', [])
2086
2086
  return self.parse_transactions(data, currency, since, limit)
2087
2087
 
2088
- def withdraw(self, code: str, amount: float, address: str, tag=None, params={}) -> Transaction:
2088
+ def withdraw(self, code: str, amount: float, address: str, tag: Str = None, params={}) -> Transaction:
2089
2089
  """
2090
2090
  make a withdrawal
2091
2091
 
@@ -4447,7 +4447,7 @@ class coincatch(Exchange, ImplicitAPI):
4447
4447
  data = self.safe_dict(response, 'data', {})
4448
4448
  return self.parse_leverage(data, market)
4449
4449
 
4450
- def set_leverage(self, leverage: Int, symbol: Str = None, params={}):
4450
+ def set_leverage(self, leverage: int, symbol: Str = None, params={}):
4451
4451
  """
4452
4452
  set the level of leverage for a market
4453
4453
 
ccxt/coinex.py CHANGED
@@ -4125,7 +4125,7 @@ class coinex(Exchange, ImplicitAPI):
4125
4125
  # }
4126
4126
  #
4127
4127
 
4128
- def set_leverage(self, leverage: Int, symbol: Str = None, params={}):
4128
+ def set_leverage(self, leverage: int, symbol: Str = None, params={}):
4129
4129
  """
4130
4130
 
4131
4131
  https://docs.coinex.com/api/v2/futures/position/http/adjust-position-leverage
@@ -4601,7 +4601,7 @@ class coinex(Exchange, ImplicitAPI):
4601
4601
  data = self.safe_list(response, 'data', [])
4602
4602
  return self.parse_funding_rates(data, symbols)
4603
4603
 
4604
- def withdraw(self, code: str, amount: float, address: str, tag=None, params={}) -> Transaction:
4604
+ def withdraw(self, code: str, amount: float, address: str, tag: Str = None, params={}) -> Transaction:
4605
4605
  """
4606
4606
  make a withdrawal
4607
4607
 
@@ -4610,7 +4610,7 @@ class coinex(Exchange, ImplicitAPI):
4610
4610
  :param str code: unified currency code
4611
4611
  :param float amount: the amount to withdraw
4612
4612
  :param str address: the address to withdraw to
4613
- :param str tag:
4613
+ :param str [tag]: memo
4614
4614
  :param dict [params]: extra parameters specific to the exchange API endpoint
4615
4615
  :param str [params.network]: unified network code
4616
4616
  :returns dict: a `transaction structure <https://docs.ccxt.com/#/?id=transaction-structure>`
ccxt/coinmate.py CHANGED
@@ -700,7 +700,7 @@ class coinmate(Exchange, ImplicitAPI):
700
700
  },
701
701
  }
702
702
 
703
- def withdraw(self, code: str, amount: float, address: str, tag=None, params={}) -> Transaction:
703
+ def withdraw(self, code: str, amount: float, address: str, tag: Str = None, params={}) -> Transaction:
704
704
  """
705
705
  make a withdrawal
706
706
 
ccxt/coinsph.py CHANGED
@@ -1768,7 +1768,7 @@ class coinsph(Exchange, ImplicitAPI):
1768
1768
  'tierBased': None,
1769
1769
  }
1770
1770
 
1771
- def withdraw(self, code: str, amount: float, address: str, tag=None, params={}) -> Transaction:
1771
+ def withdraw(self, code: str, amount: float, address: str, tag: Str = None, params={}) -> Transaction:
1772
1772
  """
1773
1773
  make a withdrawal to coins_ph account
1774
1774
 
ccxt/cryptocom.py CHANGED
@@ -1869,7 +1869,7 @@ class cryptocom(Exchange, ImplicitAPI):
1869
1869
  address = addressString
1870
1870
  return [address, tag]
1871
1871
 
1872
- def withdraw(self, code: str, amount: float, address: str, tag=None, params={}) -> Transaction:
1872
+ def withdraw(self, code: str, amount: float, address: str, tag: Str = None, params={}) -> Transaction:
1873
1873
  """
1874
1874
  make a withdrawal
1875
1875
 
ccxt/defx.py CHANGED
@@ -1893,7 +1893,7 @@ class defx(Exchange, ImplicitAPI):
1893
1893
  }
1894
1894
  return self.safe_string(ledgerType, type, type)
1895
1895
 
1896
- def withdraw(self, code: str, amount: float, address: str, tag=None, params={}):
1896
+ def withdraw(self, code: str, amount: float, address: str, tag: Str = None, params={}) -> Transaction:
1897
1897
  """
1898
1898
  make a withdrawal
1899
1899
 
@@ -1954,7 +1954,7 @@ class defx(Exchange, ImplicitAPI):
1954
1954
  'fee': None,
1955
1955
  }
1956
1956
 
1957
- def set_leverage(self, leverage: Int, symbol: Str = None, params={}):
1957
+ def set_leverage(self, leverage: int, symbol: Str = None, params={}):
1958
1958
  """
1959
1959
  set the level of leverage for a market
1960
1960
 
ccxt/delta.py CHANGED
@@ -2938,7 +2938,7 @@ class delta(Exchange, ImplicitAPI):
2938
2938
  'shortLeverage': leverageValue,
2939
2939
  }
2940
2940
 
2941
- def set_leverage(self, leverage: Int, symbol: Str = None, params={}):
2941
+ def set_leverage(self, leverage: int, symbol: Str = None, params={}):
2942
2942
  """
2943
2943
  set the level of leverage for a market
2944
2944
 
ccxt/deribit.py CHANGED
@@ -2936,7 +2936,7 @@ class deribit(Exchange, ImplicitAPI):
2936
2936
  }
2937
2937
  return self.safe_string(statuses, status, status)
2938
2938
 
2939
- def withdraw(self, code: str, amount: float, address: str, tag=None, params={}) -> Transaction:
2939
+ def withdraw(self, code: str, amount: float, address: str, tag: Str = None, params={}) -> Transaction:
2940
2940
  """
2941
2941
  make a withdrawal
2942
2942
 
ccxt/digifinex.py CHANGED
@@ -2912,7 +2912,7 @@ class digifinex(Exchange, ImplicitAPI):
2912
2912
  response = self.privateSpotPostTransfer(self.extend(request, params))
2913
2913
  return self.parse_transfer(response, currency)
2914
2914
 
2915
- def withdraw(self, code: str, amount: float, address: str, tag=None, params={}) -> Transaction:
2915
+ def withdraw(self, code: str, amount: float, address: str, tag: Str = None, params={}) -> Transaction:
2916
2916
  """
2917
2917
  make a withdrawal
2918
2918
  :param str code: unified currency code
@@ -3585,7 +3585,7 @@ class digifinex(Exchange, ImplicitAPI):
3585
3585
  'takeProfitPrice': None,
3586
3586
  })
3587
3587
 
3588
- def set_leverage(self, leverage: Int, symbol: Str = None, params={}):
3588
+ def set_leverage(self, leverage: int, symbol: Str = None, params={}):
3589
3589
  """
3590
3590
  set the level of leverage for a market
3591
3591
 
ccxt/ellipx.py CHANGED
@@ -1810,7 +1810,7 @@ class ellipx(Exchange, ImplicitAPI):
1810
1810
  'tierBased': True, # fees can vary based on volume tiers
1811
1811
  }
1812
1812
 
1813
- def withdraw(self, code: str, amount: float, address: str, tag=None, params={}) -> Transaction:
1813
+ def withdraw(self, code: str, amount: float, address: str, tag: Str = None, params={}) -> Transaction:
1814
1814
  """
1815
1815
  Make a withdrawal request
1816
1816
 
ccxt/exmo.py CHANGED
@@ -2185,7 +2185,7 @@ class exmo(Exchange, ImplicitAPI):
2185
2185
  return self.markets[symbols[0]]
2186
2186
  return None
2187
2187
 
2188
- def withdraw(self, code: str, amount: float, address: str, tag=None, params={}) -> Transaction:
2188
+ def withdraw(self, code: str, amount: float, address: str, tag: Str = None, params={}) -> Transaction:
2189
2189
  """
2190
2190
  make a withdrawal
2191
2191
 
ccxt/foxbit.py CHANGED
@@ -95,7 +95,7 @@ class foxbit(Exchange, ImplicitAPI):
95
95
  '1M': '1M',
96
96
  },
97
97
  'urls': {
98
- 'logo': 'https://github.com/user-attachments/assets/ba1435eb-1d59-4393-8de7-0db10a002fb3',
98
+ 'logo': 'https://github.com/user-attachments/assets/1f8faca2-ae2f-4222-b33e-5671e7d873dd',
99
99
  'api': {
100
100
  'public': 'https://api.foxbit.com.br',
101
101
  'private': 'https://api.foxbit.com.br',
@@ -1460,7 +1460,7 @@ class foxbit(Exchange, ImplicitAPI):
1460
1460
  # }
1461
1461
  return self.parse_order(response['create'], market)
1462
1462
 
1463
- def withdraw(self, code: str, amount: float, address: str, tag=None, params={}):
1463
+ def withdraw(self, code: str, amount: float, address: str, tag: Str = None, params={}) -> Transaction:
1464
1464
  """
1465
1465
  Make a withdrawal.
1466
1466
 
@@ -1628,7 +1628,7 @@ class foxbit(Exchange, ImplicitAPI):
1628
1628
  'percentage': self.safe_string(rolling_24h, 'price_change_percent'),
1629
1629
  'average': None,
1630
1630
  'baseVolume': self.safe_string(rolling_24h, 'volume'),
1631
- 'quoteVolume': None,
1631
+ 'quoteVolume': self.safe_string(rolling_24h, 'quote_volume'),
1632
1632
  'info': ticker,
1633
1633
  }, market)
1634
1634
 
ccxt/gate.py CHANGED
@@ -3790,7 +3790,7 @@ class gate(Exchange, ImplicitAPI):
3790
3790
  response = self.privateWalletGetWithdrawals(self.extend(request, params))
3791
3791
  return self.parse_transactions(response, currency)
3792
3792
 
3793
- def withdraw(self, code: str, amount: float, address: str, tag=None, params={}) -> Transaction:
3793
+ def withdraw(self, code: str, amount: float, address: str, tag: Str = None, params={}) -> Transaction:
3794
3794
  """
3795
3795
  make a withdrawal
3796
3796
 
@@ -5458,7 +5458,7 @@ class gate(Exchange, ImplicitAPI):
5458
5458
  'info': transfer,
5459
5459
  }
5460
5460
 
5461
- def set_leverage(self, leverage: Int, symbol: Str = None, params={}):
5461
+ def set_leverage(self, leverage: int, symbol: Str = None, params={}):
5462
5462
  """
5463
5463
  set the level of leverage for a market
5464
5464
 
@@ -7211,12 +7211,27 @@ class gate(Exchange, ImplicitAPI):
7211
7211
  quoteValueString = self.safe_string(liquidation, 'pnl')
7212
7212
  if quoteValueString is None:
7213
7213
  quoteValueString = Precise.string_mul(baseValueString, priceString)
7214
+ # --- derive side ---
7215
+ # 1) options payload has explicit 'side': 'long' | 'short'
7216
+ optPos = self.safe_string_lower(liquidation, 'side')
7217
+ side: Str = None
7218
+ if optPos == 'long':
7219
+ side = 'buy'
7220
+ elif optPos == 'short':
7221
+ side = 'sell'
7222
+ else:
7223
+ if size is not None: # 2) futures/perpetual(and fallback for options): infer from size
7224
+ if Precise.string_gt(size, '0'):
7225
+ side = 'buy'
7226
+ elif Precise.string_lt(size, '0'):
7227
+ side = 'sell'
7214
7228
  return self.safe_liquidation({
7215
7229
  'info': liquidation,
7216
7230
  'symbol': self.safe_symbol(marketId, market),
7217
7231
  'contracts': self.parse_number(contractsString),
7218
7232
  'contractSize': self.parse_number(contractSizeString),
7219
7233
  'price': self.parse_number(priceString),
7234
+ 'side': side,
7220
7235
  'baseValue': self.parse_number(baseValueString),
7221
7236
  'quoteValue': self.parse_number(Precise.string_abs(quoteValueString)),
7222
7237
  'timestamp': timestamp,
ccxt/gemini.py CHANGED
@@ -1615,7 +1615,7 @@ class gemini(Exchange, ImplicitAPI):
1615
1615
  response = self.privatePostV1Mytrades(self.extend(request, params))
1616
1616
  return self.parse_trades(response, market, since, limit)
1617
1617
 
1618
- def withdraw(self, code: str, amount: float, address: str, tag=None, params={}) -> Transaction:
1618
+ def withdraw(self, code: str, amount: float, address: str, tag: Str = None, params={}) -> Transaction:
1619
1619
  """
1620
1620
  make a withdrawal
1621
1621
 
ccxt/hashkey.py CHANGED
@@ -1999,7 +1999,7 @@ class hashkey(Exchange, ImplicitAPI):
1999
1999
  #
2000
2000
  return self.parse_transactions(response, currency, since, limit, {'type': 'withdrawal'})
2001
2001
 
2002
- def withdraw(self, code: str, amount: float, address: str, tag=None, params={}) -> Transaction:
2002
+ def withdraw(self, code: str, amount: float, address: str, tag: Str = None, params={}) -> Transaction:
2003
2003
  """
2004
2004
  make a withdrawal
2005
2005
 
@@ -3877,7 +3877,7 @@ class hashkey(Exchange, ImplicitAPI):
3877
3877
  'shortLeverage': leverageValue,
3878
3878
  }
3879
3879
 
3880
- def set_leverage(self, leverage: Int, symbol: Str = None, params={}):
3880
+ def set_leverage(self, leverage: int, symbol: Str = None, params={}):
3881
3881
  """
3882
3882
  set the level of leverage for a market
3883
3883
 
ccxt/hibachi.py CHANGED
@@ -1148,7 +1148,7 @@ class hibachi(Exchange, ImplicitAPI):
1148
1148
  message = self.binary_concat(encodedAssetId, encodedQuantity, encodedMaxFees, encodedAddress)
1149
1149
  return message
1150
1150
 
1151
- def withdraw(self, code: str, amount: float, address: str, tag=None, params={}) -> Transaction:
1151
+ def withdraw(self, code: str, amount: float, address: str, tag: Str = None, params={}) -> Transaction:
1152
1152
  """
1153
1153
  make a withdrawal
1154
1154
 
ccxt/hitbtc.py CHANGED
@@ -2648,7 +2648,7 @@ class hitbtc(Exchange, ImplicitAPI):
2648
2648
  'info': response,
2649
2649
  }
2650
2650
 
2651
- def withdraw(self, code: str, amount: float, address: str, tag=None, params={}) -> Transaction:
2651
+ def withdraw(self, code: str, amount: float, address: str, tag: Str = None, params={}) -> Transaction:
2652
2652
  """
2653
2653
  make a withdrawal
2654
2654
 
@@ -3417,7 +3417,7 @@ class hitbtc(Exchange, ImplicitAPI):
3417
3417
  'shortLeverage': leverageValue,
3418
3418
  }
3419
3419
 
3420
- def set_leverage(self, leverage: Int, symbol: Str = None, params={}):
3420
+ def set_leverage(self, leverage: int, symbol: Str = None, params={}):
3421
3421
  """
3422
3422
  set the level of leverage for a market
3423
3423
 
ccxt/hollaex.py CHANGED
@@ -1798,7 +1798,7 @@ class hollaex(Exchange, ImplicitAPI):
1798
1798
  'fee': fee,
1799
1799
  }
1800
1800
 
1801
- def withdraw(self, code: str, amount: float, address: str, tag=None, params={}) -> Transaction:
1801
+ def withdraw(self, code: str, amount: float, address: str, tag: Str = None, params={}) -> Transaction:
1802
1802
  """
1803
1803
  make a withdrawal
1804
1804
 
ccxt/htx.py CHANGED
@@ -5016,7 +5016,7 @@ class htx(Exchange, ImplicitAPI):
5016
5016
  params['createMarketBuyOrderRequiresPrice'] = False
5017
5017
  return self.create_order(symbol, 'market', 'buy', cost, None, params)
5018
5018
 
5019
- def create_trailing_percent_order(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: Num = None, trailingPercent=None, trailingTriggerPrice=None, params={}) -> Order:
5019
+ def create_trailing_percent_order(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: Num = None, trailingPercent: Num = None, trailingTriggerPrice: Num = None, params={}) -> Order:
5020
5020
  """
5021
5021
  create a trailing order by providing the symbol, type, side, amount, price and trailingPercent
5022
5022
  :param str symbol: unified symbol of the market to create an order in
@@ -6308,7 +6308,7 @@ class htx(Exchange, ImplicitAPI):
6308
6308
  }
6309
6309
  return self.safe_string(statuses, status, status)
6310
6310
 
6311
- def withdraw(self, code: str, amount: float, address: str, tag=None, params={}) -> Transaction:
6311
+ def withdraw(self, code: str, amount: float, address: str, tag: Str = None, params={}) -> Transaction:
6312
6312
  """
6313
6313
 
6314
6314
  https://www.htx.com/en-us/opend/newApiPages/?id=7ec4cc41-7773-11ed-9966-0242ac110003
@@ -7133,7 +7133,7 @@ class htx(Exchange, ImplicitAPI):
7133
7133
  data = self.safe_list(response, 'data', [])
7134
7134
  return self.parse_incomes(data, market, since, limit)
7135
7135
 
7136
- def set_leverage(self, leverage: Int, symbol: Str = None, params={}):
7136
+ def set_leverage(self, leverage: int, symbol: Str = None, params={}):
7137
7137
  """
7138
7138
  set the level of leverage for a market
7139
7139
 
@@ -8852,6 +8852,7 @@ class htx(Exchange, ImplicitAPI):
8852
8852
  'contracts': self.safe_number(liquidation, 'volume'),
8853
8853
  'contractSize': self.safe_number(market, 'contractSize'),
8854
8854
  'price': self.safe_number(liquidation, 'price'),
8855
+ 'side': self.safe_string_lower(liquidation, 'direction'),
8855
8856
  'baseValue': self.safe_number(liquidation, 'amount'),
8856
8857
  'quoteValue': self.safe_number(liquidation, 'trade_turnover'),
8857
8858
  'timestamp': timestamp,
ccxt/hyperliquid.py CHANGED
@@ -1675,6 +1675,43 @@ class hyperliquid(Exchange, ImplicitAPI):
1675
1675
  if symbol is None:
1676
1676
  raise ArgumentsRequired(self.id + ' cancelOrders() requires a symbol argument')
1677
1677
  self.load_markets()
1678
+ request = self.cancel_orders_request(ids, symbol, params)
1679
+ response = self.privatePostExchange(request)
1680
+ #
1681
+ # {
1682
+ # "status":"ok",
1683
+ # "response":{
1684
+ # "type":"cancel",
1685
+ # "data":{
1686
+ # "statuses":[
1687
+ # "success"
1688
+ # ]
1689
+ # }
1690
+ # }
1691
+ # }
1692
+ #
1693
+ innerResponse = self.safe_dict(response, 'response')
1694
+ data = self.safe_dict(innerResponse, 'data')
1695
+ statuses = self.safe_list(data, 'statuses')
1696
+ orders = []
1697
+ for i in range(0, len(statuses)):
1698
+ status = statuses[i]
1699
+ orders.append(self.safe_order({
1700
+ 'info': status,
1701
+ 'status': status,
1702
+ }))
1703
+ return orders
1704
+
1705
+ def cancel_orders_request(self, ids: List[str], symbol: Str = None, params={}) -> dict:
1706
+ """
1707
+ build the request payload for cancelling multiple orders
1708
+ https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/exchange-endpoint#cancel-order-s
1709
+ https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/exchange-endpoint#cancel-order-s-by-cloid
1710
+ :param str[] ids: order ids
1711
+ :param str symbol: unified market symbol
1712
+ :param dict [params]:
1713
+ :returns dict: the raw request object to be sent to the exchange
1714
+ """
1678
1715
  market = self.market(symbol)
1679
1716
  clientOrderId = self.safe_value_2(params, 'clientOrderId', 'client_id')
1680
1717
  params = self.omit(params, ['clientOrderId', 'client_id'])
@@ -1715,31 +1752,7 @@ class hyperliquid(Exchange, ImplicitAPI):
1715
1752
  if vaultAddress is not None:
1716
1753
  params = self.omit(params, 'vaultAddress')
1717
1754
  request['vaultAddress'] = vaultAddress
1718
- response = self.privatePostExchange(request)
1719
- #
1720
- # {
1721
- # "status":"ok",
1722
- # "response":{
1723
- # "type":"cancel",
1724
- # "data":{
1725
- # "statuses":[
1726
- # "success"
1727
- # ]
1728
- # }
1729
- # }
1730
- # }
1731
- #
1732
- innerResponse = self.safe_dict(response, 'response')
1733
- data = self.safe_dict(innerResponse, 'data')
1734
- statuses = self.safe_list(data, 'statuses')
1735
- orders = []
1736
- for i in range(0, len(statuses)):
1737
- status = statuses[i]
1738
- orders.append(self.safe_order({
1739
- 'info': status,
1740
- 'status': status,
1741
- }))
1742
- return orders
1755
+ return request
1743
1756
 
1744
1757
  def cancel_orders_for_symbols(self, orders: List[CancellationRequest], params={}):
1745
1758
  """
@@ -2468,6 +2481,8 @@ class hyperliquid(Exchange, ImplicitAPI):
2468
2481
  }, market)
2469
2482
 
2470
2483
  def parse_order_status(self, status: Str):
2484
+ if status is None:
2485
+ return None
2471
2486
  statuses: dict = {
2472
2487
  'triggered': 'open',
2473
2488
  'filled': 'closed',
@@ -2476,6 +2491,10 @@ class hyperliquid(Exchange, ImplicitAPI):
2476
2491
  'rejected': 'rejected',
2477
2492
  'marginCanceled': 'canceled',
2478
2493
  }
2494
+ if status.endswith('Rejected'):
2495
+ return 'rejected'
2496
+ if status.endswith('Canceled'):
2497
+ return 'canceled'
2479
2498
  return self.safe_string(statuses, status, status)
2480
2499
 
2481
2500
  def parse_order_type(self, status):
@@ -2805,7 +2824,7 @@ class hyperliquid(Exchange, ImplicitAPI):
2805
2824
  #
2806
2825
  return response
2807
2826
 
2808
- def set_leverage(self, leverage: Int, symbol: Str = None, params={}):
2827
+ def set_leverage(self, leverage: int, symbol: Str = None, params={}):
2809
2828
  """
2810
2829
  set the level of leverage for a market
2811
2830
  :param float leverage: the rate of leverage
@@ -3058,7 +3077,7 @@ class hyperliquid(Exchange, ImplicitAPI):
3058
3077
  'status': 'ok',
3059
3078
  }
3060
3079
 
3061
- def withdraw(self, code: str, amount: float, address: str, tag=None, params={}) -> Transaction:
3080
+ def withdraw(self, code: str, amount: float, address: str, tag: Str = None, params={}) -> Transaction:
3062
3081
  """
3063
3082
  make a withdrawal(only support USDC)
3064
3083
 
@@ -3586,6 +3605,27 @@ class hyperliquid(Exchange, ImplicitAPI):
3586
3605
  'rate': rate,
3587
3606
  }
3588
3607
 
3608
+ def reserve_request_weight(self, weight: Num, params={}) -> dict:
3609
+ """
3610
+ Instead of trading to increase the address based rate limits, self action allows reserving additional actions for 0.0005 USDC per request. The cost is paid from the Perps balance.
3611
+ :param number weight: the weight to reserve, 1 weight = 1 action, 0.0005 USDC per action
3612
+ :param dict [params]: extra parameters specific to the exchange API endpoint
3613
+ :returns dict: a response object
3614
+ """
3615
+ nonce = self.milliseconds()
3616
+ request: dict = {
3617
+ 'nonce': nonce,
3618
+ }
3619
+ action: dict = {
3620
+ 'type': 'reserveRequestWeight',
3621
+ 'weight': weight,
3622
+ }
3623
+ signature = self.sign_l1_action(action, nonce)
3624
+ request['action'] = action
3625
+ request['signature'] = signature
3626
+ response = self.privatePostExchange(self.extend(request, params))
3627
+ return response
3628
+
3589
3629
  def extract_type_from_delta(self, data=[]):
3590
3630
  records = []
3591
3631
  for i in range(0, len(data)):
@@ -3639,8 +3679,10 @@ class hyperliquid(Exchange, ImplicitAPI):
3639
3679
  responsePayload = self.safe_dict(response, 'response', {})
3640
3680
  data = self.safe_dict(responsePayload, 'data', {})
3641
3681
  statuses = self.safe_list(data, 'statuses', [])
3642
- firstStatus = self.safe_dict(statuses, 0)
3643
- message = self.safe_string(firstStatus, 'error')
3682
+ for i in range(0, len(statuses)):
3683
+ message = self.safe_string(statuses[i], 'error')
3684
+ if message is not None:
3685
+ break
3644
3686
  feedback = self.id + ' ' + body
3645
3687
  nonEmptyMessage = ((message is not None) and (message != ''))
3646
3688
  if nonEmptyMessage:
@@ -922,7 +922,7 @@ class independentreserve(Exchange, ImplicitAPI):
922
922
  'tag': self.safe_string(depositAddress, 'Tag'),
923
923
  }
924
924
 
925
- def withdraw(self, code: str, amount: float, address: str, tag=None, params={}) -> Transaction:
925
+ def withdraw(self, code: str, amount: float, address: str, tag: Str = None, params={}) -> Transaction:
926
926
  """
927
927
  make a withdrawal
928
928
 
ccxt/indodax.py CHANGED
@@ -1144,7 +1144,7 @@ class indodax(Exchange, ImplicitAPI):
1144
1144
  transactions = self.array_concat(withdraws, deposits)
1145
1145
  return self.parse_transactions(transactions, currency, since, limit)
1146
1146
 
1147
- def withdraw(self, code: str, amount: float, address: str, tag=None, params={}) -> Transaction:
1147
+ def withdraw(self, code: str, amount: float, address: str, tag: Str = None, params={}) -> Transaction:
1148
1148
  """
1149
1149
  make a withdrawal
1150
1150