ccxt 4.4.98__py2.py3-none-any.whl → 4.4.100__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 (234) hide show
  1. ccxt/__init__.py +3 -1
  2. ccxt/abstract/bingx.py +1 -0
  3. ccxt/abstract/bitget.py +6 -0
  4. ccxt/abstract/hibachi.py +26 -0
  5. ccxt/alpaca.py +1 -1
  6. ccxt/apex.py +1 -1
  7. ccxt/ascendex.py +1 -1
  8. ccxt/async_support/__init__.py +3 -1
  9. ccxt/async_support/alpaca.py +1 -1
  10. ccxt/async_support/apex.py +1 -1
  11. ccxt/async_support/ascendex.py +1 -1
  12. ccxt/async_support/base/exchange.py +44 -9
  13. ccxt/async_support/base/ws/client.py +3 -1
  14. ccxt/async_support/bigone.py +1 -1
  15. ccxt/async_support/binance.py +10 -8
  16. ccxt/async_support/bingx.py +33 -4
  17. ccxt/async_support/bitbank.py +1 -1
  18. ccxt/async_support/bitfinex.py +4 -1
  19. ccxt/async_support/bitflyer.py +1 -1
  20. ccxt/async_support/bitget.py +2040 -561
  21. ccxt/async_support/bithumb.py +1 -1
  22. ccxt/async_support/bitmart.py +2 -2
  23. ccxt/async_support/bitmex.py +3 -2
  24. ccxt/async_support/bitopro.py +1 -1
  25. ccxt/async_support/bitrue.py +2 -2
  26. ccxt/async_support/bitso.py +1 -1
  27. ccxt/async_support/bitstamp.py +1 -1
  28. ccxt/async_support/bittrade.py +1 -1
  29. ccxt/async_support/bitvavo.py +1 -1
  30. ccxt/async_support/blockchaincom.py +1 -1
  31. ccxt/async_support/blofin.py +1 -1
  32. ccxt/async_support/btcmarkets.py +1 -1
  33. ccxt/async_support/bybit.py +7 -3
  34. ccxt/async_support/coinbase.py +1 -1
  35. ccxt/async_support/coinbaseexchange.py +1 -1
  36. ccxt/async_support/coinbaseinternational.py +1 -1
  37. ccxt/async_support/coincatch.py +2 -2
  38. ccxt/async_support/coinex.py +67 -6
  39. ccxt/async_support/coinmate.py +1 -1
  40. ccxt/async_support/coinsph.py +1 -1
  41. ccxt/async_support/cryptocom.py +2 -2
  42. ccxt/async_support/defx.py +2 -2
  43. ccxt/async_support/delta.py +1 -1
  44. ccxt/async_support/deribit.py +1 -1
  45. ccxt/async_support/digifinex.py +2 -2
  46. ccxt/async_support/ellipx.py +1 -1
  47. ccxt/async_support/exmo.py +1 -1
  48. ccxt/async_support/foxbit.py +3 -3
  49. ccxt/async_support/gate.py +18 -4
  50. ccxt/async_support/gemini.py +1 -1
  51. ccxt/async_support/hashkey.py +2 -2
  52. ccxt/async_support/hibachi.py +2080 -0
  53. ccxt/async_support/hitbtc.py +2 -2
  54. ccxt/async_support/hollaex.py +1 -1
  55. ccxt/async_support/htx.py +4 -3
  56. ccxt/async_support/hyperliquid.py +71 -29
  57. ccxt/async_support/independentreserve.py +1 -1
  58. ccxt/async_support/indodax.py +1 -1
  59. ccxt/async_support/kraken.py +1 -1
  60. ccxt/async_support/krakenfutures.py +2 -1
  61. ccxt/async_support/kucoin.py +2 -2
  62. ccxt/async_support/kucoinfutures.py +2 -1
  63. ccxt/async_support/lbank.py +2 -2
  64. ccxt/async_support/mercado.py +1 -1
  65. ccxt/async_support/mexc.py +9 -2
  66. ccxt/async_support/modetrade.py +93 -2
  67. ccxt/async_support/ndax.py +1 -1
  68. ccxt/async_support/novadax.py +35 -1
  69. ccxt/async_support/okcoin.py +1 -1
  70. ccxt/async_support/okx.py +2 -2
  71. ccxt/async_support/onetrading.py +33 -0
  72. ccxt/async_support/oxfun.py +1 -1
  73. ccxt/async_support/p2b.py +32 -0
  74. ccxt/async_support/paradex.py +2 -1
  75. ccxt/async_support/phemex.py +2 -2
  76. ccxt/async_support/poloniex.py +2 -2
  77. ccxt/async_support/probit.py +36 -1
  78. ccxt/async_support/tokocrypto.py +1 -1
  79. ccxt/async_support/upbit.py +1 -1
  80. ccxt/async_support/vertex.py +1 -1
  81. ccxt/async_support/wavesexchange.py +1 -1
  82. ccxt/async_support/whitebit.py +2 -2
  83. ccxt/async_support/woo.py +4 -4
  84. ccxt/async_support/woofipro.py +93 -2
  85. ccxt/async_support/xt.py +2 -2
  86. ccxt/async_support/yobit.py +1 -1
  87. ccxt/async_support/zaif.py +1 -1
  88. ccxt/async_support/zonda.py +1 -1
  89. ccxt/base/errors.py +0 -6
  90. ccxt/base/exchange.py +11 -9
  91. ccxt/base/types.py +1 -0
  92. ccxt/bigone.py +1 -1
  93. ccxt/binance.py +10 -8
  94. ccxt/bingx.py +33 -4
  95. ccxt/bitbank.py +1 -1
  96. ccxt/bitfinex.py +4 -1
  97. ccxt/bitflyer.py +1 -1
  98. ccxt/bitget.py +2040 -561
  99. ccxt/bithumb.py +1 -1
  100. ccxt/bitmart.py +2 -2
  101. ccxt/bitmex.py +3 -2
  102. ccxt/bitopro.py +1 -1
  103. ccxt/bitrue.py +2 -2
  104. ccxt/bitso.py +1 -1
  105. ccxt/bitstamp.py +1 -1
  106. ccxt/bittrade.py +1 -1
  107. ccxt/bitvavo.py +1 -1
  108. ccxt/blockchaincom.py +1 -1
  109. ccxt/blofin.py +1 -1
  110. ccxt/btcmarkets.py +1 -1
  111. ccxt/bybit.py +7 -3
  112. ccxt/coinbase.py +1 -1
  113. ccxt/coinbaseexchange.py +1 -1
  114. ccxt/coinbaseinternational.py +1 -1
  115. ccxt/coincatch.py +2 -2
  116. ccxt/coinex.py +67 -6
  117. ccxt/coinmate.py +1 -1
  118. ccxt/coinsph.py +1 -1
  119. ccxt/cryptocom.py +2 -2
  120. ccxt/defx.py +2 -2
  121. ccxt/delta.py +1 -1
  122. ccxt/deribit.py +1 -1
  123. ccxt/digifinex.py +2 -2
  124. ccxt/ellipx.py +1 -1
  125. ccxt/exmo.py +1 -1
  126. ccxt/foxbit.py +3 -3
  127. ccxt/gate.py +18 -4
  128. ccxt/gemini.py +1 -1
  129. ccxt/hashkey.py +2 -2
  130. ccxt/hibachi.py +2079 -0
  131. ccxt/hitbtc.py +2 -2
  132. ccxt/hollaex.py +1 -1
  133. ccxt/htx.py +4 -3
  134. ccxt/hyperliquid.py +71 -29
  135. ccxt/independentreserve.py +1 -1
  136. ccxt/indodax.py +1 -1
  137. ccxt/kraken.py +1 -1
  138. ccxt/krakenfutures.py +2 -1
  139. ccxt/kucoin.py +2 -2
  140. ccxt/kucoinfutures.py +2 -1
  141. ccxt/lbank.py +2 -2
  142. ccxt/mercado.py +1 -1
  143. ccxt/mexc.py +9 -2
  144. ccxt/modetrade.py +93 -2
  145. ccxt/ndax.py +1 -1
  146. ccxt/novadax.py +35 -1
  147. ccxt/okcoin.py +1 -1
  148. ccxt/okx.py +2 -2
  149. ccxt/onetrading.py +33 -0
  150. ccxt/oxfun.py +1 -1
  151. ccxt/p2b.py +32 -0
  152. ccxt/paradex.py +2 -1
  153. ccxt/phemex.py +2 -2
  154. ccxt/poloniex.py +2 -2
  155. ccxt/pro/__init__.py +1 -1
  156. ccxt/pro/alpaca.py +2 -2
  157. ccxt/pro/apex.py +2 -2
  158. ccxt/pro/ascendex.py +2 -2
  159. ccxt/pro/binance.py +4 -5
  160. ccxt/pro/bitget.py +3 -3
  161. ccxt/pro/bithumb.py +2 -2
  162. ccxt/pro/bitmart.py +2 -2
  163. ccxt/pro/bitmex.py +3 -3
  164. ccxt/pro/bitstamp.py +3 -3
  165. ccxt/pro/bittrade.py +2 -2
  166. ccxt/pro/bitvavo.py +5 -3
  167. ccxt/pro/bybit.py +5 -4
  168. ccxt/pro/cex.py +3 -2
  169. ccxt/pro/coinbaseexchange.py +4 -4
  170. ccxt/pro/coinbaseinternational.py +2 -2
  171. ccxt/pro/coincatch.py +1 -1
  172. ccxt/pro/coinex.py +1 -1
  173. ccxt/pro/coinone.py +2 -2
  174. ccxt/pro/cryptocom.py +2 -2
  175. ccxt/pro/derive.py +2 -2
  176. ccxt/pro/gate.py +3 -3
  177. ccxt/pro/hollaex.py +2 -2
  178. ccxt/pro/htx.py +3 -3
  179. ccxt/pro/hyperliquid.py +101 -14
  180. ccxt/pro/kraken.py +2 -2
  181. ccxt/pro/krakenfutures.py +4 -3
  182. ccxt/pro/kucoin.py +4 -3
  183. ccxt/pro/kucoinfutures.py +4 -3
  184. ccxt/pro/mexc.py +328 -139
  185. ccxt/pro/modetrade.py +2 -2
  186. ccxt/pro/okcoin.py +2 -2
  187. ccxt/pro/okx.py +7 -6
  188. ccxt/pro/onetrading.py +2 -2
  189. ccxt/pro/oxfun.py +1 -1
  190. ccxt/pro/p2b.py +2 -2
  191. ccxt/pro/paradex.py +2 -2
  192. ccxt/pro/poloniex.py +2 -2
  193. ccxt/pro/probit.py +2 -2
  194. ccxt/pro/vertex.py +2 -2
  195. ccxt/pro/whitebit.py +2 -2
  196. ccxt/pro/woo.py +2 -2
  197. ccxt/pro/woofipro.py +2 -2
  198. ccxt/probit.py +36 -1
  199. ccxt/protobuf/__init__.py +0 -0
  200. ccxt/protobuf/mexc/PrivateAccountV3Api_pb2.py +37 -0
  201. ccxt/protobuf/mexc/PrivateDealsV3Api_pb2.py +37 -0
  202. ccxt/protobuf/mexc/PrivateOrdersV3Api_pb2.py +37 -0
  203. ccxt/protobuf/mexc/PublicAggreBookTickerV3Api_pb2.py +37 -0
  204. ccxt/protobuf/mexc/PublicAggreDealsV3Api_pb2.py +39 -0
  205. ccxt/protobuf/mexc/PublicAggreDepthsV3Api_pb2.py +39 -0
  206. ccxt/protobuf/mexc/PublicBookTickerBatchV3Api_pb2.py +38 -0
  207. ccxt/protobuf/mexc/PublicBookTickerV3Api_pb2.py +37 -0
  208. ccxt/protobuf/mexc/PublicDealsV3Api_pb2.py +39 -0
  209. ccxt/protobuf/mexc/PublicIncreaseDepthsBatchV3Api_pb2.py +38 -0
  210. ccxt/protobuf/mexc/PublicIncreaseDepthsV3Api_pb2.py +39 -0
  211. ccxt/protobuf/mexc/PublicLimitDepthsV3Api_pb2.py +39 -0
  212. ccxt/protobuf/mexc/PublicMiniTickerV3Api_pb2.py +37 -0
  213. ccxt/protobuf/mexc/PublicMiniTickersV3Api_pb2.py +38 -0
  214. ccxt/protobuf/mexc/PublicSpotKlineV3Api_pb2.py +37 -0
  215. ccxt/protobuf/mexc/PushDataV3ApiWrapper_pb2.py +52 -0
  216. ccxt/protobuf/mexc/__init__.py +0 -0
  217. ccxt/test/tests_async.py +1 -1
  218. ccxt/test/tests_sync.py +1 -1
  219. ccxt/tokocrypto.py +1 -1
  220. ccxt/upbit.py +1 -1
  221. ccxt/vertex.py +1 -1
  222. ccxt/wavesexchange.py +1 -1
  223. ccxt/whitebit.py +2 -2
  224. ccxt/woo.py +4 -4
  225. ccxt/woofipro.py +93 -2
  226. ccxt/xt.py +2 -2
  227. ccxt/yobit.py +1 -1
  228. ccxt/zaif.py +1 -1
  229. ccxt/zonda.py +1 -1
  230. {ccxt-4.4.98.dist-info → ccxt-4.4.100.dist-info}/METADATA +8 -7
  231. {ccxt-4.4.98.dist-info → ccxt-4.4.100.dist-info}/RECORD +234 -213
  232. {ccxt-4.4.98.dist-info → ccxt-4.4.100.dist-info}/LICENSE.txt +0 -0
  233. {ccxt-4.4.98.dist-info → ccxt-4.4.100.dist-info}/WHEEL +0 -0
  234. {ccxt-4.4.98.dist-info → ccxt-4.4.100.dist-info}/top_level.txt +0 -0
ccxt/bithumb.py CHANGED
@@ -1094,7 +1094,7 @@ class bithumb(Exchange, ImplicitAPI):
1094
1094
  }
1095
1095
  return self.cancel_order(order['id'], order['symbol'], self.extend(request, params))
1096
1096
 
1097
- def withdraw(self, code: str, amount: float, address: str, tag=None, params={}) -> Transaction:
1097
+ def withdraw(self, code: str, amount: float, address: str, tag: Str = None, params={}) -> Transaction:
1098
1098
  """
1099
1099
  make a withdrawal
1100
1100
 
ccxt/bitmart.py CHANGED
@@ -3606,7 +3606,7 @@ class bitmart(Exchange, ImplicitAPI):
3606
3606
  'tag': self.safe_string_2(depositAddress, 'address_memo', 'memo'),
3607
3607
  }
3608
3608
 
3609
- def withdraw(self, code: str, amount: float, address: str, tag=None, params={}) -> Transaction:
3609
+ def withdraw(self, code: str, amount: float, address: str, tag: Str = None, params={}) -> Transaction:
3610
3610
  """
3611
3611
  make a withdrawal
3612
3612
 
@@ -4466,7 +4466,7 @@ class bitmart(Exchange, ImplicitAPI):
4466
4466
  'info': interest,
4467
4467
  }, market)
4468
4468
 
4469
- def set_leverage(self, leverage: Int, symbol: Str = None, params={}):
4469
+ def set_leverage(self, leverage: int, symbol: Str = None, params={}):
4470
4470
  """
4471
4471
  set the level of leverage for a market
4472
4472
 
ccxt/bitmex.py CHANGED
@@ -2446,7 +2446,7 @@ class bitmex(Exchange, ImplicitAPI):
2446
2446
  'takeProfitPrice': None,
2447
2447
  })
2448
2448
 
2449
- def withdraw(self, code: str, amount: float, address: str, tag=None, params={}) -> Transaction:
2449
+ def withdraw(self, code: str, amount: float, address: str, tag: Str = None, params={}) -> Transaction:
2450
2450
  """
2451
2451
  make a withdrawal
2452
2452
 
@@ -2625,7 +2625,7 @@ class bitmex(Exchange, ImplicitAPI):
2625
2625
  'datetime': datetime,
2626
2626
  }
2627
2627
 
2628
- def set_leverage(self, leverage: Int, symbol: Str = None, params={}):
2628
+ def set_leverage(self, leverage: int, symbol: Str = None, params={}):
2629
2629
  """
2630
2630
  set the level of leverage for a market
2631
2631
 
@@ -2883,6 +2883,7 @@ class bitmex(Exchange, ImplicitAPI):
2883
2883
  'contracts': None,
2884
2884
  'contractSize': self.safe_number(market, 'contractSize'),
2885
2885
  'price': self.safe_number(liquidation, 'price'),
2886
+ 'side': self.safe_string_lower(liquidation, 'side'),
2886
2887
  'baseValue': None,
2887
2888
  'quoteValue': None,
2888
2889
  'timestamp': None,
ccxt/bitopro.py CHANGED
@@ -1680,7 +1680,7 @@ class bitopro(Exchange, ImplicitAPI):
1680
1680
  #
1681
1681
  return self.parse_transaction(result, currency)
1682
1682
 
1683
- def withdraw(self, code: str, amount: float, address: str, tag=None, params={}) -> Transaction:
1683
+ def withdraw(self, code: str, amount: float, address: str, tag: Str = None, params={}) -> Transaction:
1684
1684
  """
1685
1685
  make a withdrawal
1686
1686
 
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
 
@@ -5856,7 +5856,11 @@ classic accounts only/ spot not supported* fetches information on an order made
5856
5856
  """
5857
5857
  tag, params = self.handle_withdraw_tag_and_params(tag, params)
5858
5858
  accountType = None
5859
+ accounts = self.is_unified_enabled()
5860
+ isUta = accounts[1]
5859
5861
  accountType, params = self.handle_option_and_params(params, 'withdraw', 'accountType', 'SPOT')
5862
+ if isUta:
5863
+ accountType = 'UTA'
5860
5864
  self.load_markets()
5861
5865
  self.check_address(address)
5862
5866
  currency = self.currency(code)
@@ -6401,7 +6405,7 @@ classic accounts only/ spot not supported* fetches information on an order made
6401
6405
  response = self.privatePostV5PositionSwitchIsolated(self.extend(request, params))
6402
6406
  return response
6403
6407
 
6404
- def set_leverage(self, leverage: Int, symbol: Str = None, params={}):
6408
+ def set_leverage(self, leverage: int, symbol: Str = None, params={}):
6405
6409
  """
6406
6410
  set the level of leverage for a market
6407
6411
 
@@ -7934,7 +7938,7 @@ classic accounts only/ spot not supported* fetches information on an order made
7934
7938
  if market['spot']:
7935
7939
  raise NotSupported(self.id + ' fetchLeverageTiers() is not supported for spot market')
7936
7940
  symbol = market['symbol']
7937
- data = self.get_leverage_tiers_paginated(symbol, self.extend({'paginate': True, 'paginationCalls': 40}, params))
7941
+ data = self.get_leverage_tiers_paginated(symbol, self.extend({'paginate': True, 'paginationCalls': 50}, params))
7938
7942
  symbols = self.market_symbols(symbols)
7939
7943
  return self.parse_leverage_tiers(data, symbols, 'symbol')
7940
7944
 
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
@@ -86,7 +86,7 @@ class coinex(Exchange, ImplicitAPI):
86
86
  'fetchDepositAddressesByNetwork': False,
87
87
  'fetchDeposits': True,
88
88
  'fetchDepositWithdrawFee': True,
89
- 'fetchDepositWithdrawFees': False,
89
+ 'fetchDepositWithdrawFees': True,
90
90
  'fetchFundingHistory': True,
91
91
  'fetchFundingInterval': True,
92
92
  'fetchFundingIntervals': False,
@@ -739,6 +739,7 @@ class coinex(Exchange, ImplicitAPI):
739
739
  for j in range(0, len(chains)):
740
740
  chain = chains[j]
741
741
  networkId = self.safe_string(chain, 'chain')
742
+ networkCode = self.network_id_to_code(networkId, code)
742
743
  if networkId is None:
743
744
  continue
744
745
  precisionString = self.parse_precision(self.safe_string(chain, 'withdrawal_precision'))
@@ -749,7 +750,7 @@ class coinex(Exchange, ImplicitAPI):
749
750
  canWithdrawChain = self.safe_bool(chain, 'withdraw_enabled')
750
751
  network: dict = {
751
752
  'id': networkId,
752
- 'network': networkId,
753
+ 'network': networkCode,
753
754
  'name': None,
754
755
  'active': canDepositChain and canWithdrawChain,
755
756
  'deposit': canDepositChain,
@@ -772,7 +773,7 @@ class coinex(Exchange, ImplicitAPI):
772
773
  },
773
774
  'info': chain,
774
775
  }
775
- networks[networkId] = network
776
+ networks[networkCode] = network
776
777
  result[code] = self.safe_currency_structure({
777
778
  'id': currencyId,
778
779
  'code': code,
@@ -4124,7 +4125,7 @@ class coinex(Exchange, ImplicitAPI):
4124
4125
  # }
4125
4126
  #
4126
4127
 
4127
- def set_leverage(self, leverage: Int, symbol: Str = None, params={}):
4128
+ def set_leverage(self, leverage: int, symbol: Str = None, params={}):
4128
4129
  """
4129
4130
 
4130
4131
  https://docs.coinex.com/api/v2/futures/position/http/adjust-position-leverage
@@ -4600,7 +4601,7 @@ class coinex(Exchange, ImplicitAPI):
4600
4601
  data = self.safe_list(response, 'data', [])
4601
4602
  return self.parse_funding_rates(data, symbols)
4602
4603
 
4603
- 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:
4604
4605
  """
4605
4606
  make a withdrawal
4606
4607
 
@@ -4609,7 +4610,7 @@ class coinex(Exchange, ImplicitAPI):
4609
4610
  :param str code: unified currency code
4610
4611
  :param float amount: the amount to withdraw
4611
4612
  :param str address: the address to withdraw to
4612
- :param str tag:
4613
+ :param str [tag]: memo
4613
4614
  :param dict [params]: extra parameters specific to the exchange API endpoint
4614
4615
  :param str [params.network]: unified network code
4615
4616
  :returns dict: a `transaction structure <https://docs.ccxt.com/#/?id=transaction-structure>`
@@ -5392,6 +5393,66 @@ class coinex(Exchange, ImplicitAPI):
5392
5393
  data = self.safe_dict(response, 'data', {})
5393
5394
  return self.parse_deposit_withdraw_fee(data, currency)
5394
5395
 
5396
+ def fetch_deposit_withdraw_fees(self, codes: Strings = None, params={}):
5397
+ """
5398
+ fetch the fees for deposits and withdrawals
5399
+
5400
+ https://docs.coinex.com/api/v2/assets/deposit-withdrawal/http/list-all-deposit-withdrawal-config
5401
+
5402
+ @param codes
5403
+ :param dict [params]: extra parameters specific to the exchange API endpoint
5404
+ :returns dict: a dictionary of `fee structures <https://docs.ccxt.com/#/?id=fee-structure>`
5405
+ """
5406
+ self.load_markets()
5407
+ response = self.v2PublicGetAssetsAllDepositWithdrawConfig(params)
5408
+ #
5409
+ # {
5410
+ # "code": 0,
5411
+ # "data": [
5412
+ # {
5413
+ # "asset": {
5414
+ # "ccy": "CET",
5415
+ # "deposit_enabled": True,
5416
+ # "withdraw_enabled": True,
5417
+ # "inter_transfer_enabled": True,
5418
+ # "is_st": False
5419
+ # },
5420
+ # "chains": [
5421
+ # {
5422
+ # "chain": "CSC",
5423
+ # "min_deposit_amount": "0.8",
5424
+ # "min_withdraw_amount": "8",
5425
+ # "deposit_enabled": True,
5426
+ # "withdraw_enabled": True,
5427
+ # "deposit_delay_minutes": 0,
5428
+ # "safe_confirmations": 10,
5429
+ # "irreversible_confirmations": 20,
5430
+ # "deflation_rate": "0",
5431
+ # "withdrawal_fee": "0.026",
5432
+ # "withdrawal_precision": 8,
5433
+ # "memo": "",
5434
+ # "is_memo_required_for_deposit": False,
5435
+ # "explorer_asset_url": ""
5436
+ # },
5437
+ # ]
5438
+ # }
5439
+ # ],
5440
+ # "message": "OK"
5441
+ # }
5442
+ #
5443
+ data = self.safe_list(response, 'data', [])
5444
+ result: dict = {}
5445
+ for i in range(0, len(data)):
5446
+ item = data[i]
5447
+ asset = self.safe_dict(item, 'asset', {})
5448
+ currencyId = self.safe_string(asset, 'ccy')
5449
+ if currencyId is None:
5450
+ continue
5451
+ code = self.safe_currency_code(currencyId)
5452
+ if codes is None or self.in_array(code, codes):
5453
+ result[code] = self.parse_deposit_withdraw_fee(item)
5454
+ return result
5455
+
5395
5456
  def parse_deposit_withdraw_fee(self, fee, currency: Currency = None):
5396
5457
  #
5397
5458
  # {
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
@@ -1134,7 +1134,7 @@ class cryptocom(Exchange, ImplicitAPI):
1134
1134
  'instrument_name': market['id'],
1135
1135
  }
1136
1136
  if limit:
1137
- request['depth'] = limit
1137
+ request['depth'] = min(limit, 50) # max 50
1138
1138
  response = self.v1PublicGetPublicGetBook(self.extend(request, params))
1139
1139
  #
1140
1140
  # {
@@ -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
@@ -684,8 +684,7 @@ class gate(Exchange, ImplicitAPI):
684
684
  'BSC': 'BSC',
685
685
  'BEP20': 'BSC',
686
686
  'SOL': 'SOL',
687
- 'POLYGON': 'POL',
688
- 'MATIC': 'POL',
687
+ 'MATIC': 'MATIC',
689
688
  'OPTIMISM': 'OPETH',
690
689
  'ADA': 'ADA', # CARDANO
691
690
  'AVAXC': 'AVAX_C',
@@ -3791,7 +3790,7 @@ class gate(Exchange, ImplicitAPI):
3791
3790
  response = self.privateWalletGetWithdrawals(self.extend(request, params))
3792
3791
  return self.parse_transactions(response, currency)
3793
3792
 
3794
- 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:
3795
3794
  """
3796
3795
  make a withdrawal
3797
3796
 
@@ -5459,7 +5458,7 @@ class gate(Exchange, ImplicitAPI):
5459
5458
  'info': transfer,
5460
5459
  }
5461
5460
 
5462
- def set_leverage(self, leverage: Int, symbol: Str = None, params={}):
5461
+ def set_leverage(self, leverage: int, symbol: Str = None, params={}):
5463
5462
  """
5464
5463
  set the level of leverage for a market
5465
5464
 
@@ -7212,12 +7211,27 @@ class gate(Exchange, ImplicitAPI):
7212
7211
  quoteValueString = self.safe_string(liquidation, 'pnl')
7213
7212
  if quoteValueString is None:
7214
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'
7215
7228
  return self.safe_liquidation({
7216
7229
  'info': liquidation,
7217
7230
  'symbol': self.safe_symbol(marketId, market),
7218
7231
  'contracts': self.parse_number(contractsString),
7219
7232
  'contractSize': self.parse_number(contractSizeString),
7220
7233
  'price': self.parse_number(priceString),
7234
+ 'side': side,
7221
7235
  'baseValue': self.parse_number(baseValueString),
7222
7236
  'quoteValue': self.parse_number(Precise.string_abs(quoteValueString)),
7223
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