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
@@ -1095,7 +1095,7 @@ class bithumb(Exchange, ImplicitAPI):
1095
1095
  }
1096
1096
  return await self.cancel_order(order['id'], order['symbol'], self.extend(request, params))
1097
1097
 
1098
- async def withdraw(self, code: str, amount: float, address: str, tag=None, params={}) -> Transaction:
1098
+ async def withdraw(self, code: str, amount: float, address: str, tag: Str = None, params={}) -> Transaction:
1099
1099
  """
1100
1100
  make a withdrawal
1101
1101
 
@@ -3606,7 +3606,7 @@ class bitmart(Exchange, ImplicitAPI):
3606
3606
  'tag': self.safe_string_2(depositAddress, 'address_memo', 'memo'),
3607
3607
  }
3608
3608
 
3609
- async def withdraw(self, code: str, amount: float, address: str, tag=None, params={}) -> Transaction:
3609
+ async 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
- async def set_leverage(self, leverage: Int, symbol: Str = None, params={}):
4469
+ async def set_leverage(self, leverage: int, symbol: Str = None, params={}):
4470
4470
  """
4471
4471
  set the level of leverage for a market
4472
4472
 
@@ -2446,7 +2446,7 @@ class bitmex(Exchange, ImplicitAPI):
2446
2446
  'takeProfitPrice': None,
2447
2447
  })
2448
2448
 
2449
- async def withdraw(self, code: str, amount: float, address: str, tag=None, params={}) -> Transaction:
2449
+ async 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
- async def set_leverage(self, leverage: Int, symbol: Str = None, params={}):
2628
+ async 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,
@@ -1680,7 +1680,7 @@ class bitopro(Exchange, ImplicitAPI):
1680
1680
  #
1681
1681
  return self.parse_transaction(result, currency)
1682
1682
 
1683
- async def withdraw(self, code: str, amount: float, address: str, tag=None, params={}) -> Transaction:
1683
+ async def withdraw(self, code: str, amount: float, address: str, tag: Str = None, params={}) -> Transaction:
1684
1684
  """
1685
1685
  make a withdrawal
1686
1686
 
@@ -2749,7 +2749,7 @@ class bitrue(Exchange, ImplicitAPI):
2749
2749
  'fee': fee,
2750
2750
  }
2751
2751
 
2752
- async def withdraw(self, code: str, amount: float, address: str, tag=None, params={}) -> Transaction:
2752
+ async def withdraw(self, code: str, amount: float, address: str, tag: Str = None, params={}) -> Transaction:
2753
2753
  """
2754
2754
  make a withdrawal
2755
2755
 
@@ -2975,7 +2975,7 @@ class bitrue(Exchange, ImplicitAPI):
2975
2975
  data = self.safe_dict(response, 'data', {})
2976
2976
  return self.parse_transfer(data, currency)
2977
2977
 
2978
- async def set_leverage(self, leverage: Int, symbol: Str = None, params={}):
2978
+ async def set_leverage(self, leverage: int, symbol: Str = None, params={}):
2979
2979
  """
2980
2980
  set the level of leverage for a market
2981
2981
 
@@ -1630,7 +1630,7 @@ class bitso(Exchange, ImplicitAPI):
1630
1630
  result[code]['info'][code] = withdrawFee
1631
1631
  return result
1632
1632
 
1633
- async def withdraw(self, code: str, amount: float, address: str, tag=None, params={}) -> Transaction:
1633
+ async 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
@@ -2148,7 +2148,7 @@ class bitstamp(Exchange, ImplicitAPI):
2148
2148
  'tag': tag,
2149
2149
  }
2150
2150
 
2151
- async def withdraw(self, code: str, amount: float, address: str, tag=None, params={}) -> Transaction:
2151
+ async def withdraw(self, code: str, amount: float, address: str, tag: Str = None, params={}) -> Transaction:
2152
2152
  """
2153
2153
  make a withdrawal
2154
2154
 
@@ -1824,7 +1824,7 @@ class bittrade(Exchange, ImplicitAPI):
1824
1824
  }
1825
1825
  return self.safe_string(statuses, status, status)
1826
1826
 
1827
- async def withdraw(self, code: str, amount: float, address: str, tag=None, params={}) -> Transaction:
1827
+ async 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
@@ -1788,7 +1788,7 @@ class bitvavo(Exchange, ImplicitAPI):
1788
1788
  request['paymentId'] = tag
1789
1789
  return self.extend(request, params)
1790
1790
 
1791
- async def withdraw(self, code: str, amount: float, address: str, tag=None, params={}) -> Transaction:
1791
+ async 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
@@ -976,7 +976,7 @@ class blockchaincom(Exchange, ImplicitAPI):
976
976
  'fee': fee,
977
977
  }
978
978
 
979
- async def withdraw(self, code: str, amount: float, address: str, tag=None, params={}) -> Transaction:
979
+ async def withdraw(self, code: str, amount: float, address: str, tag: Str = None, params={}) -> Transaction:
980
980
  """
981
981
  make a withdrawal
982
982
 
@@ -2159,7 +2159,7 @@ class blofin(Exchange, ImplicitAPI):
2159
2159
  'shortLeverage': leverageValue,
2160
2160
  }
2161
2161
 
2162
- async def set_leverage(self, leverage: Int, symbol: Str = None, params={}):
2162
+ async def set_leverage(self, leverage: int, symbol: Str = None, params={}):
2163
2163
  """
2164
2164
  set the level of leverage for a market
2165
2165
 
@@ -1280,7 +1280,7 @@ class btcmarkets(Exchange, ImplicitAPI):
1280
1280
  #
1281
1281
  return self.parse_trades(response, market, since, limit)
1282
1282
 
1283
- async def withdraw(self, code: str, amount: float, address: str, tag=None, params={}) -> Transaction:
1283
+ async def withdraw(self, code: str, amount: float, address: str, tag: Str = None, params={}) -> Transaction:
1284
1284
  """
1285
1285
  make a withdrawal
1286
1286
 
@@ -5842,7 +5842,7 @@ classic accounts only/ spot not supported* fetches information on an order made
5842
5842
  }
5843
5843
  return self.safe_string(types, type, type)
5844
5844
 
5845
- async def withdraw(self, code: str, amount: float, address: str, tag=None, params={}) -> Transaction:
5845
+ async def withdraw(self, code: str, amount: float, address: str, tag: Str = None, params={}) -> Transaction:
5846
5846
  """
5847
5847
  make a withdrawal
5848
5848
 
@@ -5857,7 +5857,11 @@ classic accounts only/ spot not supported* fetches information on an order made
5857
5857
  """
5858
5858
  tag, params = self.handle_withdraw_tag_and_params(tag, params)
5859
5859
  accountType = None
5860
+ accounts = await self.is_unified_enabled()
5861
+ isUta = accounts[1]
5860
5862
  accountType, params = self.handle_option_and_params(params, 'withdraw', 'accountType', 'SPOT')
5863
+ if isUta:
5864
+ accountType = 'UTA'
5861
5865
  await self.load_markets()
5862
5866
  self.check_address(address)
5863
5867
  currency = self.currency(code)
@@ -6402,7 +6406,7 @@ classic accounts only/ spot not supported* fetches information on an order made
6402
6406
  response = await self.privatePostV5PositionSwitchIsolated(self.extend(request, params))
6403
6407
  return response
6404
6408
 
6405
- async def set_leverage(self, leverage: Int, symbol: Str = None, params={}):
6409
+ async def set_leverage(self, leverage: int, symbol: Str = None, params={}):
6406
6410
  """
6407
6411
  set the level of leverage for a market
6408
6412
 
@@ -7935,7 +7939,7 @@ classic accounts only/ spot not supported* fetches information on an order made
7935
7939
  if market['spot']:
7936
7940
  raise NotSupported(self.id + ' fetchLeverageTiers() is not supported for spot market')
7937
7941
  symbol = market['symbol']
7938
- data = await self.get_leverage_tiers_paginated(symbol, self.extend({'paginate': True, 'paginationCalls': 40}, params))
7942
+ data = await self.get_leverage_tiers_paginated(symbol, self.extend({'paginate': True, 'paginationCalls': 50}, params))
7939
7943
  symbols = self.market_symbols(symbols)
7940
7944
  return self.parse_leverage_tiers(data, symbols, 'symbol')
7941
7945
 
@@ -3901,7 +3901,7 @@ class coinbase(Exchange, ImplicitAPI):
3901
3901
  tickers = self.safe_list(response, 'pricebooks', [])
3902
3902
  return self.parse_tickers(tickers, symbols)
3903
3903
 
3904
- async def withdraw(self, code: str, amount: float, address: str, tag=None, params={}) -> Transaction:
3904
+ async def withdraw(self, code: str, amount: float, address: str, tag: Str = None, params={}) -> Transaction:
3905
3905
  """
3906
3906
  make a withdrawal
3907
3907
 
@@ -1566,7 +1566,7 @@ class coinbaseexchange(Exchange, ImplicitAPI):
1566
1566
  async def fetch_payment_methods(self, params={}):
1567
1567
  return await self.privateGetPaymentMethods(params)
1568
1568
 
1569
- async def withdraw(self, code: str, amount: float, address: str, tag=None, params={}) -> Transaction:
1569
+ async 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
- async def withdraw(self, code: str, amount: float, address: str, tag=None, params={}) -> Transaction:
2130
+ async def withdraw(self, code: str, amount: float, address: str, tag: Str = None, params={}) -> Transaction:
2131
2131
  """
2132
2132
  make a withdrawal
2133
2133
 
@@ -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
- async def withdraw(self, code: str, amount: float, address: str, tag=None, params={}) -> Transaction:
2088
+ async 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
- async def set_leverage(self, leverage: Int, symbol: Str = None, params={}):
4450
+ async def set_leverage(self, leverage: int, symbol: Str = None, params={}):
4451
4451
  """
4452
4452
  set the level of leverage for a market
4453
4453
 
@@ -87,7 +87,7 @@ class coinex(Exchange, ImplicitAPI):
87
87
  'fetchDepositAddressesByNetwork': False,
88
88
  'fetchDeposits': True,
89
89
  'fetchDepositWithdrawFee': True,
90
- 'fetchDepositWithdrawFees': False,
90
+ 'fetchDepositWithdrawFees': True,
91
91
  'fetchFundingHistory': True,
92
92
  'fetchFundingInterval': True,
93
93
  'fetchFundingIntervals': False,
@@ -740,6 +740,7 @@ class coinex(Exchange, ImplicitAPI):
740
740
  for j in range(0, len(chains)):
741
741
  chain = chains[j]
742
742
  networkId = self.safe_string(chain, 'chain')
743
+ networkCode = self.network_id_to_code(networkId, code)
743
744
  if networkId is None:
744
745
  continue
745
746
  precisionString = self.parse_precision(self.safe_string(chain, 'withdrawal_precision'))
@@ -750,7 +751,7 @@ class coinex(Exchange, ImplicitAPI):
750
751
  canWithdrawChain = self.safe_bool(chain, 'withdraw_enabled')
751
752
  network: dict = {
752
753
  'id': networkId,
753
- 'network': networkId,
754
+ 'network': networkCode,
754
755
  'name': None,
755
756
  'active': canDepositChain and canWithdrawChain,
756
757
  'deposit': canDepositChain,
@@ -773,7 +774,7 @@ class coinex(Exchange, ImplicitAPI):
773
774
  },
774
775
  'info': chain,
775
776
  }
776
- networks[networkId] = network
777
+ networks[networkCode] = network
777
778
  result[code] = self.safe_currency_structure({
778
779
  'id': currencyId,
779
780
  'code': code,
@@ -4125,7 +4126,7 @@ class coinex(Exchange, ImplicitAPI):
4125
4126
  # }
4126
4127
  #
4127
4128
 
4128
- async def set_leverage(self, leverage: Int, symbol: Str = None, params={}):
4129
+ async def set_leverage(self, leverage: int, symbol: Str = None, params={}):
4129
4130
  """
4130
4131
 
4131
4132
  https://docs.coinex.com/api/v2/futures/position/http/adjust-position-leverage
@@ -4601,7 +4602,7 @@ class coinex(Exchange, ImplicitAPI):
4601
4602
  data = self.safe_list(response, 'data', [])
4602
4603
  return self.parse_funding_rates(data, symbols)
4603
4604
 
4604
- async def withdraw(self, code: str, amount: float, address: str, tag=None, params={}) -> Transaction:
4605
+ async def withdraw(self, code: str, amount: float, address: str, tag: Str = None, params={}) -> Transaction:
4605
4606
  """
4606
4607
  make a withdrawal
4607
4608
 
@@ -4610,7 +4611,7 @@ class coinex(Exchange, ImplicitAPI):
4610
4611
  :param str code: unified currency code
4611
4612
  :param float amount: the amount to withdraw
4612
4613
  :param str address: the address to withdraw to
4613
- :param str tag:
4614
+ :param str [tag]: memo
4614
4615
  :param dict [params]: extra parameters specific to the exchange API endpoint
4615
4616
  :param str [params.network]: unified network code
4616
4617
  :returns dict: a `transaction structure <https://docs.ccxt.com/#/?id=transaction-structure>`
@@ -5393,6 +5394,66 @@ class coinex(Exchange, ImplicitAPI):
5393
5394
  data = self.safe_dict(response, 'data', {})
5394
5395
  return self.parse_deposit_withdraw_fee(data, currency)
5395
5396
 
5397
+ async def fetch_deposit_withdraw_fees(self, codes: Strings = None, params={}):
5398
+ """
5399
+ fetch the fees for deposits and withdrawals
5400
+
5401
+ https://docs.coinex.com/api/v2/assets/deposit-withdrawal/http/list-all-deposit-withdrawal-config
5402
+
5403
+ @param codes
5404
+ :param dict [params]: extra parameters specific to the exchange API endpoint
5405
+ :returns dict: a dictionary of `fee structures <https://docs.ccxt.com/#/?id=fee-structure>`
5406
+ """
5407
+ await self.load_markets()
5408
+ response = await self.v2PublicGetAssetsAllDepositWithdrawConfig(params)
5409
+ #
5410
+ # {
5411
+ # "code": 0,
5412
+ # "data": [
5413
+ # {
5414
+ # "asset": {
5415
+ # "ccy": "CET",
5416
+ # "deposit_enabled": True,
5417
+ # "withdraw_enabled": True,
5418
+ # "inter_transfer_enabled": True,
5419
+ # "is_st": False
5420
+ # },
5421
+ # "chains": [
5422
+ # {
5423
+ # "chain": "CSC",
5424
+ # "min_deposit_amount": "0.8",
5425
+ # "min_withdraw_amount": "8",
5426
+ # "deposit_enabled": True,
5427
+ # "withdraw_enabled": True,
5428
+ # "deposit_delay_minutes": 0,
5429
+ # "safe_confirmations": 10,
5430
+ # "irreversible_confirmations": 20,
5431
+ # "deflation_rate": "0",
5432
+ # "withdrawal_fee": "0.026",
5433
+ # "withdrawal_precision": 8,
5434
+ # "memo": "",
5435
+ # "is_memo_required_for_deposit": False,
5436
+ # "explorer_asset_url": ""
5437
+ # },
5438
+ # ]
5439
+ # }
5440
+ # ],
5441
+ # "message": "OK"
5442
+ # }
5443
+ #
5444
+ data = self.safe_list(response, 'data', [])
5445
+ result: dict = {}
5446
+ for i in range(0, len(data)):
5447
+ item = data[i]
5448
+ asset = self.safe_dict(item, 'asset', {})
5449
+ currencyId = self.safe_string(asset, 'ccy')
5450
+ if currencyId is None:
5451
+ continue
5452
+ code = self.safe_currency_code(currencyId)
5453
+ if codes is None or self.in_array(code, codes):
5454
+ result[code] = self.parse_deposit_withdraw_fee(item)
5455
+ return result
5456
+
5396
5457
  def parse_deposit_withdraw_fee(self, fee, currency: Currency = None):
5397
5458
  #
5398
5459
  # {
@@ -700,7 +700,7 @@ class coinmate(Exchange, ImplicitAPI):
700
700
  },
701
701
  }
702
702
 
703
- async def withdraw(self, code: str, amount: float, address: str, tag=None, params={}) -> Transaction:
703
+ async def withdraw(self, code: str, amount: float, address: str, tag: Str = None, params={}) -> Transaction:
704
704
  """
705
705
  make a withdrawal
706
706
 
@@ -1768,7 +1768,7 @@ class coinsph(Exchange, ImplicitAPI):
1768
1768
  'tierBased': None,
1769
1769
  }
1770
1770
 
1771
- async def withdraw(self, code: str, amount: float, address: str, tag=None, params={}) -> Transaction:
1771
+ async 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
 
@@ -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 = await 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
- async def withdraw(self, code: str, amount: float, address: str, tag=None, params={}) -> Transaction:
1872
+ async def withdraw(self, code: str, amount: float, address: str, tag: Str = None, params={}) -> Transaction:
1873
1873
  """
1874
1874
  make a withdrawal
1875
1875
 
@@ -1894,7 +1894,7 @@ class defx(Exchange, ImplicitAPI):
1894
1894
  }
1895
1895
  return self.safe_string(ledgerType, type, type)
1896
1896
 
1897
- async def withdraw(self, code: str, amount: float, address: str, tag=None, params={}):
1897
+ async def withdraw(self, code: str, amount: float, address: str, tag: Str = None, params={}) -> Transaction:
1898
1898
  """
1899
1899
  make a withdrawal
1900
1900
 
@@ -1955,7 +1955,7 @@ class defx(Exchange, ImplicitAPI):
1955
1955
  'fee': None,
1956
1956
  }
1957
1957
 
1958
- async def set_leverage(self, leverage: Int, symbol: Str = None, params={}):
1958
+ async def set_leverage(self, leverage: int, symbol: Str = None, params={}):
1959
1959
  """
1960
1960
  set the level of leverage for a market
1961
1961
 
@@ -2938,7 +2938,7 @@ class delta(Exchange, ImplicitAPI):
2938
2938
  'shortLeverage': leverageValue,
2939
2939
  }
2940
2940
 
2941
- async def set_leverage(self, leverage: Int, symbol: Str = None, params={}):
2941
+ async def set_leverage(self, leverage: int, symbol: Str = None, params={}):
2942
2942
  """
2943
2943
  set the level of leverage for a market
2944
2944
 
@@ -2936,7 +2936,7 @@ class deribit(Exchange, ImplicitAPI):
2936
2936
  }
2937
2937
  return self.safe_string(statuses, status, status)
2938
2938
 
2939
- async def withdraw(self, code: str, amount: float, address: str, tag=None, params={}) -> Transaction:
2939
+ async def withdraw(self, code: str, amount: float, address: str, tag: Str = None, params={}) -> Transaction:
2940
2940
  """
2941
2941
  make a withdrawal
2942
2942
 
@@ -2913,7 +2913,7 @@ class digifinex(Exchange, ImplicitAPI):
2913
2913
  response = await self.privateSpotPostTransfer(self.extend(request, params))
2914
2914
  return self.parse_transfer(response, currency)
2915
2915
 
2916
- async def withdraw(self, code: str, amount: float, address: str, tag=None, params={}) -> Transaction:
2916
+ async def withdraw(self, code: str, amount: float, address: str, tag: Str = None, params={}) -> Transaction:
2917
2917
  """
2918
2918
  make a withdrawal
2919
2919
  :param str code: unified currency code
@@ -3586,7 +3586,7 @@ class digifinex(Exchange, ImplicitAPI):
3586
3586
  'takeProfitPrice': None,
3587
3587
  })
3588
3588
 
3589
- async def set_leverage(self, leverage: Int, symbol: Str = None, params={}):
3589
+ async def set_leverage(self, leverage: int, symbol: Str = None, params={}):
3590
3590
  """
3591
3591
  set the level of leverage for a market
3592
3592
 
@@ -1810,7 +1810,7 @@ class ellipx(Exchange, ImplicitAPI):
1810
1810
  'tierBased': True, # fees can vary based on volume tiers
1811
1811
  }
1812
1812
 
1813
- async def withdraw(self, code: str, amount: float, address: str, tag=None, params={}) -> Transaction:
1813
+ async def withdraw(self, code: str, amount: float, address: str, tag: Str = None, params={}) -> Transaction:
1814
1814
  """
1815
1815
  Make a withdrawal request
1816
1816
 
@@ -2186,7 +2186,7 @@ class exmo(Exchange, ImplicitAPI):
2186
2186
  return self.markets[symbols[0]]
2187
2187
  return None
2188
2188
 
2189
- async def withdraw(self, code: str, amount: float, address: str, tag=None, params={}) -> Transaction:
2189
+ async def withdraw(self, code: str, amount: float, address: str, tag: Str = None, params={}) -> Transaction:
2190
2190
  """
2191
2191
  make a withdrawal
2192
2192
 
@@ -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
- async def withdraw(self, code: str, amount: float, address: str, tag=None, params={}):
1463
+ async 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
 
@@ -685,8 +685,7 @@ class gate(Exchange, ImplicitAPI):
685
685
  'BSC': 'BSC',
686
686
  'BEP20': 'BSC',
687
687
  'SOL': 'SOL',
688
- 'POLYGON': 'POL',
689
- 'MATIC': 'POL',
688
+ 'MATIC': 'MATIC',
690
689
  'OPTIMISM': 'OPETH',
691
690
  'ADA': 'ADA', # CARDANO
692
691
  'AVAXC': 'AVAX_C',
@@ -3792,7 +3791,7 @@ class gate(Exchange, ImplicitAPI):
3792
3791
  response = await self.privateWalletGetWithdrawals(self.extend(request, params))
3793
3792
  return self.parse_transactions(response, currency)
3794
3793
 
3795
- async def withdraw(self, code: str, amount: float, address: str, tag=None, params={}) -> Transaction:
3794
+ async def withdraw(self, code: str, amount: float, address: str, tag: Str = None, params={}) -> Transaction:
3796
3795
  """
3797
3796
  make a withdrawal
3798
3797
 
@@ -5460,7 +5459,7 @@ class gate(Exchange, ImplicitAPI):
5460
5459
  'info': transfer,
5461
5460
  }
5462
5461
 
5463
- async def set_leverage(self, leverage: Int, symbol: Str = None, params={}):
5462
+ async def set_leverage(self, leverage: int, symbol: Str = None, params={}):
5464
5463
  """
5465
5464
  set the level of leverage for a market
5466
5465
 
@@ -7213,12 +7212,27 @@ class gate(Exchange, ImplicitAPI):
7213
7212
  quoteValueString = self.safe_string(liquidation, 'pnl')
7214
7213
  if quoteValueString is None:
7215
7214
  quoteValueString = Precise.string_mul(baseValueString, priceString)
7215
+ # --- derive side ---
7216
+ # 1) options payload has explicit 'side': 'long' | 'short'
7217
+ optPos = self.safe_string_lower(liquidation, 'side')
7218
+ side: Str = None
7219
+ if optPos == 'long':
7220
+ side = 'buy'
7221
+ elif optPos == 'short':
7222
+ side = 'sell'
7223
+ else:
7224
+ if size is not None: # 2) futures/perpetual(and fallback for options): infer from size
7225
+ if Precise.string_gt(size, '0'):
7226
+ side = 'buy'
7227
+ elif Precise.string_lt(size, '0'):
7228
+ side = 'sell'
7216
7229
  return self.safe_liquidation({
7217
7230
  'info': liquidation,
7218
7231
  'symbol': self.safe_symbol(marketId, market),
7219
7232
  'contracts': self.parse_number(contractsString),
7220
7233
  'contractSize': self.parse_number(contractSizeString),
7221
7234
  'price': self.parse_number(priceString),
7235
+ 'side': side,
7222
7236
  'baseValue': self.parse_number(baseValueString),
7223
7237
  'quoteValue': self.parse_number(Precise.string_abs(quoteValueString)),
7224
7238
  'timestamp': timestamp,
@@ -1616,7 +1616,7 @@ class gemini(Exchange, ImplicitAPI):
1616
1616
  response = await self.privatePostV1Mytrades(self.extend(request, params))
1617
1617
  return self.parse_trades(response, market, since, limit)
1618
1618
 
1619
- async def withdraw(self, code: str, amount: float, address: str, tag=None, params={}) -> Transaction:
1619
+ async def withdraw(self, code: str, amount: float, address: str, tag: Str = None, params={}) -> Transaction:
1620
1620
  """
1621
1621
  make a withdrawal
1622
1622
 
@@ -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
- async def withdraw(self, code: str, amount: float, address: str, tag=None, params={}) -> Transaction:
2002
+ async 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
- async def set_leverage(self, leverage: Int, symbol: Str = None, params={}):
3880
+ async def set_leverage(self, leverage: int, symbol: Str = None, params={}):
3881
3881
  """
3882
3882
  set the level of leverage for a market
3883
3883