ccxt 4.4.30__py2.py3-none-any.whl → 4.4.31__py2.py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (267) hide show
  1. ccxt/__init__.py +1 -1
  2. ccxt/ace.py +36 -12
  3. ccxt/alpaca.py +62 -22
  4. ccxt/ascendex.py +65 -30
  5. ccxt/async_support/__init__.py +1 -1
  6. ccxt/async_support/ace.py +36 -12
  7. ccxt/async_support/alpaca.py +62 -22
  8. ccxt/async_support/ascendex.py +65 -30
  9. ccxt/async_support/base/exchange.py +3 -3
  10. ccxt/async_support/bigone.py +71 -27
  11. ccxt/async_support/binance.py +555 -323
  12. ccxt/async_support/bingx.py +208 -108
  13. ccxt/async_support/bit2c.py +34 -12
  14. ccxt/async_support/bitbank.py +42 -14
  15. ccxt/async_support/bitbns.py +17 -9
  16. ccxt/async_support/bitfinex.py +68 -24
  17. ccxt/async_support/bitfinex2.py +116 -44
  18. ccxt/async_support/bitflyer.py +54 -18
  19. ccxt/async_support/bitget.py +277 -145
  20. ccxt/async_support/bithumb.py +39 -14
  21. ccxt/async_support/bitmart.py +145 -79
  22. ccxt/async_support/bitmex.py +90 -30
  23. ccxt/async_support/bitopro.py +66 -22
  24. ccxt/async_support/bitrue.py +109 -57
  25. ccxt/async_support/bitso.py +55 -19
  26. ccxt/async_support/bitstamp.py +84 -36
  27. ccxt/async_support/bitteam.py +51 -17
  28. ccxt/async_support/bitvavo.py +57 -19
  29. ccxt/async_support/bl3p.py +26 -10
  30. ccxt/async_support/blockchaincom.py +63 -21
  31. ccxt/async_support/blofin.py +95 -38
  32. ccxt/async_support/btcalpha.py +48 -16
  33. ccxt/async_support/btcbox.py +27 -9
  34. ccxt/async_support/btcmarkets.py +57 -19
  35. ccxt/async_support/btcturk.py +36 -12
  36. ccxt/async_support/bybit.py +251 -95
  37. ccxt/async_support/cex.py +65 -22
  38. ccxt/async_support/coinbase.py +138 -56
  39. ccxt/async_support/coinbaseexchange.py +76 -28
  40. ccxt/async_support/coinbaseinternational.py +75 -27
  41. ccxt/async_support/coincatch.py +191 -97
  42. ccxt/async_support/coincheck.py +33 -11
  43. ccxt/async_support/coinex.py +212 -101
  44. ccxt/async_support/coinlist.py +87 -30
  45. ccxt/async_support/coinmate.py +55 -24
  46. ccxt/async_support/coinmetro.py +52 -18
  47. ccxt/async_support/coinone.py +27 -10
  48. ccxt/async_support/coinsph.py +73 -27
  49. ccxt/async_support/coinspot.py +25 -9
  50. ccxt/async_support/cryptocom.py +103 -38
  51. ccxt/async_support/currencycom.py +70 -23
  52. ccxt/async_support/delta.py +90 -30
  53. ccxt/async_support/deribit.py +131 -50
  54. ccxt/async_support/digifinex.py +114 -51
  55. ccxt/async_support/exmo.py +104 -45
  56. ccxt/async_support/gate.py +298 -155
  57. ccxt/async_support/gemini.py +57 -20
  58. ccxt/async_support/hashkey.py +151 -66
  59. ccxt/async_support/hitbtc.py +156 -73
  60. ccxt/async_support/hollaex.py +76 -25
  61. ccxt/async_support/htx.py +297 -240
  62. ccxt/async_support/huobijp.py +1 -0
  63. ccxt/async_support/hyperliquid.py +94 -38
  64. ccxt/async_support/idex.py +73 -24
  65. ccxt/async_support/independentreserve.py +12 -5
  66. ccxt/async_support/indodax.py +53 -16
  67. ccxt/async_support/kraken.py +107 -35
  68. ccxt/async_support/krakenfutures.py +88 -34
  69. ccxt/async_support/kucoin.py +211 -109
  70. ccxt/async_support/kucoinfutures.py +119 -42
  71. ccxt/async_support/kuna.py +80 -39
  72. ccxt/async_support/latoken.py +70 -33
  73. ccxt/async_support/lbank.py +89 -38
  74. ccxt/async_support/luno.py +54 -19
  75. ccxt/async_support/lykke.py +54 -19
  76. ccxt/async_support/mercado.py +1 -0
  77. ccxt/async_support/mexc.py +226 -108
  78. ccxt/async_support/ndax.py +58 -19
  79. ccxt/async_support/novadax.py +67 -22
  80. ccxt/async_support/oceanex.py +58 -19
  81. ccxt/async_support/okcoin.py +81 -38
  82. ccxt/async_support/okx.py +270 -109
  83. ccxt/async_support/onetrading.py +3 -1
  84. ccxt/async_support/oxfun.py +95 -36
  85. ccxt/async_support/p2b.py +49 -23
  86. ccxt/async_support/paradex.py +75 -27
  87. ccxt/async_support/paymium.py +31 -11
  88. ccxt/async_support/phemex.py +91 -41
  89. ccxt/async_support/poloniex.py +80 -30
  90. ccxt/async_support/poloniexfutures.py +72 -30
  91. ccxt/async_support/probit.py +64 -22
  92. ccxt/async_support/timex.py +58 -19
  93. ccxt/async_support/tokocrypto.py +63 -22
  94. ccxt/async_support/tradeogre.py +7 -2
  95. ccxt/async_support/upbit.py +72 -25
  96. ccxt/async_support/vertex.py +74 -28
  97. ccxt/async_support/wavesexchange.py +29 -8
  98. ccxt/async_support/wazirx.py +51 -17
  99. ccxt/async_support/whitebit.py +105 -41
  100. ccxt/async_support/woo.py +162 -65
  101. ccxt/async_support/woofipro.py +118 -49
  102. ccxt/async_support/xt.py +150 -73
  103. ccxt/async_support/yobit.py +49 -16
  104. ccxt/async_support/zaif.py +30 -10
  105. ccxt/async_support/zonda.py +46 -16
  106. ccxt/base/exchange.py +34 -34
  107. ccxt/base/types.py +1 -0
  108. ccxt/bigone.py +71 -27
  109. ccxt/binance.py +555 -323
  110. ccxt/bingx.py +208 -108
  111. ccxt/bit2c.py +34 -12
  112. ccxt/bitbank.py +42 -14
  113. ccxt/bitbns.py +17 -9
  114. ccxt/bitfinex.py +68 -24
  115. ccxt/bitfinex2.py +116 -44
  116. ccxt/bitflyer.py +54 -18
  117. ccxt/bitget.py +277 -145
  118. ccxt/bithumb.py +39 -14
  119. ccxt/bitmart.py +145 -79
  120. ccxt/bitmex.py +90 -30
  121. ccxt/bitopro.py +66 -22
  122. ccxt/bitrue.py +109 -57
  123. ccxt/bitso.py +55 -19
  124. ccxt/bitstamp.py +84 -36
  125. ccxt/bitteam.py +51 -17
  126. ccxt/bitvavo.py +57 -19
  127. ccxt/bl3p.py +26 -10
  128. ccxt/blockchaincom.py +63 -21
  129. ccxt/blofin.py +95 -38
  130. ccxt/btcalpha.py +48 -16
  131. ccxt/btcbox.py +27 -9
  132. ccxt/btcmarkets.py +57 -19
  133. ccxt/btcturk.py +36 -12
  134. ccxt/bybit.py +251 -95
  135. ccxt/cex.py +65 -22
  136. ccxt/coinbase.py +138 -56
  137. ccxt/coinbaseexchange.py +76 -28
  138. ccxt/coinbaseinternational.py +75 -27
  139. ccxt/coincatch.py +191 -97
  140. ccxt/coincheck.py +33 -11
  141. ccxt/coinex.py +212 -101
  142. ccxt/coinlist.py +87 -30
  143. ccxt/coinmate.py +55 -24
  144. ccxt/coinmetro.py +52 -18
  145. ccxt/coinone.py +27 -10
  146. ccxt/coinsph.py +73 -27
  147. ccxt/coinspot.py +25 -9
  148. ccxt/cryptocom.py +103 -38
  149. ccxt/currencycom.py +70 -23
  150. ccxt/delta.py +90 -30
  151. ccxt/deribit.py +131 -50
  152. ccxt/digifinex.py +114 -51
  153. ccxt/exmo.py +104 -45
  154. ccxt/gate.py +298 -155
  155. ccxt/gemini.py +57 -20
  156. ccxt/hashkey.py +151 -66
  157. ccxt/hitbtc.py +156 -73
  158. ccxt/hollaex.py +76 -25
  159. ccxt/htx.py +297 -240
  160. ccxt/huobijp.py +1 -0
  161. ccxt/hyperliquid.py +94 -38
  162. ccxt/idex.py +73 -24
  163. ccxt/independentreserve.py +12 -5
  164. ccxt/indodax.py +53 -16
  165. ccxt/kraken.py +107 -35
  166. ccxt/krakenfutures.py +88 -34
  167. ccxt/kucoin.py +211 -109
  168. ccxt/kucoinfutures.py +119 -42
  169. ccxt/kuna.py +80 -39
  170. ccxt/latoken.py +70 -33
  171. ccxt/lbank.py +89 -38
  172. ccxt/luno.py +54 -19
  173. ccxt/lykke.py +54 -19
  174. ccxt/mercado.py +1 -0
  175. ccxt/mexc.py +226 -108
  176. ccxt/ndax.py +58 -19
  177. ccxt/novadax.py +67 -22
  178. ccxt/oceanex.py +58 -19
  179. ccxt/okcoin.py +81 -38
  180. ccxt/okx.py +270 -109
  181. ccxt/onetrading.py +3 -1
  182. ccxt/oxfun.py +95 -36
  183. ccxt/p2b.py +49 -23
  184. ccxt/paradex.py +75 -27
  185. ccxt/paymium.py +31 -11
  186. ccxt/phemex.py +91 -41
  187. ccxt/poloniex.py +80 -30
  188. ccxt/poloniexfutures.py +72 -30
  189. ccxt/pro/__init__.py +1 -1
  190. ccxt/pro/alpaca.py +15 -5
  191. ccxt/pro/ascendex.py +18 -6
  192. ccxt/pro/binance.py +200 -119
  193. ccxt/pro/bingx.py +44 -24
  194. ccxt/pro/bitfinex.py +13 -5
  195. ccxt/pro/bitget.py +75 -36
  196. ccxt/pro/bithumb.py +12 -4
  197. ccxt/pro/bitmart.py +44 -20
  198. ccxt/pro/bitmex.py +42 -14
  199. ccxt/pro/bitopro.py +15 -5
  200. ccxt/pro/bitrue.py +7 -3
  201. ccxt/pro/bitvavo.py +51 -17
  202. ccxt/pro/blockchaincom.py +18 -6
  203. ccxt/pro/blofin.py +36 -12
  204. ccxt/pro/bybit.py +100 -42
  205. ccxt/pro/cex.py +48 -16
  206. ccxt/pro/coinbase.py +32 -12
  207. ccxt/pro/coinbaseexchange.py +1 -1
  208. ccxt/pro/coinbaseinternational.py +34 -14
  209. ccxt/pro/coincatch.py +54 -19
  210. ccxt/pro/coincheck.py +6 -2
  211. ccxt/pro/coinex.py +40 -20
  212. ccxt/pro/coinone.py +9 -3
  213. ccxt/pro/cryptocom.py +70 -26
  214. ccxt/pro/deribit.py +36 -12
  215. ccxt/pro/exmo.py +10 -4
  216. ccxt/pro/gate.py +64 -30
  217. ccxt/pro/gemini.py +21 -7
  218. ccxt/pro/hashkey.py +26 -8
  219. ccxt/pro/hitbtc.py +61 -37
  220. ccxt/pro/hollaex.py +15 -5
  221. ccxt/pro/htx.py +39 -21
  222. ccxt/pro/hyperliquid.py +41 -14
  223. ccxt/pro/kraken.py +49 -17
  224. ccxt/pro/krakenfutures.py +47 -24
  225. ccxt/pro/kucoin.py +60 -31
  226. ccxt/pro/kucoinfutures.py +41 -19
  227. ccxt/pro/lbank.py +27 -9
  228. ccxt/pro/luno.py +3 -1
  229. ccxt/pro/mexc.py +35 -17
  230. ccxt/pro/ndax.py +12 -4
  231. ccxt/pro/okcoin.py +18 -6
  232. ccxt/pro/okx.py +76 -28
  233. ccxt/pro/onetrading.py +21 -7
  234. ccxt/pro/oxfun.py +54 -20
  235. ccxt/pro/p2b.py +23 -11
  236. ccxt/pro/paradex.py +12 -4
  237. ccxt/pro/phemex.py +31 -19
  238. ccxt/pro/poloniex.py +50 -22
  239. ccxt/pro/poloniexfutures.py +17 -7
  240. ccxt/pro/probit.py +18 -6
  241. ccxt/pro/upbit.py +25 -9
  242. ccxt/pro/vertex.py +20 -6
  243. ccxt/pro/wazirx.py +21 -7
  244. ccxt/pro/whitebit.py +25 -9
  245. ccxt/pro/woo.py +32 -12
  246. ccxt/pro/woofipro.py +35 -13
  247. ccxt/pro/xt.py +46 -26
  248. ccxt/probit.py +64 -22
  249. ccxt/timex.py +58 -19
  250. ccxt/tokocrypto.py +63 -22
  251. ccxt/tradeogre.py +7 -2
  252. ccxt/upbit.py +72 -25
  253. ccxt/vertex.py +74 -28
  254. ccxt/wavesexchange.py +29 -8
  255. ccxt/wazirx.py +51 -17
  256. ccxt/whitebit.py +105 -41
  257. ccxt/woo.py +162 -65
  258. ccxt/woofipro.py +118 -49
  259. ccxt/xt.py +150 -73
  260. ccxt/yobit.py +49 -16
  261. ccxt/zaif.py +30 -10
  262. ccxt/zonda.py +46 -16
  263. {ccxt-4.4.30.dist-info → ccxt-4.4.31.dist-info}/METADATA +5 -5
  264. {ccxt-4.4.30.dist-info → ccxt-4.4.31.dist-info}/RECORD +267 -267
  265. {ccxt-4.4.30.dist-info → ccxt-4.4.31.dist-info}/LICENSE.txt +0 -0
  266. {ccxt-4.4.30.dist-info → ccxt-4.4.31.dist-info}/WHEEL +0 -0
  267. {ccxt-4.4.30.dist-info → ccxt-4.4.31.dist-info}/top_level.txt +0 -0
ccxt/htx.py CHANGED
@@ -106,7 +106,7 @@ class htx(Exchange, ImplicitAPI):
106
106
  'fetchLeverageTiers': True,
107
107
  'fetchLiquidations': True,
108
108
  'fetchMarginAdjustmentHistory': False,
109
- 'fetchMarketLeverageTiers': True,
109
+ 'fetchMarketLeverageTiers': 'emulated',
110
110
  'fetchMarkets': True,
111
111
  'fetchMarkOHLCV': True,
112
112
  'fetchMyLiquidations': False,
@@ -1255,11 +1255,13 @@ class htx(Exchange, ImplicitAPI):
1255
1255
  def fetch_status(self, params={}):
1256
1256
  """
1257
1257
  the latest known information on the availability of the exchange API
1258
- :see: https://huobiapi.github.io/docs/spot/v1/en/#get-system-status
1259
- :see: https://huobiapi.github.io/docs/dm/v1/en/#get-system-status
1260
- :see: https://huobiapi.github.io/docs/coin_margined_swap/v1/en/#get-system-status
1261
- :see: https://huobiapi.github.io/docs/usdt_swap/v1/en/#get-system-status
1262
- :see: https://huobiapi.github.io/docs/usdt_swap/v1/en/#query-whether-the-system-is-available # contractPublicGetHeartbeat
1258
+
1259
+ https://huobiapi.github.io/docs/spot/v1/en/#get-system-status
1260
+ https://huobiapi.github.io/docs/dm/v1/en/#get-system-status
1261
+ https://huobiapi.github.io/docs/coin_margined_swap/v1/en/#get-system-status
1262
+ https://huobiapi.github.io/docs/usdt_swap/v1/en/#get-system-status
1263
+ https://huobiapi.github.io/docs/usdt_swap/v1/en/#query-whether-the-system-is-available # contractPublicGetHeartbeat
1264
+
1263
1265
  :param dict [params]: extra parameters specific to the exchange API endpoint
1264
1266
  :returns dict: a `status structure <https://docs.ccxt.com/#/?id=exchange-status-structure>`
1265
1267
  """
@@ -1474,8 +1476,10 @@ class htx(Exchange, ImplicitAPI):
1474
1476
  def fetch_time(self, params={}):
1475
1477
  """
1476
1478
  fetches the current integer timestamp in milliseconds from the exchange server
1477
- :see: https://huobiapi.github.io/docs/spot/v1/en/#get-current-timestamp
1478
- :see: https://huobiapi.github.io/docs/coin_margined_swap/v1/en/#get-current-system-timestamp
1479
+
1480
+ https://huobiapi.github.io/docs/spot/v1/en/#get-current-timestamp
1481
+ https://huobiapi.github.io/docs/coin_margined_swap/v1/en/#get-current-system-timestamp
1482
+
1479
1483
  :param dict [params]: extra parameters specific to the exchange API endpoint
1480
1484
  :returns int: the current integer timestamp in milliseconds from the exchange server
1481
1485
  """
@@ -1522,7 +1526,9 @@ class htx(Exchange, ImplicitAPI):
1522
1526
  def fetch_trading_fee(self, symbol: str, params={}) -> TradingFeeInterface:
1523
1527
  """
1524
1528
  fetch the trading fees for a market
1525
- :see: https://huobiapi.github.io/docs/spot/v1/en/#get-current-fee-rate-applied-to-the-user
1529
+
1530
+ https://huobiapi.github.io/docs/spot/v1/en/#get-current-fee-rate-applied-to-the-user
1531
+
1526
1532
  :param str symbol: unified market symbol
1527
1533
  :param dict [params]: extra parameters specific to the exchange API endpoint
1528
1534
  :returns dict: a `fee structure <https://docs.ccxt.com/#/?id=fee-structure>`
@@ -1567,8 +1573,10 @@ class htx(Exchange, ImplicitAPI):
1567
1573
 
1568
1574
  def fetch_trading_limits_by_id(self, id: str, params={}):
1569
1575
  """
1570
- * @ignore
1571
- :see: https://huobiapi.github.io/docs/spot/v1/en/#get-current-fee-rate-applied-to-the-user
1576
+ @ignore
1577
+
1578
+ https://huobiapi.github.io/docs/spot/v1/en/#get-current-fee-rate-applied-to-the-user
1579
+
1572
1580
  :param str id: market id
1573
1581
  :param dict [params]: extra parameters specific to the exchange API endpoint
1574
1582
  :returns dict: the limits object of a market structure
@@ -1627,10 +1635,12 @@ class htx(Exchange, ImplicitAPI):
1627
1635
  def fetch_markets(self, params={}) -> List[Market]:
1628
1636
  """
1629
1637
  retrieves data on all markets for huobi
1630
- :see: https://huobiapi.github.io/docs/spot/v1/en/#get-all-supported-trading-symbol-v1-deprecated
1631
- :see: https://huobiapi.github.io/docs/dm/v1/en/#get-contract-info
1632
- :see: https://huobiapi.github.io/docs/coin_margined_swap/v1/en/#query-swap-info
1633
- :see: https://huobiapi.github.io/docs/usdt_swap/v1/en/#general-query-swap-info
1638
+
1639
+ https://huobiapi.github.io/docs/spot/v1/en/#get-all-supported-trading-symbol-v1-deprecated
1640
+ https://huobiapi.github.io/docs/dm/v1/en/#get-contract-info
1641
+ https://huobiapi.github.io/docs/coin_margined_swap/v1/en/#query-swap-info
1642
+ https://huobiapi.github.io/docs/usdt_swap/v1/en/#general-query-swap-info
1643
+
1634
1644
  :param dict [params]: extra parameters specific to the exchange API endpoint
1635
1645
  :returns dict[]: an array of objects representing market data
1636
1646
  """
@@ -1656,12 +1666,14 @@ class htx(Exchange, ImplicitAPI):
1656
1666
 
1657
1667
  def fetch_markets_by_type_and_sub_type(self, type: Str, subType: Str, params={}):
1658
1668
  """
1659
- * @ignore
1669
+ @ignore
1660
1670
  retrieves data on all markets of a certain type and/or subtype
1661
- :see: https://huobiapi.github.io/docs/spot/v1/en/#get-all-supported-trading-symbol-v1-deprecated
1662
- :see: https://huobiapi.github.io/docs/dm/v1/en/#get-contract-info
1663
- :see: https://huobiapi.github.io/docs/coin_margined_swap/v1/en/#query-swap-info
1664
- :see: https://huobiapi.github.io/docs/usdt_swap/v1/en/#general-query-swap-info
1671
+
1672
+ https://huobiapi.github.io/docs/spot/v1/en/#get-all-supported-trading-symbol-v1-deprecated
1673
+ https://huobiapi.github.io/docs/dm/v1/en/#get-contract-info
1674
+ https://huobiapi.github.io/docs/coin_margined_swap/v1/en/#query-swap-info
1675
+ https://huobiapi.github.io/docs/usdt_swap/v1/en/#general-query-swap-info
1676
+
1665
1677
  :param str [type]: 'spot', 'swap' or 'future'
1666
1678
  :param str [subType]: 'linear' or 'inverse'
1667
1679
  :param dict [params]: extra parameters specific to the exchange API endpoint
@@ -2068,10 +2080,12 @@ class htx(Exchange, ImplicitAPI):
2068
2080
  def fetch_ticker(self, symbol: str, params={}) -> Ticker:
2069
2081
  """
2070
2082
  fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
2071
- :see: https://huobiapi.github.io/docs/spot/v1/en/#get-latest-aggregated-ticker
2072
- :see: https://huobiapi.github.io/docs/dm/v1/en/#get-market-data-overview
2073
- :see: https://huobiapi.github.io/docs/coin_margined_swap/v1/en/#get-market-data-overview
2074
- :see: https://huobiapi.github.io/docs/usdt_swap/v1/en/#general-get-market-data-overview
2083
+
2084
+ https://huobiapi.github.io/docs/spot/v1/en/#get-latest-aggregated-ticker
2085
+ https://huobiapi.github.io/docs/dm/v1/en/#get-market-data-overview
2086
+ https://huobiapi.github.io/docs/coin_margined_swap/v1/en/#get-market-data-overview
2087
+ https://huobiapi.github.io/docs/usdt_swap/v1/en/#general-get-market-data-overview
2088
+
2075
2089
  :param str symbol: unified symbol of the market to fetch the ticker for
2076
2090
  :param dict [params]: extra parameters specific to the exchange API endpoint
2077
2091
  :returns dict: a `ticker structure <https://docs.ccxt.com/#/?id=ticker-structure>`
@@ -2146,10 +2160,12 @@ class htx(Exchange, ImplicitAPI):
2146
2160
  def fetch_tickers(self, symbols: Strings = None, params={}) -> Tickers:
2147
2161
  """
2148
2162
  fetches price tickers for multiple markets, statistical information calculated over the past 24 hours for each market
2149
- :see: https://huobiapi.github.io/docs/spot/v1/en/#get-latest-tickers-for-all-pairs
2150
- :see: https://huobiapi.github.io/docs/usdt_swap/v1/en/#general-get-a-batch-of-market-data-overview
2151
- :see: https://huobiapi.github.io/docs/dm/v1/en/#get-a-batch-of-market-data-overview
2152
- :see: https://huobiapi.github.io/docs/coin_margined_swap/v1/en/#get-a-batch-of-market-data-overview-v2
2163
+
2164
+ https://huobiapi.github.io/docs/spot/v1/en/#get-latest-tickers-for-all-pairs
2165
+ https://huobiapi.github.io/docs/usdt_swap/v1/en/#general-get-a-batch-of-market-data-overview
2166
+ https://huobiapi.github.io/docs/dm/v1/en/#get-a-batch-of-market-data-overview
2167
+ https://huobiapi.github.io/docs/coin_margined_swap/v1/en/#get-a-batch-of-market-data-overview-v2
2168
+
2153
2169
  :param str[] [symbols]: unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned
2154
2170
  :param dict [params]: extra parameters specific to the exchange API endpoint
2155
2171
  :returns dict: a dictionary of `ticker structures <https://docs.ccxt.com/#/?id=ticker-structure>`
@@ -2250,9 +2266,11 @@ class htx(Exchange, ImplicitAPI):
2250
2266
  def fetch_last_prices(self, symbols: Strings = None, params={}):
2251
2267
  """
2252
2268
  fetches the last price for multiple markets
2253
- :see: https://www.htx.com/en-us/opend/newApiPages/?id=8cb81024-77b5-11ed-9966-0242ac110003 linear swap & linear future
2254
- :see: https://www.htx.com/en-us/opend/newApiPages/?id=28c2e8fc-77ae-11ed-9966-0242ac110003 inverse future
2255
- :see: https://www.htx.com/en-us/opend/newApiPages/?id=5d517ef5-77b6-11ed-9966-0242ac110003 inverse swap
2269
+
2270
+ https://www.htx.com/en-us/opend/newApiPages/?id=8cb81024-77b5-11ed-9966-0242ac110003 linear swap & linear future
2271
+ https://www.htx.com/en-us/opend/newApiPages/?id=28c2e8fc-77ae-11ed-9966-0242ac110003 inverse future
2272
+ https://www.htx.com/en-us/opend/newApiPages/?id=5d517ef5-77b6-11ed-9966-0242ac110003 inverse swap
2273
+
2256
2274
  :param str[] [symbols]: unified symbols of the markets to fetch the last prices
2257
2275
  :param dict [params]: extra parameters specific to the exchange API endpoint
2258
2276
  :returns dict: a dictionary of lastprices structures
@@ -2365,10 +2383,12 @@ class htx(Exchange, ImplicitAPI):
2365
2383
  def fetch_order_book(self, symbol: str, limit: Int = None, params={}) -> OrderBook:
2366
2384
  """
2367
2385
  fetches information on open orders with bid(buy) and ask(sell) prices, volumes and other data
2368
- :see: https://huobiapi.github.io/docs/spot/v1/en/#get-market-depth
2369
- :see: https://huobiapi.github.io/docs/dm/v1/en/#get-market-depth
2370
- :see: https://huobiapi.github.io/docs/coin_margined_swap/v1/en/#get-market-depth
2371
- :see: https://huobiapi.github.io/docs/usdt_swap/v1/en/#general-get-market-depth
2386
+
2387
+ https://huobiapi.github.io/docs/spot/v1/en/#get-market-depth
2388
+ https://huobiapi.github.io/docs/dm/v1/en/#get-market-depth
2389
+ https://huobiapi.github.io/docs/coin_margined_swap/v1/en/#get-market-depth
2390
+ https://huobiapi.github.io/docs/usdt_swap/v1/en/#general-get-market-depth
2391
+
2372
2392
  :param str symbol: unified symbol of the market to fetch the order book for
2373
2393
  :param int [limit]: the maximum amount of order book entries to return
2374
2394
  :param dict [params]: extra parameters specific to the exchange API endpoint
@@ -2580,7 +2600,9 @@ class htx(Exchange, ImplicitAPI):
2580
2600
  def fetch_order_trades(self, id: str, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
2581
2601
  """
2582
2602
  fetch all the trades made from a single order
2583
- :see: https://huobiapi.github.io/docs/spot/v1/en/#get-the-match-result-of-an-order
2603
+
2604
+ https://huobiapi.github.io/docs/spot/v1/en/#get-the-match-result-of-an-order
2605
+
2584
2606
  :param str id: order id
2585
2607
  :param str symbol: unified market symbol
2586
2608
  :param int [since]: the earliest time in ms to fetch trades for
@@ -2599,9 +2621,11 @@ class htx(Exchange, ImplicitAPI):
2599
2621
 
2600
2622
  def fetch_spot_order_trades(self, id: str, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
2601
2623
  """
2602
- * @ignore
2624
+ @ignore
2603
2625
  fetch all the trades made from a single order
2604
- :see: https://huobiapi.github.io/docs/spot/v1/en/#get-the-match-result-of-an-order
2626
+
2627
+ https://huobiapi.github.io/docs/spot/v1/en/#get-the-match-result-of-an-order
2628
+
2605
2629
  :param str id: order id
2606
2630
  :param str symbol: unified market symbol
2607
2631
  :param int [since]: the earliest time in ms to fetch trades for
@@ -2618,9 +2642,11 @@ class htx(Exchange, ImplicitAPI):
2618
2642
 
2619
2643
  def fetch_my_trades(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
2620
2644
  """
2621
- :see: https://huobiapi.github.io/docs/usdt_swap/v1/en/#isolated-get-history-match-results-via-multiple-fields-new
2622
- :see: https://huobiapi.github.io/docs/usdt_swap/v1/en/#cross-get-history-match-results-via-multiple-fields-new
2623
- :see: https://huobiapi.github.io/docs/spot/v1/en/#search-match-results
2645
+
2646
+ https://huobiapi.github.io/docs/usdt_swap/v1/en/#isolated-get-history-match-results-via-multiple-fields-new
2647
+ https://huobiapi.github.io/docs/usdt_swap/v1/en/#cross-get-history-match-results-via-multiple-fields-new
2648
+ https://huobiapi.github.io/docs/spot/v1/en/#search-match-results
2649
+
2624
2650
  fetch all trades made by the user
2625
2651
  :param str symbol: unified market symbol
2626
2652
  :param int [since]: the earliest time in ms to fetch trades for
@@ -2771,10 +2797,12 @@ class htx(Exchange, ImplicitAPI):
2771
2797
 
2772
2798
  def fetch_trades(self, symbol: str, since: Int = None, limit: Int = 1000, params={}) -> List[Trade]:
2773
2799
  """
2774
- :see: https://huobiapi.github.io/docs/spot/v1/en/#get-the-most-recent-trades
2775
- :see: https://huobiapi.github.io/docs/dm/v1/en/#query-a-batch-of-trade-records-of-a-contract
2776
- :see: https://huobiapi.github.io/docs/coin_margined_swap/v1/en/#query-a-batch-of-trade-records-of-a-contract
2777
- :see: https://huobiapi.github.io/docs/usdt_swap/v1/en/#general-query-a-batch-of-trade-records-of-a-contract
2800
+
2801
+ https://huobiapi.github.io/docs/spot/v1/en/#get-the-most-recent-trades
2802
+ https://huobiapi.github.io/docs/dm/v1/en/#query-a-batch-of-trade-records-of-a-contract
2803
+ https://huobiapi.github.io/docs/coin_margined_swap/v1/en/#query-a-batch-of-trade-records-of-a-contract
2804
+ https://huobiapi.github.io/docs/usdt_swap/v1/en/#general-query-a-batch-of-trade-records-of-a-contract
2805
+
2778
2806
  get the list of most recent trades for a particular symbol
2779
2807
  :param str symbol: unified symbol of the market to fetch trades for
2780
2808
  :param int [since]: timestamp in ms of the earliest trade to fetch
@@ -2866,10 +2894,12 @@ class htx(Exchange, ImplicitAPI):
2866
2894
  def fetch_ohlcv(self, symbol: str, timeframe='1m', since: Int = None, limit: Int = None, params={}) -> List[list]:
2867
2895
  """
2868
2896
  fetches historical candlestick data containing the open, high, low, and close price, and the volume of a market
2869
- :see: https://huobiapi.github.io/docs/spot/v1/en/#get-klines-candles
2870
- :see: https://huobiapi.github.io/docs/dm/v1/en/#get-kline-data
2871
- :see: https://huobiapi.github.io/docs/coin_margined_swap/v1/en/#get-kline-data
2872
- :see: https://huobiapi.github.io/docs/usdt_swap/v1/en/#general-get-kline-data
2897
+
2898
+ https://huobiapi.github.io/docs/spot/v1/en/#get-klines-candles
2899
+ https://huobiapi.github.io/docs/dm/v1/en/#get-kline-data
2900
+ https://huobiapi.github.io/docs/coin_margined_swap/v1/en/#get-kline-data
2901
+ https://huobiapi.github.io/docs/usdt_swap/v1/en/#general-get-kline-data
2902
+
2873
2903
  :param str symbol: unified symbol of the market to fetch OHLCV data for
2874
2904
  :param str timeframe: the length of time each candle represents
2875
2905
  :param int [since]: timestamp in ms of the earliest candle to fetch
@@ -2993,7 +3023,9 @@ class htx(Exchange, ImplicitAPI):
2993
3023
  def fetch_accounts(self, params={}) -> List[Account]:
2994
3024
  """
2995
3025
  fetch all the accounts associated with a profile
2996
- :see: https://huobiapi.github.io/docs/spot/v1/en/#get-all-accounts-of-the-current-user
3026
+
3027
+ https://huobiapi.github.io/docs/spot/v1/en/#get-all-accounts-of-the-current-user
3028
+
2997
3029
  :param dict [params]: extra parameters specific to the exchange API endpoint
2998
3030
  :returns dict: a dictionary of `account structures <https://docs.ccxt.com/#/?id=account-structure>` indexed by the account type
2999
3031
  """
@@ -3033,9 +3065,12 @@ class htx(Exchange, ImplicitAPI):
3033
3065
  def fetch_account_id_by_type(self, type: str, marginMode: Str = None, symbol: Str = None, params={}):
3034
3066
  """
3035
3067
  fetch all the accounts by a type and marginModeassociated with a profile
3036
- :see: https://huobiapi.github.io/docs/spot/v1/en/#get-all-accounts-of-the-current-user
3068
+
3069
+ https://huobiapi.github.io/docs/spot/v1/en/#get-all-accounts-of-the-current-user
3070
+
3037
3071
  :param str type: 'spot', 'swap' or 'future
3038
3072
  :param str [marginMode]: 'cross' or 'isolated'
3073
+ @param symbol
3039
3074
  :param dict [params]: extra parameters specific to the exchange API endpoint
3040
3075
  :returns dict: a dictionary of `account structures <https://docs.ccxt.com/#/?id=account-structure>` indexed by the account type
3041
3076
  """
@@ -3065,7 +3100,9 @@ class htx(Exchange, ImplicitAPI):
3065
3100
  def fetch_currencies(self, params={}) -> Currencies:
3066
3101
  """
3067
3102
  fetches all available currencies on an exchange
3068
- :see: https://huobiapi.github.io/docs/spot/v1/en/#apiv2-currency-amp-chains
3103
+
3104
+ https://huobiapi.github.io/docs/spot/v1/en/#apiv2-currency-amp-chains
3105
+
3069
3106
  :param dict [params]: extra parameters specific to the exchange API endpoint
3070
3107
  :returns dict: an associative dictionary of currencies
3071
3108
  """
@@ -3220,13 +3257,15 @@ class htx(Exchange, ImplicitAPI):
3220
3257
 
3221
3258
  def fetch_balance(self, params={}) -> Balances:
3222
3259
  """
3223
- :see: https://huobiapi.github.io/docs/spot/v1/en/#get-account-balance-of-a-specific-account
3224
- :see: https://www.htx.com/en-us/opend/newApiPages/?id=7ec4b429-7773-11ed-9966-0242ac110003
3225
- :see: https://www.htx.com/en-us/opend/newApiPages/?id=10000074-77b7-11ed-9966-0242ac110003
3226
- :see: https://huobiapi.github.io/docs/dm/v1/en/#query-asset-valuation
3227
- :see: https://huobiapi.github.io/docs/coin_margined_swap/v1/en/#query-user-s-account-information
3228
- :see: https://huobiapi.github.io/docs/usdt_swap/v1/en/#isolated-query-user-s-account-information
3229
- :see: https://huobiapi.github.io/docs/usdt_swap/v1/en/#cross-query-user-39-s-account-information
3260
+
3261
+ https://huobiapi.github.io/docs/spot/v1/en/#get-account-balance-of-a-specific-account
3262
+ https://www.htx.com/en-us/opend/newApiPages/?id=7ec4b429-7773-11ed-9966-0242ac110003
3263
+ https://www.htx.com/en-us/opend/newApiPages/?id=10000074-77b7-11ed-9966-0242ac110003
3264
+ https://huobiapi.github.io/docs/dm/v1/en/#query-asset-valuation
3265
+ https://huobiapi.github.io/docs/coin_margined_swap/v1/en/#query-user-s-account-information
3266
+ https://huobiapi.github.io/docs/usdt_swap/v1/en/#isolated-query-user-s-account-information
3267
+ https://huobiapi.github.io/docs/usdt_swap/v1/en/#cross-query-user-39-s-account-information
3268
+
3230
3269
  query for balance and get the amount of funds available for trading or funds locked in orders
3231
3270
  :param dict [params]: extra parameters specific to the exchange API endpoint
3232
3271
  :param bool [params.unified]: provide self parameter if you have a recent account with unified cross+isolated margin account
@@ -3525,12 +3564,15 @@ class htx(Exchange, ImplicitAPI):
3525
3564
  def fetch_order(self, id: str, symbol: Str = None, params={}):
3526
3565
  """
3527
3566
  fetches information on an order made by the user
3528
- :see: https://huobiapi.github.io/docs/spot/v1/en/#get-the-order-detail-of-an-order-based-on-client-order-id
3529
- :see: https://huobiapi.github.io/docs/spot/v1/en/#get-the-order-detail-of-an-order
3530
- :see: https://huobiapi.github.io/docs/usdt_swap/v1/en/#isolated-get-information-of-an-order
3531
- :see: https://huobiapi.github.io/docs/usdt_swap/v1/en/#cross-get-information-of-order
3532
- :see: https://huobiapi.github.io/docs/dm/v1/en/#get-information-of-an-order
3533
- :see: https://huobiapi.github.io/docs/coin_margined_swap/v1/en/#get-information-of-an-order
3567
+
3568
+ https://huobiapi.github.io/docs/spot/v1/en/#get-the-order-detail-of-an-order-based-on-client-order-id
3569
+ https://huobiapi.github.io/docs/spot/v1/en/#get-the-order-detail-of-an-order
3570
+ https://huobiapi.github.io/docs/usdt_swap/v1/en/#isolated-get-information-of-an-order
3571
+ https://huobiapi.github.io/docs/usdt_swap/v1/en/#cross-get-information-of-order
3572
+ https://huobiapi.github.io/docs/dm/v1/en/#get-information-of-an-order
3573
+ https://huobiapi.github.io/docs/coin_margined_swap/v1/en/#get-information-of-an-order
3574
+
3575
+ :param str id: order id
3534
3576
  :param str symbol: unified symbol of the market the order was made in
3535
3577
  :param dict [params]: extra parameters specific to the exchange API endpoint
3536
3578
  :returns dict: An `order structure <https://docs.ccxt.com/#/?id=order-structure>`
@@ -4035,12 +4077,14 @@ class htx(Exchange, ImplicitAPI):
4035
4077
 
4036
4078
  def fetch_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
4037
4079
  """
4038
- :see: https://huobiapi.github.io/docs/spot/v1/en/#search-past-orders
4039
- :see: https://huobiapi.github.io/docs/spot/v1/en/#search-historical-orders-within-48-hours
4040
- :see: https://huobiapi.github.io/docs/usdt_swap/v1/en/#isolated-get-history-orders-new
4041
- :see: https://huobiapi.github.io/docs/usdt_swap/v1/en/#cross-get-history-orders-new
4042
- :see: https://huobiapi.github.io/docs/coin_margined_swap/v1/en/#get-history-orders-new
4043
- :see: https://huobiapi.github.io/docs/coin_margined_swap/v1/en/#query-history-orders-via-multiple-fields-new
4080
+
4081
+ https://huobiapi.github.io/docs/spot/v1/en/#search-past-orders
4082
+ https://huobiapi.github.io/docs/spot/v1/en/#search-historical-orders-within-48-hours
4083
+ https://huobiapi.github.io/docs/usdt_swap/v1/en/#isolated-get-history-orders-new
4084
+ https://huobiapi.github.io/docs/usdt_swap/v1/en/#cross-get-history-orders-new
4085
+ https://huobiapi.github.io/docs/coin_margined_swap/v1/en/#get-history-orders-new
4086
+ https://huobiapi.github.io/docs/coin_margined_swap/v1/en/#query-history-orders-via-multiple-fields-new
4087
+
4044
4088
  fetches information on multiple orders made by the user
4045
4089
  :param str symbol: unified market symbol of the market orders were made in
4046
4090
  :param int [since]: the earliest time in ms to fetch orders for
@@ -4068,12 +4112,14 @@ class htx(Exchange, ImplicitAPI):
4068
4112
 
4069
4113
  def fetch_closed_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
4070
4114
  """
4071
- :see: https://huobiapi.github.io/docs/spot/v1/en/#search-past-orders
4072
- :see: https://huobiapi.github.io/docs/spot/v1/en/#search-historical-orders-within-48-hours
4073
- :see: https://huobiapi.github.io/docs/usdt_swap/v1/en/#isolated-get-history-orders-new
4074
- :see: https://huobiapi.github.io/docs/usdt_swap/v1/en/#cross-get-history-orders-new
4075
- :see: https://huobiapi.github.io/docs/coin_margined_swap/v1/en/#get-history-orders-new
4076
- :see: https://huobiapi.github.io/docs/coin_margined_swap/v1/en/#query-history-orders-via-multiple-fields-new
4115
+
4116
+ https://huobiapi.github.io/docs/spot/v1/en/#search-past-orders
4117
+ https://huobiapi.github.io/docs/spot/v1/en/#search-historical-orders-within-48-hours
4118
+ https://huobiapi.github.io/docs/usdt_swap/v1/en/#isolated-get-history-orders-new
4119
+ https://huobiapi.github.io/docs/usdt_swap/v1/en/#cross-get-history-orders-new
4120
+ https://huobiapi.github.io/docs/coin_margined_swap/v1/en/#get-history-orders-new
4121
+ https://huobiapi.github.io/docs/coin_margined_swap/v1/en/#query-history-orders-via-multiple-fields-new
4122
+
4077
4123
  fetches information on multiple closed orders made by the user
4078
4124
  :param str symbol: unified market symbol of the market orders were made in
4079
4125
  :param int [since]: the earliest time in ms to fetch orders for
@@ -4100,9 +4146,11 @@ class htx(Exchange, ImplicitAPI):
4100
4146
 
4101
4147
  def fetch_open_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
4102
4148
  """
4103
- :see: https://huobiapi.github.io/docs/spot/v1/en/#get-all-open-orders
4104
- :see: https://huobiapi.github.io/docs/usdt_swap/v1/en/#isolated-current-unfilled-order-acquisition
4105
- :see: https://huobiapi.github.io/docs/usdt_swap/v1/en/#cross-current-unfilled-order-acquisition
4149
+
4150
+ https://huobiapi.github.io/docs/spot/v1/en/#get-all-open-orders
4151
+ https://huobiapi.github.io/docs/usdt_swap/v1/en/#isolated-current-unfilled-order-acquisition
4152
+ https://huobiapi.github.io/docs/usdt_swap/v1/en/#cross-current-unfilled-order-acquisition
4153
+
4106
4154
  fetch all unfilled currently open orders
4107
4155
  :param str symbol: unified market symbol
4108
4156
  :param int [since]: the earliest time in ms to fetch open orders for
@@ -4835,7 +4883,9 @@ class htx(Exchange, ImplicitAPI):
4835
4883
  def create_market_buy_order_with_cost(self, symbol: str, cost: float, params={}):
4836
4884
  """
4837
4885
  create a market buy order by providing the symbol and cost
4838
- :see: https://www.htx.com/en-us/opend/newApiPages/?id=7ec4ee16-7773-11ed-9966-0242ac110003
4886
+
4887
+ https://www.htx.com/en-us/opend/newApiPages/?id=7ec4ee16-7773-11ed-9966-0242ac110003
4888
+
4839
4889
  :param str symbol: unified symbol of the market to create an order in
4840
4890
  :param float cost: how much you want to trade in units of the quote currency
4841
4891
  :param dict [params]: extra parameters specific to the exchange API endpoint
@@ -4871,7 +4921,7 @@ class htx(Exchange, ImplicitAPI):
4871
4921
 
4872
4922
  def create_spot_order_request(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: Num = None, params={}):
4873
4923
  """
4874
- * @ignore
4924
+ @ignore
4875
4925
  helper function to build request
4876
4926
  :param str symbol: unified symbol of the market to create an order in
4877
4927
  :param str type: 'market' or 'limit'
@@ -4975,7 +5025,7 @@ class htx(Exchange, ImplicitAPI):
4975
5025
 
4976
5026
  def create_contract_order_request(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: Num = None, params={}):
4977
5027
  """
4978
- * @ignore
5028
+ @ignore
4979
5029
  helper function to build request
4980
5030
  :param str symbol: unified symbol of the market to create an order in
4981
5031
  :param str type: 'market' or 'limit'
@@ -5057,15 +5107,17 @@ class htx(Exchange, ImplicitAPI):
5057
5107
  def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: Num = None, params={}):
5058
5108
  """
5059
5109
  create a trade order
5060
- :see: https://huobiapi.github.io/docs/spot/v1/en/#place-a-new-order # spot, margin
5061
- :see: https://huobiapi.github.io/docs/coin_margined_swap/v1/en/#place-an-order # coin-m swap
5062
- :see: https://huobiapi.github.io/docs/coin_margined_swap/v1/en/#place-trigger-order # coin-m swap trigger
5063
- :see: https://huobiapi.github.io/docs/usdt_swap/v1/en/#cross-place-an-order # usdt-m swap cross
5064
- :see: https://huobiapi.github.io/docs/usdt_swap/v1/en/#cross-place-trigger-order # usdt-m swap cross trigger
5065
- :see: https://huobiapi.github.io/docs/usdt_swap/v1/en/#isolated-place-an-order # usdt-m swap isolated
5066
- :see: https://huobiapi.github.io/docs/usdt_swap/v1/en/#isolated-place-trigger-order # usdt-m swap isolated trigger
5067
- :see: https://huobiapi.github.io/docs/dm/v1/en/#place-an-order # coin-m futures
5068
- :see: https://huobiapi.github.io/docs/dm/v1/en/#place-trigger-order # coin-m futures contract trigger
5110
+
5111
+ https://huobiapi.github.io/docs/spot/v1/en/#place-a-new-order # spot, margin
5112
+ https://huobiapi.github.io/docs/coin_margined_swap/v1/en/#place-an-order # coin-m swap
5113
+ https://huobiapi.github.io/docs/coin_margined_swap/v1/en/#place-trigger-order # coin-m swap trigger
5114
+ https://huobiapi.github.io/docs/usdt_swap/v1/en/#cross-place-an-order # usdt-m swap cross
5115
+ https://huobiapi.github.io/docs/usdt_swap/v1/en/#cross-place-trigger-order # usdt-m swap cross trigger
5116
+ https://huobiapi.github.io/docs/usdt_swap/v1/en/#isolated-place-an-order # usdt-m swap isolated
5117
+ https://huobiapi.github.io/docs/usdt_swap/v1/en/#isolated-place-trigger-order # usdt-m swap isolated trigger
5118
+ https://huobiapi.github.io/docs/dm/v1/en/#place-an-order # coin-m futures
5119
+ https://huobiapi.github.io/docs/dm/v1/en/#place-trigger-order # coin-m futures contract trigger
5120
+
5069
5121
  :param str symbol: unified symbol of the market to create an order in
5070
5122
  :param str type: 'market' or 'limit'
5071
5123
  :param str side: 'buy' or 'sell'
@@ -5214,11 +5266,13 @@ class htx(Exchange, ImplicitAPI):
5214
5266
  def create_orders(self, orders: List[OrderRequest], params={}):
5215
5267
  """
5216
5268
  create a list of trade orders
5217
- :see: https://huobiapi.github.io/docs/spot/v1/en/#place-a-batch-of-orders
5218
- :see: https://huobiapi.github.io/docs/dm/v1/en/#place-a-batch-of-orders
5219
- :see: https://huobiapi.github.io/docs/coin_margined_swap/v1/en/#place-a-batch-of-orders
5220
- :see: https://huobiapi.github.io/docs/usdt_swap/v1/en/#isolated-place-a-batch-of-orders
5221
- :see: https://huobiapi.github.io/docs/usdt_swap/v1/en/#cross-place-a-batch-of-orders
5269
+
5270
+ https://huobiapi.github.io/docs/spot/v1/en/#place-a-batch-of-orders
5271
+ https://huobiapi.github.io/docs/dm/v1/en/#place-a-batch-of-orders
5272
+ https://huobiapi.github.io/docs/coin_margined_swap/v1/en/#place-a-batch-of-orders
5273
+ https://huobiapi.github.io/docs/usdt_swap/v1/en/#isolated-place-a-batch-of-orders
5274
+ https://huobiapi.github.io/docs/usdt_swap/v1/en/#cross-place-a-batch-of-orders
5275
+
5222
5276
  :param Array orders: list of orders to create, each object should contain the parameters required by createOrder, namely symbol, type, side, amount, price and params
5223
5277
  :param dict [params]: extra parameters specific to the exchange API endpoint
5224
5278
  :returns dict: an `order structure <https://docs.ccxt.com/#/?id=order-structure>`
@@ -5770,7 +5824,9 @@ class htx(Exchange, ImplicitAPI):
5770
5824
  def cancel_all_orders_after(self, timeout: Int, params={}):
5771
5825
  """
5772
5826
  dead man's switch, cancel all orders after the given timeout
5773
- :see: https://huobiapi.github.io/docs/spot/v1/en/#dead-man-s-switch
5827
+
5828
+ https://huobiapi.github.io/docs/spot/v1/en/#dead-man-s-switch
5829
+
5774
5830
  :param number timeout: time in milliseconds, 0 represents cancel the timer
5775
5831
  :param dict [params]: extra parameters specific to the exchange API endpoint
5776
5832
  :returns dict: the api result
@@ -5820,7 +5876,9 @@ class htx(Exchange, ImplicitAPI):
5820
5876
 
5821
5877
  def fetch_deposit_addresses_by_network(self, code: str, params={}) -> List[DepositAddress]:
5822
5878
  """
5823
- :see: https://www.htx.com/en-us/opend/newApiPages/?id=7ec50029-7773-11ed-9966-0242ac110003
5879
+
5880
+ https://www.htx.com/en-us/opend/newApiPages/?id=7ec50029-7773-11ed-9966-0242ac110003
5881
+
5824
5882
  fetch a dictionary of addresses for a currency, indexed by network
5825
5883
  :param str code: unified currency code of the currency for the deposit address
5826
5884
  :param dict [params]: extra parameters specific to the exchange API endpoint
@@ -5852,7 +5910,9 @@ class htx(Exchange, ImplicitAPI):
5852
5910
  def fetch_deposit_address(self, code: str, params={}) -> DepositAddress:
5853
5911
  """
5854
5912
  fetch the deposit address for a currency associated with self account
5855
- :see: https://www.htx.com/en-us/opend/newApiPages/?id=7ec50029-7773-11ed-9966-0242ac110003
5913
+
5914
+ https://www.htx.com/en-us/opend/newApiPages/?id=7ec50029-7773-11ed-9966-0242ac110003
5915
+
5856
5916
  :param str code: unified currency code
5857
5917
  :param dict [params]: extra parameters specific to the exchange API endpoint
5858
5918
  :returns dict: an `address structure <https://docs.ccxt.com/#/?id=address-structure>`
@@ -5898,7 +5958,9 @@ class htx(Exchange, ImplicitAPI):
5898
5958
 
5899
5959
  def fetch_deposits(self, code: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Transaction]:
5900
5960
  """
5901
- :see: https://www.htx.com/en-us/opend/newApiPages/?id=7ec4f050-7773-11ed-9966-0242ac110003
5961
+
5962
+ https://www.htx.com/en-us/opend/newApiPages/?id=7ec4f050-7773-11ed-9966-0242ac110003
5963
+
5902
5964
  fetch all deposits made to an account
5903
5965
  :param str code: unified currency code
5904
5966
  :param int [since]: the earliest time in ms to fetch deposits for
@@ -5953,7 +6015,9 @@ class htx(Exchange, ImplicitAPI):
5953
6015
  def fetch_withdrawals(self, code: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Transaction]:
5954
6016
  """
5955
6017
  fetch all withdrawals made from an account
5956
- :see: https://huobiapi.github.io/docs/spot/v1/en/#search-for-existed-withdraws-and-deposits
6018
+
6019
+ https://huobiapi.github.io/docs/spot/v1/en/#search-for-existed-withdraws-and-deposits
6020
+
5957
6021
  :param str code: unified currency code
5958
6022
  :param int [since]: the earliest time in ms to fetch withdrawals for
5959
6023
  :param int [limit]: the maximum number of withdrawals structures to retrieve
@@ -6119,7 +6183,9 @@ class htx(Exchange, ImplicitAPI):
6119
6183
 
6120
6184
  def withdraw(self, code: str, amount: float, address: str, tag=None, params={}) -> Transaction:
6121
6185
  """
6122
- :see: https://www.htx.com/en-us/opend/newApiPages/?id=7ec4cc41-7773-11ed-9966-0242ac110003
6186
+
6187
+ https://www.htx.com/en-us/opend/newApiPages/?id=7ec4cc41-7773-11ed-9966-0242ac110003
6188
+
6123
6189
  make a withdrawal
6124
6190
  :param str code: unified currency code
6125
6191
  :param float amount: the amount to withdraw
@@ -6197,13 +6263,15 @@ class htx(Exchange, ImplicitAPI):
6197
6263
  def transfer(self, code: str, amount: float, fromAccount: str, toAccount: str, params={}) -> TransferEntry:
6198
6264
  """
6199
6265
  transfer currency internally between wallets on the same account
6200
- :see: https://huobiapi.github.io/docs/dm/v1/en/#transfer-margin-between-spot-account-and-future-account
6201
- :see: https://huobiapi.github.io/docs/spot/v1/en/#transfer-fund-between-spot-account-and-future-contract-account
6202
- :see: https://huobiapi.github.io/docs/usdt_swap/v1/en/#general-transfer-margin-between-spot-account-and-usdt-margined-contracts-account
6203
- :see: https://huobiapi.github.io/docs/spot/v1/en/#transfer-asset-from-spot-trading-account-to-cross-margin-account-cross
6204
- :see: https://huobiapi.github.io/docs/spot/v1/en/#transfer-asset-from-spot-trading-account-to-isolated-margin-account-isolated
6205
- :see: https://huobiapi.github.io/docs/spot/v1/en/#transfer-asset-from-cross-margin-account-to-spot-trading-account-cross
6206
- :see: https://huobiapi.github.io/docs/spot/v1/en/#transfer-asset-from-isolated-margin-account-to-spot-trading-account-isolated
6266
+
6267
+ https://huobiapi.github.io/docs/dm/v1/en/#transfer-margin-between-spot-account-and-future-account
6268
+ https://huobiapi.github.io/docs/spot/v1/en/#transfer-fund-between-spot-account-and-future-contract-account
6269
+ https://huobiapi.github.io/docs/usdt_swap/v1/en/#general-transfer-margin-between-spot-account-and-usdt-margined-contracts-account
6270
+ https://huobiapi.github.io/docs/spot/v1/en/#transfer-asset-from-spot-trading-account-to-cross-margin-account-cross
6271
+ https://huobiapi.github.io/docs/spot/v1/en/#transfer-asset-from-spot-trading-account-to-isolated-margin-account-isolated
6272
+ https://huobiapi.github.io/docs/spot/v1/en/#transfer-asset-from-cross-margin-account-to-spot-trading-account-cross
6273
+ https://huobiapi.github.io/docs/spot/v1/en/#transfer-asset-from-isolated-margin-account-to-spot-trading-account-isolated
6274
+
6207
6275
  :param str code: unified currency code
6208
6276
  :param float amount: amount to transfer
6209
6277
  :param str fromAccount: account to transfer from 'spot', 'future', 'swap'
@@ -6279,7 +6347,9 @@ class htx(Exchange, ImplicitAPI):
6279
6347
  def fetch_isolated_borrow_rates(self, params={}) -> IsolatedBorrowRates:
6280
6348
  """
6281
6349
  fetch the borrow interest rates of all currencies
6282
- :see: https://huobiapi.github.io/docs/spot/v1/en/#get-loan-interest-rate-and-quota-isolated
6350
+
6351
+ https://huobiapi.github.io/docs/spot/v1/en/#get-loan-interest-rate-and-quota-isolated
6352
+
6283
6353
  :param dict [params]: extra parameters specific to the exchange API endpoint
6284
6354
  :returns dict: a list of `isolated borrow rate structures <https://docs.ccxt.com/#/?id=isolated-borrow-rate-structure>`
6285
6355
  """
@@ -6362,8 +6432,10 @@ class htx(Exchange, ImplicitAPI):
6362
6432
 
6363
6433
  def fetch_funding_rate_history(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
6364
6434
  """
6365
- :see: https://huobiapi.github.io/docs/usdt_swap/v1/en/#general-query-historical-funding-rate
6366
- :see: https://huobiapi.github.io/docs/coin_margined_swap/v1/en/#query-historical-funding-rate
6435
+
6436
+ https://huobiapi.github.io/docs/usdt_swap/v1/en/#general-query-historical-funding-rate
6437
+ https://huobiapi.github.io/docs/coin_margined_swap/v1/en/#query-historical-funding-rate
6438
+
6367
6439
  fetches historical funding rate prices
6368
6440
  :param str symbol: unified symbol of the market to fetch the funding rate history for
6369
6441
  :param int [since]: not used by huobi, but filtered internally by ccxt
@@ -6490,8 +6562,10 @@ class htx(Exchange, ImplicitAPI):
6490
6562
  def fetch_funding_rate(self, symbol: str, params={}) -> FundingRate:
6491
6563
  """
6492
6564
  fetch the current funding rate
6493
- :see: https://huobiapi.github.io/docs/coin_margined_swap/v1/en/#query-funding-rate
6494
- :see: https://huobiapi.github.io/docs/usdt_swap/v1/en/#general-query-funding-rate
6565
+
6566
+ https://huobiapi.github.io/docs/coin_margined_swap/v1/en/#query-funding-rate
6567
+ https://huobiapi.github.io/docs/usdt_swap/v1/en/#general-query-funding-rate
6568
+
6495
6569
  :param str symbol: unified market symbol
6496
6570
  :param dict [params]: extra parameters specific to the exchange API endpoint
6497
6571
  :returns dict: a `funding rate structure <https://docs.ccxt.com/#/?id=funding-rate-structure>`
@@ -6529,8 +6603,10 @@ class htx(Exchange, ImplicitAPI):
6529
6603
  def fetch_funding_rates(self, symbols: Strings = None, params={}) -> FundingRates:
6530
6604
  """
6531
6605
  fetch the funding rate for multiple markets
6532
- :see: https://huobiapi.github.io/docs/usdt_swap/v1/en/#general-query-a-batch-of-funding-rate
6533
- :see: https://huobiapi.github.io/docs/coin_margined_swap/v1/en/#query-a-batch-of-funding-rate
6606
+
6607
+ https://huobiapi.github.io/docs/usdt_swap/v1/en/#general-query-a-batch-of-funding-rate
6608
+ https://huobiapi.github.io/docs/coin_margined_swap/v1/en/#query-a-batch-of-funding-rate
6609
+
6534
6610
  :param str[]|None symbols: list of unified market symbols
6535
6611
  :param dict [params]: extra parameters specific to the exchange API endpoint
6536
6612
  :returns dict[]: a list of `funding rate structures <https://docs.ccxt.com/#/?id=funding-rates-structure>`, indexed by market symbols
@@ -6577,8 +6653,10 @@ class htx(Exchange, ImplicitAPI):
6577
6653
  def fetch_borrow_interest(self, code: Str = None, symbol: Str = None, since: Int = None, limit: Int = None, params={}) -> List[BorrowInterest]:
6578
6654
  """
6579
6655
  fetch the interest owed by the user for borrowing currency for margin trading
6580
- :see: https://huobiapi.github.io/docs/spot/v1/en/#search-past-margin-orders-cross
6581
- :see: https://huobiapi.github.io/docs/spot/v1/en/#search-past-margin-orders-isolated
6656
+
6657
+ https://huobiapi.github.io/docs/spot/v1/en/#search-past-margin-orders-cross
6658
+ https://huobiapi.github.io/docs/spot/v1/en/#search-past-margin-orders-isolated
6659
+
6582
6660
  :param str code: unified currency code
6583
6661
  :param str symbol: unified market symbol when fetch interest in isolated markets
6584
6662
  :param int [since]: the earliest time in ms to fetch borrrow interest for
@@ -6826,9 +6904,11 @@ class htx(Exchange, ImplicitAPI):
6826
6904
  def fetch_funding_history(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
6827
6905
  """
6828
6906
  fetch the history of funding payments paid and received on self account
6829
- :see: https://huobiapi.github.io/docs/usdt_swap/v1/en/#general-query-account-financial-records-via-multiple-fields-new # linear swaps
6830
- :see: https://huobiapi.github.io/docs/dm/v1/en/#query-financial-records-via-multiple-fields-new # coin-m futures
6831
- :see: https://huobiapi.github.io/docs/coin_margined_swap/v1/en/#query-financial-records-via-multiple-fields-new # coin-m swaps
6907
+
6908
+ https://huobiapi.github.io/docs/usdt_swap/v1/en/#general-query-account-financial-records-via-multiple-fields-new # linear swaps
6909
+ https://huobiapi.github.io/docs/dm/v1/en/#query-financial-records-via-multiple-fields-new # coin-m futures
6910
+ https://huobiapi.github.io/docs/coin_margined_swap/v1/en/#query-financial-records-via-multiple-fields-new # coin-m swaps
6911
+
6832
6912
  :param str symbol: unified market symbol
6833
6913
  :param int [since]: the earliest time in ms to fetch funding history for
6834
6914
  :param int [limit]: the maximum number of funding history structures to retrieve
@@ -6908,10 +6988,12 @@ class htx(Exchange, ImplicitAPI):
6908
6988
  def set_leverage(self, leverage: Int, symbol: Str = None, params={}):
6909
6989
  """
6910
6990
  set the level of leverage for a market
6911
- :see: https://huobiapi.github.io/docs/usdt_swap/v1/en/#isolated-switch-leverage
6912
- :see: https://huobiapi.github.io/docs/usdt_swap/v1/en/#cross-switch-leverage
6913
- :see: https://huobiapi.github.io/docs/coin_margined_swap/v1/en/#switch-leverage
6914
- :see: https://huobiapi.github.io/docs/dm/v1/en/#switch-leverage # Coin-m futures
6991
+
6992
+ https://huobiapi.github.io/docs/usdt_swap/v1/en/#isolated-switch-leverage
6993
+ https://huobiapi.github.io/docs/usdt_swap/v1/en/#cross-switch-leverage
6994
+ https://huobiapi.github.io/docs/coin_margined_swap/v1/en/#switch-leverage
6995
+ https://huobiapi.github.io/docs/dm/v1/en/#switch-leverage # Coin-m futures
6996
+
6915
6997
  :param float leverage: the rate of leverage
6916
6998
  :param str symbol: unified market symbol
6917
6999
  :param dict [params]: extra parameters specific to the exchange API endpoint
@@ -7097,10 +7179,12 @@ class htx(Exchange, ImplicitAPI):
7097
7179
  def fetch_positions(self, symbols: Strings = None, params={}):
7098
7180
  """
7099
7181
  fetch all open positions
7100
- :see: https://huobiapi.github.io/docs/usdt_swap/v1/en/#cross-query-user-39-s-position-information
7101
- :see: https://huobiapi.github.io/docs/usdt_swap/v1/en/#isolated-query-user-s-position-information
7102
- :see: https://huobiapi.github.io/docs/coin_margined_swap/v1/en/#query-user-s-position-information
7103
- :see: https://huobiapi.github.io/docs/dm/v1/en/#query-user-s-position-information
7182
+
7183
+ https://huobiapi.github.io/docs/usdt_swap/v1/en/#cross-query-user-39-s-position-information
7184
+ https://huobiapi.github.io/docs/usdt_swap/v1/en/#isolated-query-user-s-position-information
7185
+ https://huobiapi.github.io/docs/coin_margined_swap/v1/en/#query-user-s-position-information
7186
+ https://huobiapi.github.io/docs/dm/v1/en/#query-user-s-position-information
7187
+
7104
7188
  :param str[] [symbols]: list of unified market symbols
7105
7189
  :param dict [params]: extra parameters specific to the exchange API endpoint
7106
7190
  :param str [params.subType]: 'linear' or 'inverse'
@@ -7231,10 +7315,12 @@ class htx(Exchange, ImplicitAPI):
7231
7315
  def fetch_position(self, symbol: str, params={}):
7232
7316
  """
7233
7317
  fetch data on a single open contract trade position
7234
- :see: https://huobiapi.github.io/docs/usdt_swap/v1/en/#cross-query-assets-and-positions
7235
- :see: https://huobiapi.github.io/docs/usdt_swap/v1/en/#isolated-query-assets-and-positions
7236
- :see: https://huobiapi.github.io/docs/coin_margined_swap/v1/en/#query-assets-and-positions
7237
- :see: https://huobiapi.github.io/docs/dm/v1/en/#query-assets-and-positions
7318
+
7319
+ https://huobiapi.github.io/docs/usdt_swap/v1/en/#cross-query-assets-and-positions
7320
+ https://huobiapi.github.io/docs/usdt_swap/v1/en/#isolated-query-assets-and-positions
7321
+ https://huobiapi.github.io/docs/coin_margined_swap/v1/en/#query-assets-and-positions
7322
+ https://huobiapi.github.io/docs/dm/v1/en/#query-assets-and-positions
7323
+
7238
7324
  :param str symbol: unified market symbol of the market the position is held in, default is None
7239
7325
  :param dict [params]: extra parameters specific to the exchange API endpoint
7240
7326
  :returns dict: a `position structure <https://docs.ccxt.com/#/?id=position-structure>`
@@ -7537,7 +7623,9 @@ class htx(Exchange, ImplicitAPI):
7537
7623
  def fetch_ledger(self, code: Str = None, since: Int = None, limit: Int = None, params={}) -> List[LedgerEntry]:
7538
7624
  """
7539
7625
  fetch the history of changes, actions done by the user or operations that altered the balance of the user
7540
- :see: https://huobiapi.github.io/docs/spot/v1/en/#get-account-history
7626
+
7627
+ https://huobiapi.github.io/docs/spot/v1/en/#get-account-history
7628
+
7541
7629
  :param str [code]: unified currency code, default is None
7542
7630
  :param int [since]: timestamp in ms of the earliest ledger entry, default is None
7543
7631
  :param int [limit]: max number of ledger entries to return, default is None
@@ -7645,92 +7733,41 @@ class htx(Exchange, ImplicitAPI):
7645
7733
  # ]
7646
7734
  # }
7647
7735
  #
7648
- data = self.safe_list(response, 'data')
7736
+ data = self.safe_list(response, 'data', [])
7649
7737
  return self.parse_leverage_tiers(data, symbols, 'contract_code')
7650
7738
 
7651
- def fetch_market_leverage_tiers(self, symbol: str, params={}) -> List[LeverageTier]:
7652
- """
7653
- retrieve information on the maximum leverage, and maintenance margin for trades of varying trade sizes for a single market
7654
- :param str symbol: unified market symbol
7655
- :param dict [params]: extra parameters specific to the exchange API endpoint
7656
- :returns dict: a `leverage tiers structure <https://docs.ccxt.com/#/?id=leverage-tiers-structure>`
7657
- """
7658
- self.load_markets()
7659
- request: dict = {}
7660
- if symbol is not None:
7661
- market = self.market(symbol)
7662
- if not market['contract']:
7663
- raise BadRequest(self.id + ' fetchMarketLeverageTiers() symbol supports contract markets only')
7664
- request['contract_code'] = market['id']
7665
- response = self.contractPublicGetLinearSwapApiV1SwapAdjustfactor(self.extend(request, params))
7666
- #
7667
- # {
7668
- # "status": "ok",
7669
- # "data": [
7670
- # {
7671
- # "symbol": "MANA",
7672
- # "contract_code": "MANA-USDT",
7673
- # "margin_mode": "isolated",
7674
- # "trade_partition": "USDT",
7675
- # "list": [
7676
- # {
7677
- # "lever_rate": 75,
7678
- # "ladders": [
7679
- # {
7680
- # "ladder": 0,
7681
- # "min_size": 0,
7682
- # "max_size": 999,
7683
- # "adjust_factor": 0.7
7684
- # },
7685
- # ...
7686
- # ]
7687
- # }
7688
- # ...
7689
- # ]
7690
- # },
7691
- # ...
7692
- # ]
7693
- # }
7694
- #
7695
- data = self.safe_value(response, 'data')
7696
- tiers = self.parse_leverage_tiers(data, [symbol], 'contract_code')
7697
- return self.safe_value(tiers, symbol)
7698
-
7699
- def parse_leverage_tiers(self, response, symbols: Strings = None, marketIdKey=None):
7700
- result: dict = {}
7701
- for i in range(0, len(response)):
7702
- item = response[i]
7703
- list = self.safe_value(item, 'list', [])
7704
- tiers = []
7705
- currency = self.safe_string(item, 'trade_partition')
7706
- id = self.safe_string(item, marketIdKey)
7707
- symbol = self.safe_symbol(id)
7708
- if self.in_array(symbol, symbols):
7709
- for j in range(0, len(list)):
7710
- obj = list[j]
7711
- leverage = self.safe_string(obj, 'lever_rate')
7712
- ladders = self.safe_value(obj, 'ladders', [])
7713
- for k in range(0, len(ladders)):
7714
- bracket = ladders[k]
7715
- adjustFactor = self.safe_string(bracket, 'adjust_factor')
7716
- tiers.append({
7717
- 'tier': self.safe_integer(bracket, 'ladder'),
7718
- 'currency': self.safe_currency_code(currency),
7719
- 'minNotional': self.safe_number(bracket, 'min_size'),
7720
- 'maxNotional': self.safe_number(bracket, 'max_size'),
7721
- 'maintenanceMarginRate': self.parse_number(Precise.string_div(adjustFactor, leverage)),
7722
- 'maxLeverage': self.parse_number(leverage),
7723
- 'info': bracket,
7724
- })
7725
- result[symbol] = tiers
7726
- return result
7739
+ def parse_market_leverage_tiers(self, info, market: Market = None) -> List[LeverageTier]:
7740
+ currencyId = self.safe_string(info, 'trade_partition')
7741
+ marketId = self.safe_string(info, 'contract_code')
7742
+ tiers = []
7743
+ brackets = self.safe_list(info, 'list', [])
7744
+ for i in range(0, len(brackets)):
7745
+ item = brackets[i]
7746
+ leverage = self.safe_string(item, 'lever_rate')
7747
+ ladders = self.safe_list(item, 'ladders', [])
7748
+ for k in range(0, len(ladders)):
7749
+ bracket = ladders[k]
7750
+ adjustFactor = self.safe_string(bracket, 'adjust_factor')
7751
+ tiers.append({
7752
+ 'tier': self.safe_integer(bracket, 'ladder'),
7753
+ 'symbol': self.safe_symbol(marketId, market, None, 'swap'),
7754
+ 'currency': self.safe_currency_code(currencyId),
7755
+ 'minNotional': self.safe_number(bracket, 'min_size'),
7756
+ 'maxNotional': self.safe_number(bracket, 'max_size'),
7757
+ 'maintenanceMarginRate': self.parse_number(Precise.string_div(adjustFactor, leverage)),
7758
+ 'maxLeverage': self.parse_number(leverage),
7759
+ 'info': bracket,
7760
+ })
7761
+ return tiers
7727
7762
 
7728
7763
  def fetch_open_interest_history(self, symbol: str, timeframe='1h', since: Int = None, limit: Int = None, params={}):
7729
7764
  """
7730
7765
  Retrieves the open interest history of a currency
7731
- :see: https://huobiapi.github.io/docs/dm/v1/en/#query-information-on-open-interest
7732
- :see: https://huobiapi.github.io/docs/coin_margined_swap/v1/en/#query-information-on-open-interest
7733
- :see: https://huobiapi.github.io/docs/usdt_swap/v1/en/#general-query-information-on-open-interest
7766
+
7767
+ https://huobiapi.github.io/docs/dm/v1/en/#query-information-on-open-interest
7768
+ https://huobiapi.github.io/docs/coin_margined_swap/v1/en/#query-information-on-open-interest
7769
+ https://huobiapi.github.io/docs/usdt_swap/v1/en/#general-query-information-on-open-interest
7770
+
7734
7771
  :param str symbol: Unified CCXT market symbol
7735
7772
  :param str timeframe: '1h', '4h', '12h', or '1d'
7736
7773
  :param int [since]: Not used by huobi api, but response parsed by CCXT
@@ -7840,9 +7877,11 @@ class htx(Exchange, ImplicitAPI):
7840
7877
  def fetch_open_interest(self, symbol: str, params={}):
7841
7878
  """
7842
7879
  Retrieves the open interest of a currency
7843
- :see: https://huobiapi.github.io/docs/dm/v1/en/#get-contract-open-interest-information
7844
- :see: https://huobiapi.github.io/docs/coin_margined_swap/v1/en/#get-swap-open-interest-information
7845
- :see: https://huobiapi.github.io/docs/usdt_swap/v1/en/#general-get-swap-open-interest-information
7880
+
7881
+ https://huobiapi.github.io/docs/dm/v1/en/#get-contract-open-interest-information
7882
+ https://huobiapi.github.io/docs/coin_margined_swap/v1/en/#get-swap-open-interest-information
7883
+ https://huobiapi.github.io/docs/usdt_swap/v1/en/#general-get-swap-open-interest-information
7884
+
7846
7885
  :param str symbol: Unified CCXT market symbol
7847
7886
  :param dict [params]: exchange specific parameters
7848
7887
  :returns dict} an open interest structure{@link https://docs.ccxt.com/#/?id=open-interest-structure:
@@ -8007,8 +8046,10 @@ class htx(Exchange, ImplicitAPI):
8007
8046
  def borrow_isolated_margin(self, symbol: str, code: str, amount: float, params={}):
8008
8047
  """
8009
8048
  create a loan to borrow margin
8010
- :see: https://huobiapi.github.io/docs/spot/v1/en/#request-a-margin-loan-isolated
8011
- :see: https://huobiapi.github.io/docs/spot/v1/en/#request-a-margin-loan-cross
8049
+
8050
+ https://huobiapi.github.io/docs/spot/v1/en/#request-a-margin-loan-isolated
8051
+ https://huobiapi.github.io/docs/spot/v1/en/#request-a-margin-loan-cross
8052
+
8012
8053
  :param str symbol: unified market symbol, required for isolated margin
8013
8054
  :param str code: unified currency code of the currency to borrow
8014
8055
  :param float amount: the amount to borrow
@@ -8040,8 +8081,10 @@ class htx(Exchange, ImplicitAPI):
8040
8081
  def borrow_cross_margin(self, code: str, amount: float, params={}):
8041
8082
  """
8042
8083
  create a loan to borrow margin
8043
- :see: https://huobiapi.github.io/docs/spot/v1/en/#request-a-margin-loan-isolated
8044
- :see: https://huobiapi.github.io/docs/spot/v1/en/#request-a-margin-loan-cross
8084
+
8085
+ https://huobiapi.github.io/docs/spot/v1/en/#request-a-margin-loan-isolated
8086
+ https://huobiapi.github.io/docs/spot/v1/en/#request-a-margin-loan-cross
8087
+
8045
8088
  :param str code: unified currency code of the currency to borrow
8046
8089
  :param float amount: the amount to borrow
8047
8090
  :param dict [params]: extra parameters specific to the exchange API endpoint
@@ -8070,10 +8113,12 @@ class htx(Exchange, ImplicitAPI):
8070
8113
  def repay_isolated_margin(self, symbol: str, code: str, amount, params={}):
8071
8114
  """
8072
8115
  repay borrowed margin and interest
8073
- :see: https://huobiapi.github.io/docs/spot/v1/en/#repay-margin-loan-cross-isolated
8116
+
8117
+ https://huobiapi.github.io/docs/spot/v1/en/#repay-margin-loan-cross-isolated
8118
+
8119
+ :param str symbol: unified market symbol
8074
8120
  :param str code: unified currency code of the currency to repay
8075
8121
  :param float amount: the amount to repay
8076
- :param str symbol: unified market symbol
8077
8122
  :param dict [params]: extra parameters specific to the exchange API endpoint
8078
8123
  :returns dict: a `margin loan structure <https://docs.ccxt.com/#/?id=margin-loan-structure>`
8079
8124
  """
@@ -8108,7 +8153,9 @@ class htx(Exchange, ImplicitAPI):
8108
8153
  def repay_cross_margin(self, code: str, amount, params={}):
8109
8154
  """
8110
8155
  repay borrowed margin and interest
8111
- :see: https://huobiapi.github.io/docs/spot/v1/en/#repay-margin-loan-cross-isolated
8156
+
8157
+ https://huobiapi.github.io/docs/spot/v1/en/#repay-margin-loan-cross-isolated
8158
+
8112
8159
  :param str code: unified currency code of the currency to repay
8113
8160
  :param float amount: the amount to repay
8114
8161
  :param dict [params]: extra parameters specific to the exchange API endpoint
@@ -8177,9 +8224,11 @@ class htx(Exchange, ImplicitAPI):
8177
8224
  def fetch_settlement_history(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
8178
8225
  """
8179
8226
  Fetches historical settlement records
8180
- :see: https://huobiapi.github.io/docs/dm/v1/en/#query-historical-settlement-records-of-the-platform-interface
8181
- :see: https://huobiapi.github.io/docs/coin_margined_swap/v1/en/#query-historical-settlement-records-of-the-platform-interface
8182
- :see: https://huobiapi.github.io/docs/usdt_swap/v1/en/#general-query-historical-settlement-records-of-the-platform-interface
8227
+
8228
+ https://huobiapi.github.io/docs/dm/v1/en/#query-historical-settlement-records-of-the-platform-interface
8229
+ https://huobiapi.github.io/docs/coin_margined_swap/v1/en/#query-historical-settlement-records-of-the-platform-interface
8230
+ https://huobiapi.github.io/docs/usdt_swap/v1/en/#general-query-historical-settlement-records-of-the-platform-interface
8231
+
8183
8232
  :param str symbol: unified symbol of the market to fetch the settlement history for
8184
8233
  :param int [since]: timestamp in ms, value range = current time - 90 days,default = current time - 90 days
8185
8234
  :param int [limit]: page items, default 20, shall not exceed 50
@@ -8273,7 +8322,9 @@ class htx(Exchange, ImplicitAPI):
8273
8322
  def fetch_deposit_withdraw_fees(self, codes: Strings = None, params={}):
8274
8323
  """
8275
8324
  fetch deposit and withdraw fees
8276
- :see: https://huobiapi.github.io/docs/spot/v1/en/#get-all-supported-currencies-v2
8325
+
8326
+ https://huobiapi.github.io/docs/spot/v1/en/#get-all-supported-currencies-v2
8327
+
8277
8328
  :param str[]|None codes: list of unified currency codes
8278
8329
  :param dict [params]: extra parameters specific to the exchange API endpoint
8279
8330
  :returns dict[]: a list of `fees structures <https://docs.ccxt.com/#/?id=fee-structure>`
@@ -8474,9 +8525,11 @@ class htx(Exchange, ImplicitAPI):
8474
8525
  def fetch_liquidations(self, symbol: str, since: Int = None, limit: Int = None, params={}):
8475
8526
  """
8476
8527
  retrieves the public liquidations of a trading pair
8477
- :see: https://huobiapi.github.io/docs/usdt_swap/v1/en/#general-query-liquidation-orders-new
8478
- :see: https://huobiapi.github.io/docs/coin_margined_swap/v1/en/#query-liquidation-orders-new
8479
- :see: https://huobiapi.github.io/docs/dm/v1/en/#query-liquidation-order-information-new
8528
+
8529
+ https://huobiapi.github.io/docs/usdt_swap/v1/en/#general-query-liquidation-orders-new
8530
+ https://huobiapi.github.io/docs/coin_margined_swap/v1/en/#query-liquidation-orders-new
8531
+ https://huobiapi.github.io/docs/dm/v1/en/#query-liquidation-order-information-new
8532
+
8480
8533
  :param str symbol: unified CCXT market symbol
8481
8534
  :param int [since]: the earliest time in ms to fetch liquidations for
8482
8535
  :param int [limit]: the maximum number of liquidation structures to retrieve
@@ -8566,17 +8619,19 @@ class htx(Exchange, ImplicitAPI):
8566
8619
  def close_position(self, symbol: str, side: OrderSide = None, params={}) -> Order:
8567
8620
  """
8568
8621
  closes open positions for a contract market, requires 'amount' in params, unlike other exchanges
8569
- :see: https://huobiapi.github.io/docs/usdt_swap/v1/en/#isolated-place-lightning-close-order # USDT-M(isolated)
8570
- :see: https://huobiapi.github.io/docs/usdt_swap/v1/en/#cross-place-lightning-close-position # USDT-M(cross)
8571
- :see: https://huobiapi.github.io/docs/coin_margined_swap/v1/en/#place-lightning-close-order # Coin-M swap
8572
- :see: https://huobiapi.github.io/docs/dm/v1/en/#place-flash-close-order # Coin-M futures
8622
+
8623
+ https://huobiapi.github.io/docs/usdt_swap/v1/en/#isolated-place-lightning-close-order # USDT-M(isolated)
8624
+ https://huobiapi.github.io/docs/usdt_swap/v1/en/#cross-place-lightning-close-position # USDT-M(cross)
8625
+ https://huobiapi.github.io/docs/coin_margined_swap/v1/en/#place-lightning-close-order # Coin-M swap
8626
+ https://huobiapi.github.io/docs/dm/v1/en/#place-flash-close-order # Coin-M futures
8627
+
8573
8628
  :param str symbol: unified CCXT market symbol
8574
8629
  :param str side: 'buy' or 'sell', the side of the closing order, opposite side side
8575
8630
  :param dict [params]: extra parameters specific to the okx api endpoint
8576
8631
  :param str [params.clientOrderId]: client needs to provide unique API and have to maintain the API themselves afterwards. [1, 9223372036854775807]
8577
8632
  :param dict [params.marginMode]: 'cross' or 'isolated', required for linear markets
8578
- *
8579
- * EXCHANGE SPECIFIC PARAMETERS
8633
+
8634
+ EXCHANGE SPECIFIC PARAMETERS
8580
8635
  :param number [params.amount]: order quantity
8581
8636
  :param str [params.order_price_type]: 'lightning' by default, 'lightning_fok': lightning fok type, 'lightning_ioc': lightning ioc type 'market' by default, 'market': market order type, 'lightning_fok': lightning
8582
8637
  :returns dict: `an order structure <https://docs.ccxt.com/#/?id=position-structure>`
@@ -8617,8 +8672,10 @@ class htx(Exchange, ImplicitAPI):
8617
8672
  def set_position_mode(self, hedged: bool, symbol: Str = None, params={}):
8618
8673
  """
8619
8674
  set hedged to True or False
8620
- :see: https://huobiapi.github.io/docs/usdt_swap/v1/en/#isolated-switch-position-mode
8621
- :see: https://huobiapi.github.io/docs/usdt_swap/v1/en/#cross-switch-position-mode
8675
+
8676
+ https://huobiapi.github.io/docs/usdt_swap/v1/en/#isolated-switch-position-mode
8677
+ https://huobiapi.github.io/docs/usdt_swap/v1/en/#cross-switch-position-mode
8678
+
8622
8679
  :param bool hedged: set to True to for hedged mode, must be set separately for each market in isolated margin mode, only valid for linear markets
8623
8680
  :param str [symbol]: unified market symbol, required for isolated margin mode
8624
8681
  :param dict [params]: extra parameters specific to the exchange API endpoint