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/async_support/htx.py CHANGED
@@ -107,7 +107,7 @@ class htx(Exchange, ImplicitAPI):
107
107
  'fetchLeverageTiers': True,
108
108
  'fetchLiquidations': True,
109
109
  'fetchMarginAdjustmentHistory': False,
110
- 'fetchMarketLeverageTiers': True,
110
+ 'fetchMarketLeverageTiers': 'emulated',
111
111
  'fetchMarkets': True,
112
112
  'fetchMarkOHLCV': True,
113
113
  'fetchMyLiquidations': False,
@@ -1256,11 +1256,13 @@ class htx(Exchange, ImplicitAPI):
1256
1256
  async def fetch_status(self, params={}):
1257
1257
  """
1258
1258
  the latest known information on the availability of the exchange API
1259
- :see: https://huobiapi.github.io/docs/spot/v1/en/#get-system-status
1260
- :see: https://huobiapi.github.io/docs/dm/v1/en/#get-system-status
1261
- :see: https://huobiapi.github.io/docs/coin_margined_swap/v1/en/#get-system-status
1262
- :see: https://huobiapi.github.io/docs/usdt_swap/v1/en/#get-system-status
1263
- :see: https://huobiapi.github.io/docs/usdt_swap/v1/en/#query-whether-the-system-is-available # contractPublicGetHeartbeat
1259
+
1260
+ https://huobiapi.github.io/docs/spot/v1/en/#get-system-status
1261
+ https://huobiapi.github.io/docs/dm/v1/en/#get-system-status
1262
+ https://huobiapi.github.io/docs/coin_margined_swap/v1/en/#get-system-status
1263
+ https://huobiapi.github.io/docs/usdt_swap/v1/en/#get-system-status
1264
+ https://huobiapi.github.io/docs/usdt_swap/v1/en/#query-whether-the-system-is-available # contractPublicGetHeartbeat
1265
+
1264
1266
  :param dict [params]: extra parameters specific to the exchange API endpoint
1265
1267
  :returns dict: a `status structure <https://docs.ccxt.com/#/?id=exchange-status-structure>`
1266
1268
  """
@@ -1475,8 +1477,10 @@ class htx(Exchange, ImplicitAPI):
1475
1477
  async def fetch_time(self, params={}):
1476
1478
  """
1477
1479
  fetches the current integer timestamp in milliseconds from the exchange server
1478
- :see: https://huobiapi.github.io/docs/spot/v1/en/#get-current-timestamp
1479
- :see: https://huobiapi.github.io/docs/coin_margined_swap/v1/en/#get-current-system-timestamp
1480
+
1481
+ https://huobiapi.github.io/docs/spot/v1/en/#get-current-timestamp
1482
+ https://huobiapi.github.io/docs/coin_margined_swap/v1/en/#get-current-system-timestamp
1483
+
1480
1484
  :param dict [params]: extra parameters specific to the exchange API endpoint
1481
1485
  :returns int: the current integer timestamp in milliseconds from the exchange server
1482
1486
  """
@@ -1523,7 +1527,9 @@ class htx(Exchange, ImplicitAPI):
1523
1527
  async def fetch_trading_fee(self, symbol: str, params={}) -> TradingFeeInterface:
1524
1528
  """
1525
1529
  fetch the trading fees for a market
1526
- :see: https://huobiapi.github.io/docs/spot/v1/en/#get-current-fee-rate-applied-to-the-user
1530
+
1531
+ https://huobiapi.github.io/docs/spot/v1/en/#get-current-fee-rate-applied-to-the-user
1532
+
1527
1533
  :param str symbol: unified market symbol
1528
1534
  :param dict [params]: extra parameters specific to the exchange API endpoint
1529
1535
  :returns dict: a `fee structure <https://docs.ccxt.com/#/?id=fee-structure>`
@@ -1568,8 +1574,10 @@ class htx(Exchange, ImplicitAPI):
1568
1574
 
1569
1575
  async def fetch_trading_limits_by_id(self, id: str, params={}):
1570
1576
  """
1571
- * @ignore
1572
- :see: https://huobiapi.github.io/docs/spot/v1/en/#get-current-fee-rate-applied-to-the-user
1577
+ @ignore
1578
+
1579
+ https://huobiapi.github.io/docs/spot/v1/en/#get-current-fee-rate-applied-to-the-user
1580
+
1573
1581
  :param str id: market id
1574
1582
  :param dict [params]: extra parameters specific to the exchange API endpoint
1575
1583
  :returns dict: the limits object of a market structure
@@ -1628,10 +1636,12 @@ class htx(Exchange, ImplicitAPI):
1628
1636
  async def fetch_markets(self, params={}) -> List[Market]:
1629
1637
  """
1630
1638
  retrieves data on all markets for huobi
1631
- :see: https://huobiapi.github.io/docs/spot/v1/en/#get-all-supported-trading-symbol-v1-deprecated
1632
- :see: https://huobiapi.github.io/docs/dm/v1/en/#get-contract-info
1633
- :see: https://huobiapi.github.io/docs/coin_margined_swap/v1/en/#query-swap-info
1634
- :see: https://huobiapi.github.io/docs/usdt_swap/v1/en/#general-query-swap-info
1639
+
1640
+ https://huobiapi.github.io/docs/spot/v1/en/#get-all-supported-trading-symbol-v1-deprecated
1641
+ https://huobiapi.github.io/docs/dm/v1/en/#get-contract-info
1642
+ https://huobiapi.github.io/docs/coin_margined_swap/v1/en/#query-swap-info
1643
+ https://huobiapi.github.io/docs/usdt_swap/v1/en/#general-query-swap-info
1644
+
1635
1645
  :param dict [params]: extra parameters specific to the exchange API endpoint
1636
1646
  :returns dict[]: an array of objects representing market data
1637
1647
  """
@@ -1657,12 +1667,14 @@ class htx(Exchange, ImplicitAPI):
1657
1667
 
1658
1668
  async def fetch_markets_by_type_and_sub_type(self, type: Str, subType: Str, params={}):
1659
1669
  """
1660
- * @ignore
1670
+ @ignore
1661
1671
  retrieves data on all markets of a certain type and/or subtype
1662
- :see: https://huobiapi.github.io/docs/spot/v1/en/#get-all-supported-trading-symbol-v1-deprecated
1663
- :see: https://huobiapi.github.io/docs/dm/v1/en/#get-contract-info
1664
- :see: https://huobiapi.github.io/docs/coin_margined_swap/v1/en/#query-swap-info
1665
- :see: https://huobiapi.github.io/docs/usdt_swap/v1/en/#general-query-swap-info
1672
+
1673
+ https://huobiapi.github.io/docs/spot/v1/en/#get-all-supported-trading-symbol-v1-deprecated
1674
+ https://huobiapi.github.io/docs/dm/v1/en/#get-contract-info
1675
+ https://huobiapi.github.io/docs/coin_margined_swap/v1/en/#query-swap-info
1676
+ https://huobiapi.github.io/docs/usdt_swap/v1/en/#general-query-swap-info
1677
+
1666
1678
  :param str [type]: 'spot', 'swap' or 'future'
1667
1679
  :param str [subType]: 'linear' or 'inverse'
1668
1680
  :param dict [params]: extra parameters specific to the exchange API endpoint
@@ -2069,10 +2081,12 @@ class htx(Exchange, ImplicitAPI):
2069
2081
  async def fetch_ticker(self, symbol: str, params={}) -> Ticker:
2070
2082
  """
2071
2083
  fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
2072
- :see: https://huobiapi.github.io/docs/spot/v1/en/#get-latest-aggregated-ticker
2073
- :see: https://huobiapi.github.io/docs/dm/v1/en/#get-market-data-overview
2074
- :see: https://huobiapi.github.io/docs/coin_margined_swap/v1/en/#get-market-data-overview
2075
- :see: https://huobiapi.github.io/docs/usdt_swap/v1/en/#general-get-market-data-overview
2084
+
2085
+ https://huobiapi.github.io/docs/spot/v1/en/#get-latest-aggregated-ticker
2086
+ https://huobiapi.github.io/docs/dm/v1/en/#get-market-data-overview
2087
+ https://huobiapi.github.io/docs/coin_margined_swap/v1/en/#get-market-data-overview
2088
+ https://huobiapi.github.io/docs/usdt_swap/v1/en/#general-get-market-data-overview
2089
+
2076
2090
  :param str symbol: unified symbol of the market to fetch the ticker for
2077
2091
  :param dict [params]: extra parameters specific to the exchange API endpoint
2078
2092
  :returns dict: a `ticker structure <https://docs.ccxt.com/#/?id=ticker-structure>`
@@ -2147,10 +2161,12 @@ class htx(Exchange, ImplicitAPI):
2147
2161
  async def fetch_tickers(self, symbols: Strings = None, params={}) -> Tickers:
2148
2162
  """
2149
2163
  fetches price tickers for multiple markets, statistical information calculated over the past 24 hours for each market
2150
- :see: https://huobiapi.github.io/docs/spot/v1/en/#get-latest-tickers-for-all-pairs
2151
- :see: https://huobiapi.github.io/docs/usdt_swap/v1/en/#general-get-a-batch-of-market-data-overview
2152
- :see: https://huobiapi.github.io/docs/dm/v1/en/#get-a-batch-of-market-data-overview
2153
- :see: https://huobiapi.github.io/docs/coin_margined_swap/v1/en/#get-a-batch-of-market-data-overview-v2
2164
+
2165
+ https://huobiapi.github.io/docs/spot/v1/en/#get-latest-tickers-for-all-pairs
2166
+ https://huobiapi.github.io/docs/usdt_swap/v1/en/#general-get-a-batch-of-market-data-overview
2167
+ https://huobiapi.github.io/docs/dm/v1/en/#get-a-batch-of-market-data-overview
2168
+ https://huobiapi.github.io/docs/coin_margined_swap/v1/en/#get-a-batch-of-market-data-overview-v2
2169
+
2154
2170
  :param str[] [symbols]: unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned
2155
2171
  :param dict [params]: extra parameters specific to the exchange API endpoint
2156
2172
  :returns dict: a dictionary of `ticker structures <https://docs.ccxt.com/#/?id=ticker-structure>`
@@ -2251,9 +2267,11 @@ class htx(Exchange, ImplicitAPI):
2251
2267
  async def fetch_last_prices(self, symbols: Strings = None, params={}):
2252
2268
  """
2253
2269
  fetches the last price for multiple markets
2254
- :see: https://www.htx.com/en-us/opend/newApiPages/?id=8cb81024-77b5-11ed-9966-0242ac110003 linear swap & linear future
2255
- :see: https://www.htx.com/en-us/opend/newApiPages/?id=28c2e8fc-77ae-11ed-9966-0242ac110003 inverse future
2256
- :see: https://www.htx.com/en-us/opend/newApiPages/?id=5d517ef5-77b6-11ed-9966-0242ac110003 inverse swap
2270
+
2271
+ https://www.htx.com/en-us/opend/newApiPages/?id=8cb81024-77b5-11ed-9966-0242ac110003 linear swap & linear future
2272
+ https://www.htx.com/en-us/opend/newApiPages/?id=28c2e8fc-77ae-11ed-9966-0242ac110003 inverse future
2273
+ https://www.htx.com/en-us/opend/newApiPages/?id=5d517ef5-77b6-11ed-9966-0242ac110003 inverse swap
2274
+
2257
2275
  :param str[] [symbols]: unified symbols of the markets to fetch the last prices
2258
2276
  :param dict [params]: extra parameters specific to the exchange API endpoint
2259
2277
  :returns dict: a dictionary of lastprices structures
@@ -2366,10 +2384,12 @@ class htx(Exchange, ImplicitAPI):
2366
2384
  async def fetch_order_book(self, symbol: str, limit: Int = None, params={}) -> OrderBook:
2367
2385
  """
2368
2386
  fetches information on open orders with bid(buy) and ask(sell) prices, volumes and other data
2369
- :see: https://huobiapi.github.io/docs/spot/v1/en/#get-market-depth
2370
- :see: https://huobiapi.github.io/docs/dm/v1/en/#get-market-depth
2371
- :see: https://huobiapi.github.io/docs/coin_margined_swap/v1/en/#get-market-depth
2372
- :see: https://huobiapi.github.io/docs/usdt_swap/v1/en/#general-get-market-depth
2387
+
2388
+ https://huobiapi.github.io/docs/spot/v1/en/#get-market-depth
2389
+ https://huobiapi.github.io/docs/dm/v1/en/#get-market-depth
2390
+ https://huobiapi.github.io/docs/coin_margined_swap/v1/en/#get-market-depth
2391
+ https://huobiapi.github.io/docs/usdt_swap/v1/en/#general-get-market-depth
2392
+
2373
2393
  :param str symbol: unified symbol of the market to fetch the order book for
2374
2394
  :param int [limit]: the maximum amount of order book entries to return
2375
2395
  :param dict [params]: extra parameters specific to the exchange API endpoint
@@ -2581,7 +2601,9 @@ class htx(Exchange, ImplicitAPI):
2581
2601
  async def fetch_order_trades(self, id: str, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
2582
2602
  """
2583
2603
  fetch all the trades made from a single order
2584
- :see: https://huobiapi.github.io/docs/spot/v1/en/#get-the-match-result-of-an-order
2604
+
2605
+ https://huobiapi.github.io/docs/spot/v1/en/#get-the-match-result-of-an-order
2606
+
2585
2607
  :param str id: order id
2586
2608
  :param str symbol: unified market symbol
2587
2609
  :param int [since]: the earliest time in ms to fetch trades for
@@ -2600,9 +2622,11 @@ class htx(Exchange, ImplicitAPI):
2600
2622
 
2601
2623
  async def fetch_spot_order_trades(self, id: str, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
2602
2624
  """
2603
- * @ignore
2625
+ @ignore
2604
2626
  fetch all the trades made from a single order
2605
- :see: https://huobiapi.github.io/docs/spot/v1/en/#get-the-match-result-of-an-order
2627
+
2628
+ https://huobiapi.github.io/docs/spot/v1/en/#get-the-match-result-of-an-order
2629
+
2606
2630
  :param str id: order id
2607
2631
  :param str symbol: unified market symbol
2608
2632
  :param int [since]: the earliest time in ms to fetch trades for
@@ -2619,9 +2643,11 @@ class htx(Exchange, ImplicitAPI):
2619
2643
 
2620
2644
  async def fetch_my_trades(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
2621
2645
  """
2622
- :see: https://huobiapi.github.io/docs/usdt_swap/v1/en/#isolated-get-history-match-results-via-multiple-fields-new
2623
- :see: https://huobiapi.github.io/docs/usdt_swap/v1/en/#cross-get-history-match-results-via-multiple-fields-new
2624
- :see: https://huobiapi.github.io/docs/spot/v1/en/#search-match-results
2646
+
2647
+ https://huobiapi.github.io/docs/usdt_swap/v1/en/#isolated-get-history-match-results-via-multiple-fields-new
2648
+ https://huobiapi.github.io/docs/usdt_swap/v1/en/#cross-get-history-match-results-via-multiple-fields-new
2649
+ https://huobiapi.github.io/docs/spot/v1/en/#search-match-results
2650
+
2625
2651
  fetch all trades made by the user
2626
2652
  :param str symbol: unified market symbol
2627
2653
  :param int [since]: the earliest time in ms to fetch trades for
@@ -2772,10 +2798,12 @@ class htx(Exchange, ImplicitAPI):
2772
2798
 
2773
2799
  async def fetch_trades(self, symbol: str, since: Int = None, limit: Int = 1000, params={}) -> List[Trade]:
2774
2800
  """
2775
- :see: https://huobiapi.github.io/docs/spot/v1/en/#get-the-most-recent-trades
2776
- :see: https://huobiapi.github.io/docs/dm/v1/en/#query-a-batch-of-trade-records-of-a-contract
2777
- :see: https://huobiapi.github.io/docs/coin_margined_swap/v1/en/#query-a-batch-of-trade-records-of-a-contract
2778
- :see: https://huobiapi.github.io/docs/usdt_swap/v1/en/#general-query-a-batch-of-trade-records-of-a-contract
2801
+
2802
+ https://huobiapi.github.io/docs/spot/v1/en/#get-the-most-recent-trades
2803
+ https://huobiapi.github.io/docs/dm/v1/en/#query-a-batch-of-trade-records-of-a-contract
2804
+ https://huobiapi.github.io/docs/coin_margined_swap/v1/en/#query-a-batch-of-trade-records-of-a-contract
2805
+ https://huobiapi.github.io/docs/usdt_swap/v1/en/#general-query-a-batch-of-trade-records-of-a-contract
2806
+
2779
2807
  get the list of most recent trades for a particular symbol
2780
2808
  :param str symbol: unified symbol of the market to fetch trades for
2781
2809
  :param int [since]: timestamp in ms of the earliest trade to fetch
@@ -2867,10 +2895,12 @@ class htx(Exchange, ImplicitAPI):
2867
2895
  async def fetch_ohlcv(self, symbol: str, timeframe='1m', since: Int = None, limit: Int = None, params={}) -> List[list]:
2868
2896
  """
2869
2897
  fetches historical candlestick data containing the open, high, low, and close price, and the volume of a market
2870
- :see: https://huobiapi.github.io/docs/spot/v1/en/#get-klines-candles
2871
- :see: https://huobiapi.github.io/docs/dm/v1/en/#get-kline-data
2872
- :see: https://huobiapi.github.io/docs/coin_margined_swap/v1/en/#get-kline-data
2873
- :see: https://huobiapi.github.io/docs/usdt_swap/v1/en/#general-get-kline-data
2898
+
2899
+ https://huobiapi.github.io/docs/spot/v1/en/#get-klines-candles
2900
+ https://huobiapi.github.io/docs/dm/v1/en/#get-kline-data
2901
+ https://huobiapi.github.io/docs/coin_margined_swap/v1/en/#get-kline-data
2902
+ https://huobiapi.github.io/docs/usdt_swap/v1/en/#general-get-kline-data
2903
+
2874
2904
  :param str symbol: unified symbol of the market to fetch OHLCV data for
2875
2905
  :param str timeframe: the length of time each candle represents
2876
2906
  :param int [since]: timestamp in ms of the earliest candle to fetch
@@ -2994,7 +3024,9 @@ class htx(Exchange, ImplicitAPI):
2994
3024
  async def fetch_accounts(self, params={}) -> List[Account]:
2995
3025
  """
2996
3026
  fetch all the accounts associated with a profile
2997
- :see: https://huobiapi.github.io/docs/spot/v1/en/#get-all-accounts-of-the-current-user
3027
+
3028
+ https://huobiapi.github.io/docs/spot/v1/en/#get-all-accounts-of-the-current-user
3029
+
2998
3030
  :param dict [params]: extra parameters specific to the exchange API endpoint
2999
3031
  :returns dict: a dictionary of `account structures <https://docs.ccxt.com/#/?id=account-structure>` indexed by the account type
3000
3032
  """
@@ -3034,9 +3066,12 @@ class htx(Exchange, ImplicitAPI):
3034
3066
  async def fetch_account_id_by_type(self, type: str, marginMode: Str = None, symbol: Str = None, params={}):
3035
3067
  """
3036
3068
  fetch all the accounts by a type and marginModeassociated with a profile
3037
- :see: https://huobiapi.github.io/docs/spot/v1/en/#get-all-accounts-of-the-current-user
3069
+
3070
+ https://huobiapi.github.io/docs/spot/v1/en/#get-all-accounts-of-the-current-user
3071
+
3038
3072
  :param str type: 'spot', 'swap' or 'future
3039
3073
  :param str [marginMode]: 'cross' or 'isolated'
3074
+ @param symbol
3040
3075
  :param dict [params]: extra parameters specific to the exchange API endpoint
3041
3076
  :returns dict: a dictionary of `account structures <https://docs.ccxt.com/#/?id=account-structure>` indexed by the account type
3042
3077
  """
@@ -3066,7 +3101,9 @@ class htx(Exchange, ImplicitAPI):
3066
3101
  async def fetch_currencies(self, params={}) -> Currencies:
3067
3102
  """
3068
3103
  fetches all available currencies on an exchange
3069
- :see: https://huobiapi.github.io/docs/spot/v1/en/#apiv2-currency-amp-chains
3104
+
3105
+ https://huobiapi.github.io/docs/spot/v1/en/#apiv2-currency-amp-chains
3106
+
3070
3107
  :param dict [params]: extra parameters specific to the exchange API endpoint
3071
3108
  :returns dict: an associative dictionary of currencies
3072
3109
  """
@@ -3221,13 +3258,15 @@ class htx(Exchange, ImplicitAPI):
3221
3258
 
3222
3259
  async def fetch_balance(self, params={}) -> Balances:
3223
3260
  """
3224
- :see: https://huobiapi.github.io/docs/spot/v1/en/#get-account-balance-of-a-specific-account
3225
- :see: https://www.htx.com/en-us/opend/newApiPages/?id=7ec4b429-7773-11ed-9966-0242ac110003
3226
- :see: https://www.htx.com/en-us/opend/newApiPages/?id=10000074-77b7-11ed-9966-0242ac110003
3227
- :see: https://huobiapi.github.io/docs/dm/v1/en/#query-asset-valuation
3228
- :see: https://huobiapi.github.io/docs/coin_margined_swap/v1/en/#query-user-s-account-information
3229
- :see: https://huobiapi.github.io/docs/usdt_swap/v1/en/#isolated-query-user-s-account-information
3230
- :see: https://huobiapi.github.io/docs/usdt_swap/v1/en/#cross-query-user-39-s-account-information
3261
+
3262
+ https://huobiapi.github.io/docs/spot/v1/en/#get-account-balance-of-a-specific-account
3263
+ https://www.htx.com/en-us/opend/newApiPages/?id=7ec4b429-7773-11ed-9966-0242ac110003
3264
+ https://www.htx.com/en-us/opend/newApiPages/?id=10000074-77b7-11ed-9966-0242ac110003
3265
+ https://huobiapi.github.io/docs/dm/v1/en/#query-asset-valuation
3266
+ https://huobiapi.github.io/docs/coin_margined_swap/v1/en/#query-user-s-account-information
3267
+ https://huobiapi.github.io/docs/usdt_swap/v1/en/#isolated-query-user-s-account-information
3268
+ https://huobiapi.github.io/docs/usdt_swap/v1/en/#cross-query-user-39-s-account-information
3269
+
3231
3270
  query for balance and get the amount of funds available for trading or funds locked in orders
3232
3271
  :param dict [params]: extra parameters specific to the exchange API endpoint
3233
3272
  :param bool [params.unified]: provide self parameter if you have a recent account with unified cross+isolated margin account
@@ -3526,12 +3565,15 @@ class htx(Exchange, ImplicitAPI):
3526
3565
  async def fetch_order(self, id: str, symbol: Str = None, params={}):
3527
3566
  """
3528
3567
  fetches information on an order made by the user
3529
- :see: https://huobiapi.github.io/docs/spot/v1/en/#get-the-order-detail-of-an-order-based-on-client-order-id
3530
- :see: https://huobiapi.github.io/docs/spot/v1/en/#get-the-order-detail-of-an-order
3531
- :see: https://huobiapi.github.io/docs/usdt_swap/v1/en/#isolated-get-information-of-an-order
3532
- :see: https://huobiapi.github.io/docs/usdt_swap/v1/en/#cross-get-information-of-order
3533
- :see: https://huobiapi.github.io/docs/dm/v1/en/#get-information-of-an-order
3534
- :see: https://huobiapi.github.io/docs/coin_margined_swap/v1/en/#get-information-of-an-order
3568
+
3569
+ https://huobiapi.github.io/docs/spot/v1/en/#get-the-order-detail-of-an-order-based-on-client-order-id
3570
+ https://huobiapi.github.io/docs/spot/v1/en/#get-the-order-detail-of-an-order
3571
+ https://huobiapi.github.io/docs/usdt_swap/v1/en/#isolated-get-information-of-an-order
3572
+ https://huobiapi.github.io/docs/usdt_swap/v1/en/#cross-get-information-of-order
3573
+ https://huobiapi.github.io/docs/dm/v1/en/#get-information-of-an-order
3574
+ https://huobiapi.github.io/docs/coin_margined_swap/v1/en/#get-information-of-an-order
3575
+
3576
+ :param str id: order id
3535
3577
  :param str symbol: unified symbol of the market the order was made in
3536
3578
  :param dict [params]: extra parameters specific to the exchange API endpoint
3537
3579
  :returns dict: An `order structure <https://docs.ccxt.com/#/?id=order-structure>`
@@ -4036,12 +4078,14 @@ class htx(Exchange, ImplicitAPI):
4036
4078
 
4037
4079
  async def fetch_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
4038
4080
  """
4039
- :see: https://huobiapi.github.io/docs/spot/v1/en/#search-past-orders
4040
- :see: https://huobiapi.github.io/docs/spot/v1/en/#search-historical-orders-within-48-hours
4041
- :see: https://huobiapi.github.io/docs/usdt_swap/v1/en/#isolated-get-history-orders-new
4042
- :see: https://huobiapi.github.io/docs/usdt_swap/v1/en/#cross-get-history-orders-new
4043
- :see: https://huobiapi.github.io/docs/coin_margined_swap/v1/en/#get-history-orders-new
4044
- :see: https://huobiapi.github.io/docs/coin_margined_swap/v1/en/#query-history-orders-via-multiple-fields-new
4081
+
4082
+ https://huobiapi.github.io/docs/spot/v1/en/#search-past-orders
4083
+ https://huobiapi.github.io/docs/spot/v1/en/#search-historical-orders-within-48-hours
4084
+ https://huobiapi.github.io/docs/usdt_swap/v1/en/#isolated-get-history-orders-new
4085
+ https://huobiapi.github.io/docs/usdt_swap/v1/en/#cross-get-history-orders-new
4086
+ https://huobiapi.github.io/docs/coin_margined_swap/v1/en/#get-history-orders-new
4087
+ https://huobiapi.github.io/docs/coin_margined_swap/v1/en/#query-history-orders-via-multiple-fields-new
4088
+
4045
4089
  fetches information on multiple orders made by the user
4046
4090
  :param str symbol: unified market symbol of the market orders were made in
4047
4091
  :param int [since]: the earliest time in ms to fetch orders for
@@ -4069,12 +4113,14 @@ class htx(Exchange, ImplicitAPI):
4069
4113
 
4070
4114
  async def fetch_closed_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
4071
4115
  """
4072
- :see: https://huobiapi.github.io/docs/spot/v1/en/#search-past-orders
4073
- :see: https://huobiapi.github.io/docs/spot/v1/en/#search-historical-orders-within-48-hours
4074
- :see: https://huobiapi.github.io/docs/usdt_swap/v1/en/#isolated-get-history-orders-new
4075
- :see: https://huobiapi.github.io/docs/usdt_swap/v1/en/#cross-get-history-orders-new
4076
- :see: https://huobiapi.github.io/docs/coin_margined_swap/v1/en/#get-history-orders-new
4077
- :see: https://huobiapi.github.io/docs/coin_margined_swap/v1/en/#query-history-orders-via-multiple-fields-new
4116
+
4117
+ https://huobiapi.github.io/docs/spot/v1/en/#search-past-orders
4118
+ https://huobiapi.github.io/docs/spot/v1/en/#search-historical-orders-within-48-hours
4119
+ https://huobiapi.github.io/docs/usdt_swap/v1/en/#isolated-get-history-orders-new
4120
+ https://huobiapi.github.io/docs/usdt_swap/v1/en/#cross-get-history-orders-new
4121
+ https://huobiapi.github.io/docs/coin_margined_swap/v1/en/#get-history-orders-new
4122
+ https://huobiapi.github.io/docs/coin_margined_swap/v1/en/#query-history-orders-via-multiple-fields-new
4123
+
4078
4124
  fetches information on multiple closed orders made by the user
4079
4125
  :param str symbol: unified market symbol of the market orders were made in
4080
4126
  :param int [since]: the earliest time in ms to fetch orders for
@@ -4101,9 +4147,11 @@ class htx(Exchange, ImplicitAPI):
4101
4147
 
4102
4148
  async def fetch_open_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
4103
4149
  """
4104
- :see: https://huobiapi.github.io/docs/spot/v1/en/#get-all-open-orders
4105
- :see: https://huobiapi.github.io/docs/usdt_swap/v1/en/#isolated-current-unfilled-order-acquisition
4106
- :see: https://huobiapi.github.io/docs/usdt_swap/v1/en/#cross-current-unfilled-order-acquisition
4150
+
4151
+ https://huobiapi.github.io/docs/spot/v1/en/#get-all-open-orders
4152
+ https://huobiapi.github.io/docs/usdt_swap/v1/en/#isolated-current-unfilled-order-acquisition
4153
+ https://huobiapi.github.io/docs/usdt_swap/v1/en/#cross-current-unfilled-order-acquisition
4154
+
4107
4155
  fetch all unfilled currently open orders
4108
4156
  :param str symbol: unified market symbol
4109
4157
  :param int [since]: the earliest time in ms to fetch open orders for
@@ -4836,7 +4884,9 @@ class htx(Exchange, ImplicitAPI):
4836
4884
  async def create_market_buy_order_with_cost(self, symbol: str, cost: float, params={}):
4837
4885
  """
4838
4886
  create a market buy order by providing the symbol and cost
4839
- :see: https://www.htx.com/en-us/opend/newApiPages/?id=7ec4ee16-7773-11ed-9966-0242ac110003
4887
+
4888
+ https://www.htx.com/en-us/opend/newApiPages/?id=7ec4ee16-7773-11ed-9966-0242ac110003
4889
+
4840
4890
  :param str symbol: unified symbol of the market to create an order in
4841
4891
  :param float cost: how much you want to trade in units of the quote currency
4842
4892
  :param dict [params]: extra parameters specific to the exchange API endpoint
@@ -4872,7 +4922,7 @@ class htx(Exchange, ImplicitAPI):
4872
4922
 
4873
4923
  async def create_spot_order_request(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: Num = None, params={}):
4874
4924
  """
4875
- * @ignore
4925
+ @ignore
4876
4926
  helper function to build request
4877
4927
  :param str symbol: unified symbol of the market to create an order in
4878
4928
  :param str type: 'market' or 'limit'
@@ -4976,7 +5026,7 @@ class htx(Exchange, ImplicitAPI):
4976
5026
 
4977
5027
  def create_contract_order_request(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: Num = None, params={}):
4978
5028
  """
4979
- * @ignore
5029
+ @ignore
4980
5030
  helper function to build request
4981
5031
  :param str symbol: unified symbol of the market to create an order in
4982
5032
  :param str type: 'market' or 'limit'
@@ -5058,15 +5108,17 @@ class htx(Exchange, ImplicitAPI):
5058
5108
  async def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: Num = None, params={}):
5059
5109
  """
5060
5110
  create a trade order
5061
- :see: https://huobiapi.github.io/docs/spot/v1/en/#place-a-new-order # spot, margin
5062
- :see: https://huobiapi.github.io/docs/coin_margined_swap/v1/en/#place-an-order # coin-m swap
5063
- :see: https://huobiapi.github.io/docs/coin_margined_swap/v1/en/#place-trigger-order # coin-m swap trigger
5064
- :see: https://huobiapi.github.io/docs/usdt_swap/v1/en/#cross-place-an-order # usdt-m swap cross
5065
- :see: https://huobiapi.github.io/docs/usdt_swap/v1/en/#cross-place-trigger-order # usdt-m swap cross trigger
5066
- :see: https://huobiapi.github.io/docs/usdt_swap/v1/en/#isolated-place-an-order # usdt-m swap isolated
5067
- :see: https://huobiapi.github.io/docs/usdt_swap/v1/en/#isolated-place-trigger-order # usdt-m swap isolated trigger
5068
- :see: https://huobiapi.github.io/docs/dm/v1/en/#place-an-order # coin-m futures
5069
- :see: https://huobiapi.github.io/docs/dm/v1/en/#place-trigger-order # coin-m futures contract trigger
5111
+
5112
+ https://huobiapi.github.io/docs/spot/v1/en/#place-a-new-order # spot, margin
5113
+ https://huobiapi.github.io/docs/coin_margined_swap/v1/en/#place-an-order # coin-m swap
5114
+ https://huobiapi.github.io/docs/coin_margined_swap/v1/en/#place-trigger-order # coin-m swap trigger
5115
+ https://huobiapi.github.io/docs/usdt_swap/v1/en/#cross-place-an-order # usdt-m swap cross
5116
+ https://huobiapi.github.io/docs/usdt_swap/v1/en/#cross-place-trigger-order # usdt-m swap cross trigger
5117
+ https://huobiapi.github.io/docs/usdt_swap/v1/en/#isolated-place-an-order # usdt-m swap isolated
5118
+ https://huobiapi.github.io/docs/usdt_swap/v1/en/#isolated-place-trigger-order # usdt-m swap isolated trigger
5119
+ https://huobiapi.github.io/docs/dm/v1/en/#place-an-order # coin-m futures
5120
+ https://huobiapi.github.io/docs/dm/v1/en/#place-trigger-order # coin-m futures contract trigger
5121
+
5070
5122
  :param str symbol: unified symbol of the market to create an order in
5071
5123
  :param str type: 'market' or 'limit'
5072
5124
  :param str side: 'buy' or 'sell'
@@ -5215,11 +5267,13 @@ class htx(Exchange, ImplicitAPI):
5215
5267
  async def create_orders(self, orders: List[OrderRequest], params={}):
5216
5268
  """
5217
5269
  create a list of trade orders
5218
- :see: https://huobiapi.github.io/docs/spot/v1/en/#place-a-batch-of-orders
5219
- :see: https://huobiapi.github.io/docs/dm/v1/en/#place-a-batch-of-orders
5220
- :see: https://huobiapi.github.io/docs/coin_margined_swap/v1/en/#place-a-batch-of-orders
5221
- :see: https://huobiapi.github.io/docs/usdt_swap/v1/en/#isolated-place-a-batch-of-orders
5222
- :see: https://huobiapi.github.io/docs/usdt_swap/v1/en/#cross-place-a-batch-of-orders
5270
+
5271
+ https://huobiapi.github.io/docs/spot/v1/en/#place-a-batch-of-orders
5272
+ https://huobiapi.github.io/docs/dm/v1/en/#place-a-batch-of-orders
5273
+ https://huobiapi.github.io/docs/coin_margined_swap/v1/en/#place-a-batch-of-orders
5274
+ https://huobiapi.github.io/docs/usdt_swap/v1/en/#isolated-place-a-batch-of-orders
5275
+ https://huobiapi.github.io/docs/usdt_swap/v1/en/#cross-place-a-batch-of-orders
5276
+
5223
5277
  :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
5224
5278
  :param dict [params]: extra parameters specific to the exchange API endpoint
5225
5279
  :returns dict: an `order structure <https://docs.ccxt.com/#/?id=order-structure>`
@@ -5771,7 +5825,9 @@ class htx(Exchange, ImplicitAPI):
5771
5825
  async def cancel_all_orders_after(self, timeout: Int, params={}):
5772
5826
  """
5773
5827
  dead man's switch, cancel all orders after the given timeout
5774
- :see: https://huobiapi.github.io/docs/spot/v1/en/#dead-man-s-switch
5828
+
5829
+ https://huobiapi.github.io/docs/spot/v1/en/#dead-man-s-switch
5830
+
5775
5831
  :param number timeout: time in milliseconds, 0 represents cancel the timer
5776
5832
  :param dict [params]: extra parameters specific to the exchange API endpoint
5777
5833
  :returns dict: the api result
@@ -5821,7 +5877,9 @@ class htx(Exchange, ImplicitAPI):
5821
5877
 
5822
5878
  async def fetch_deposit_addresses_by_network(self, code: str, params={}) -> List[DepositAddress]:
5823
5879
  """
5824
- :see: https://www.htx.com/en-us/opend/newApiPages/?id=7ec50029-7773-11ed-9966-0242ac110003
5880
+
5881
+ https://www.htx.com/en-us/opend/newApiPages/?id=7ec50029-7773-11ed-9966-0242ac110003
5882
+
5825
5883
  fetch a dictionary of addresses for a currency, indexed by network
5826
5884
  :param str code: unified currency code of the currency for the deposit address
5827
5885
  :param dict [params]: extra parameters specific to the exchange API endpoint
@@ -5853,7 +5911,9 @@ class htx(Exchange, ImplicitAPI):
5853
5911
  async def fetch_deposit_address(self, code: str, params={}) -> DepositAddress:
5854
5912
  """
5855
5913
  fetch the deposit address for a currency associated with self account
5856
- :see: https://www.htx.com/en-us/opend/newApiPages/?id=7ec50029-7773-11ed-9966-0242ac110003
5914
+
5915
+ https://www.htx.com/en-us/opend/newApiPages/?id=7ec50029-7773-11ed-9966-0242ac110003
5916
+
5857
5917
  :param str code: unified currency code
5858
5918
  :param dict [params]: extra parameters specific to the exchange API endpoint
5859
5919
  :returns dict: an `address structure <https://docs.ccxt.com/#/?id=address-structure>`
@@ -5899,7 +5959,9 @@ class htx(Exchange, ImplicitAPI):
5899
5959
 
5900
5960
  async def fetch_deposits(self, code: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Transaction]:
5901
5961
  """
5902
- :see: https://www.htx.com/en-us/opend/newApiPages/?id=7ec4f050-7773-11ed-9966-0242ac110003
5962
+
5963
+ https://www.htx.com/en-us/opend/newApiPages/?id=7ec4f050-7773-11ed-9966-0242ac110003
5964
+
5903
5965
  fetch all deposits made to an account
5904
5966
  :param str code: unified currency code
5905
5967
  :param int [since]: the earliest time in ms to fetch deposits for
@@ -5954,7 +6016,9 @@ class htx(Exchange, ImplicitAPI):
5954
6016
  async def fetch_withdrawals(self, code: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Transaction]:
5955
6017
  """
5956
6018
  fetch all withdrawals made from an account
5957
- :see: https://huobiapi.github.io/docs/spot/v1/en/#search-for-existed-withdraws-and-deposits
6019
+
6020
+ https://huobiapi.github.io/docs/spot/v1/en/#search-for-existed-withdraws-and-deposits
6021
+
5958
6022
  :param str code: unified currency code
5959
6023
  :param int [since]: the earliest time in ms to fetch withdrawals for
5960
6024
  :param int [limit]: the maximum number of withdrawals structures to retrieve
@@ -6120,7 +6184,9 @@ class htx(Exchange, ImplicitAPI):
6120
6184
 
6121
6185
  async def withdraw(self, code: str, amount: float, address: str, tag=None, params={}) -> Transaction:
6122
6186
  """
6123
- :see: https://www.htx.com/en-us/opend/newApiPages/?id=7ec4cc41-7773-11ed-9966-0242ac110003
6187
+
6188
+ https://www.htx.com/en-us/opend/newApiPages/?id=7ec4cc41-7773-11ed-9966-0242ac110003
6189
+
6124
6190
  make a withdrawal
6125
6191
  :param str code: unified currency code
6126
6192
  :param float amount: the amount to withdraw
@@ -6198,13 +6264,15 @@ class htx(Exchange, ImplicitAPI):
6198
6264
  async def transfer(self, code: str, amount: float, fromAccount: str, toAccount: str, params={}) -> TransferEntry:
6199
6265
  """
6200
6266
  transfer currency internally between wallets on the same account
6201
- :see: https://huobiapi.github.io/docs/dm/v1/en/#transfer-margin-between-spot-account-and-future-account
6202
- :see: https://huobiapi.github.io/docs/spot/v1/en/#transfer-fund-between-spot-account-and-future-contract-account
6203
- :see: https://huobiapi.github.io/docs/usdt_swap/v1/en/#general-transfer-margin-between-spot-account-and-usdt-margined-contracts-account
6204
- :see: https://huobiapi.github.io/docs/spot/v1/en/#transfer-asset-from-spot-trading-account-to-cross-margin-account-cross
6205
- :see: https://huobiapi.github.io/docs/spot/v1/en/#transfer-asset-from-spot-trading-account-to-isolated-margin-account-isolated
6206
- :see: https://huobiapi.github.io/docs/spot/v1/en/#transfer-asset-from-cross-margin-account-to-spot-trading-account-cross
6207
- :see: https://huobiapi.github.io/docs/spot/v1/en/#transfer-asset-from-isolated-margin-account-to-spot-trading-account-isolated
6267
+
6268
+ https://huobiapi.github.io/docs/dm/v1/en/#transfer-margin-between-spot-account-and-future-account
6269
+ https://huobiapi.github.io/docs/spot/v1/en/#transfer-fund-between-spot-account-and-future-contract-account
6270
+ https://huobiapi.github.io/docs/usdt_swap/v1/en/#general-transfer-margin-between-spot-account-and-usdt-margined-contracts-account
6271
+ https://huobiapi.github.io/docs/spot/v1/en/#transfer-asset-from-spot-trading-account-to-cross-margin-account-cross
6272
+ https://huobiapi.github.io/docs/spot/v1/en/#transfer-asset-from-spot-trading-account-to-isolated-margin-account-isolated
6273
+ https://huobiapi.github.io/docs/spot/v1/en/#transfer-asset-from-cross-margin-account-to-spot-trading-account-cross
6274
+ https://huobiapi.github.io/docs/spot/v1/en/#transfer-asset-from-isolated-margin-account-to-spot-trading-account-isolated
6275
+
6208
6276
  :param str code: unified currency code
6209
6277
  :param float amount: amount to transfer
6210
6278
  :param str fromAccount: account to transfer from 'spot', 'future', 'swap'
@@ -6280,7 +6348,9 @@ class htx(Exchange, ImplicitAPI):
6280
6348
  async def fetch_isolated_borrow_rates(self, params={}) -> IsolatedBorrowRates:
6281
6349
  """
6282
6350
  fetch the borrow interest rates of all currencies
6283
- :see: https://huobiapi.github.io/docs/spot/v1/en/#get-loan-interest-rate-and-quota-isolated
6351
+
6352
+ https://huobiapi.github.io/docs/spot/v1/en/#get-loan-interest-rate-and-quota-isolated
6353
+
6284
6354
  :param dict [params]: extra parameters specific to the exchange API endpoint
6285
6355
  :returns dict: a list of `isolated borrow rate structures <https://docs.ccxt.com/#/?id=isolated-borrow-rate-structure>`
6286
6356
  """
@@ -6363,8 +6433,10 @@ class htx(Exchange, ImplicitAPI):
6363
6433
 
6364
6434
  async def fetch_funding_rate_history(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
6365
6435
  """
6366
- :see: https://huobiapi.github.io/docs/usdt_swap/v1/en/#general-query-historical-funding-rate
6367
- :see: https://huobiapi.github.io/docs/coin_margined_swap/v1/en/#query-historical-funding-rate
6436
+
6437
+ https://huobiapi.github.io/docs/usdt_swap/v1/en/#general-query-historical-funding-rate
6438
+ https://huobiapi.github.io/docs/coin_margined_swap/v1/en/#query-historical-funding-rate
6439
+
6368
6440
  fetches historical funding rate prices
6369
6441
  :param str symbol: unified symbol of the market to fetch the funding rate history for
6370
6442
  :param int [since]: not used by huobi, but filtered internally by ccxt
@@ -6491,8 +6563,10 @@ class htx(Exchange, ImplicitAPI):
6491
6563
  async def fetch_funding_rate(self, symbol: str, params={}) -> FundingRate:
6492
6564
  """
6493
6565
  fetch the current funding rate
6494
- :see: https://huobiapi.github.io/docs/coin_margined_swap/v1/en/#query-funding-rate
6495
- :see: https://huobiapi.github.io/docs/usdt_swap/v1/en/#general-query-funding-rate
6566
+
6567
+ https://huobiapi.github.io/docs/coin_margined_swap/v1/en/#query-funding-rate
6568
+ https://huobiapi.github.io/docs/usdt_swap/v1/en/#general-query-funding-rate
6569
+
6496
6570
  :param str symbol: unified market symbol
6497
6571
  :param dict [params]: extra parameters specific to the exchange API endpoint
6498
6572
  :returns dict: a `funding rate structure <https://docs.ccxt.com/#/?id=funding-rate-structure>`
@@ -6530,8 +6604,10 @@ class htx(Exchange, ImplicitAPI):
6530
6604
  async def fetch_funding_rates(self, symbols: Strings = None, params={}) -> FundingRates:
6531
6605
  """
6532
6606
  fetch the funding rate for multiple markets
6533
- :see: https://huobiapi.github.io/docs/usdt_swap/v1/en/#general-query-a-batch-of-funding-rate
6534
- :see: https://huobiapi.github.io/docs/coin_margined_swap/v1/en/#query-a-batch-of-funding-rate
6607
+
6608
+ https://huobiapi.github.io/docs/usdt_swap/v1/en/#general-query-a-batch-of-funding-rate
6609
+ https://huobiapi.github.io/docs/coin_margined_swap/v1/en/#query-a-batch-of-funding-rate
6610
+
6535
6611
  :param str[]|None symbols: list of unified market symbols
6536
6612
  :param dict [params]: extra parameters specific to the exchange API endpoint
6537
6613
  :returns dict[]: a list of `funding rate structures <https://docs.ccxt.com/#/?id=funding-rates-structure>`, indexed by market symbols
@@ -6578,8 +6654,10 @@ class htx(Exchange, ImplicitAPI):
6578
6654
  async def fetch_borrow_interest(self, code: Str = None, symbol: Str = None, since: Int = None, limit: Int = None, params={}) -> List[BorrowInterest]:
6579
6655
  """
6580
6656
  fetch the interest owed by the user for borrowing currency for margin trading
6581
- :see: https://huobiapi.github.io/docs/spot/v1/en/#search-past-margin-orders-cross
6582
- :see: https://huobiapi.github.io/docs/spot/v1/en/#search-past-margin-orders-isolated
6657
+
6658
+ https://huobiapi.github.io/docs/spot/v1/en/#search-past-margin-orders-cross
6659
+ https://huobiapi.github.io/docs/spot/v1/en/#search-past-margin-orders-isolated
6660
+
6583
6661
  :param str code: unified currency code
6584
6662
  :param str symbol: unified market symbol when fetch interest in isolated markets
6585
6663
  :param int [since]: the earliest time in ms to fetch borrrow interest for
@@ -6827,9 +6905,11 @@ class htx(Exchange, ImplicitAPI):
6827
6905
  async def fetch_funding_history(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
6828
6906
  """
6829
6907
  fetch the history of funding payments paid and received on self account
6830
- :see: https://huobiapi.github.io/docs/usdt_swap/v1/en/#general-query-account-financial-records-via-multiple-fields-new # linear swaps
6831
- :see: https://huobiapi.github.io/docs/dm/v1/en/#query-financial-records-via-multiple-fields-new # coin-m futures
6832
- :see: https://huobiapi.github.io/docs/coin_margined_swap/v1/en/#query-financial-records-via-multiple-fields-new # coin-m swaps
6908
+
6909
+ https://huobiapi.github.io/docs/usdt_swap/v1/en/#general-query-account-financial-records-via-multiple-fields-new # linear swaps
6910
+ https://huobiapi.github.io/docs/dm/v1/en/#query-financial-records-via-multiple-fields-new # coin-m futures
6911
+ https://huobiapi.github.io/docs/coin_margined_swap/v1/en/#query-financial-records-via-multiple-fields-new # coin-m swaps
6912
+
6833
6913
  :param str symbol: unified market symbol
6834
6914
  :param int [since]: the earliest time in ms to fetch funding history for
6835
6915
  :param int [limit]: the maximum number of funding history structures to retrieve
@@ -6909,10 +6989,12 @@ class htx(Exchange, ImplicitAPI):
6909
6989
  async def set_leverage(self, leverage: Int, symbol: Str = None, params={}):
6910
6990
  """
6911
6991
  set the level of leverage for a market
6912
- :see: https://huobiapi.github.io/docs/usdt_swap/v1/en/#isolated-switch-leverage
6913
- :see: https://huobiapi.github.io/docs/usdt_swap/v1/en/#cross-switch-leverage
6914
- :see: https://huobiapi.github.io/docs/coin_margined_swap/v1/en/#switch-leverage
6915
- :see: https://huobiapi.github.io/docs/dm/v1/en/#switch-leverage # Coin-m futures
6992
+
6993
+ https://huobiapi.github.io/docs/usdt_swap/v1/en/#isolated-switch-leverage
6994
+ https://huobiapi.github.io/docs/usdt_swap/v1/en/#cross-switch-leverage
6995
+ https://huobiapi.github.io/docs/coin_margined_swap/v1/en/#switch-leverage
6996
+ https://huobiapi.github.io/docs/dm/v1/en/#switch-leverage # Coin-m futures
6997
+
6916
6998
  :param float leverage: the rate of leverage
6917
6999
  :param str symbol: unified market symbol
6918
7000
  :param dict [params]: extra parameters specific to the exchange API endpoint
@@ -7098,10 +7180,12 @@ class htx(Exchange, ImplicitAPI):
7098
7180
  async def fetch_positions(self, symbols: Strings = None, params={}):
7099
7181
  """
7100
7182
  fetch all open positions
7101
- :see: https://huobiapi.github.io/docs/usdt_swap/v1/en/#cross-query-user-39-s-position-information
7102
- :see: https://huobiapi.github.io/docs/usdt_swap/v1/en/#isolated-query-user-s-position-information
7103
- :see: https://huobiapi.github.io/docs/coin_margined_swap/v1/en/#query-user-s-position-information
7104
- :see: https://huobiapi.github.io/docs/dm/v1/en/#query-user-s-position-information
7183
+
7184
+ https://huobiapi.github.io/docs/usdt_swap/v1/en/#cross-query-user-39-s-position-information
7185
+ https://huobiapi.github.io/docs/usdt_swap/v1/en/#isolated-query-user-s-position-information
7186
+ https://huobiapi.github.io/docs/coin_margined_swap/v1/en/#query-user-s-position-information
7187
+ https://huobiapi.github.io/docs/dm/v1/en/#query-user-s-position-information
7188
+
7105
7189
  :param str[] [symbols]: list of unified market symbols
7106
7190
  :param dict [params]: extra parameters specific to the exchange API endpoint
7107
7191
  :param str [params.subType]: 'linear' or 'inverse'
@@ -7232,10 +7316,12 @@ class htx(Exchange, ImplicitAPI):
7232
7316
  async def fetch_position(self, symbol: str, params={}):
7233
7317
  """
7234
7318
  fetch data on a single open contract trade position
7235
- :see: https://huobiapi.github.io/docs/usdt_swap/v1/en/#cross-query-assets-and-positions
7236
- :see: https://huobiapi.github.io/docs/usdt_swap/v1/en/#isolated-query-assets-and-positions
7237
- :see: https://huobiapi.github.io/docs/coin_margined_swap/v1/en/#query-assets-and-positions
7238
- :see: https://huobiapi.github.io/docs/dm/v1/en/#query-assets-and-positions
7319
+
7320
+ https://huobiapi.github.io/docs/usdt_swap/v1/en/#cross-query-assets-and-positions
7321
+ https://huobiapi.github.io/docs/usdt_swap/v1/en/#isolated-query-assets-and-positions
7322
+ https://huobiapi.github.io/docs/coin_margined_swap/v1/en/#query-assets-and-positions
7323
+ https://huobiapi.github.io/docs/dm/v1/en/#query-assets-and-positions
7324
+
7239
7325
  :param str symbol: unified market symbol of the market the position is held in, default is None
7240
7326
  :param dict [params]: extra parameters specific to the exchange API endpoint
7241
7327
  :returns dict: a `position structure <https://docs.ccxt.com/#/?id=position-structure>`
@@ -7538,7 +7624,9 @@ class htx(Exchange, ImplicitAPI):
7538
7624
  async def fetch_ledger(self, code: Str = None, since: Int = None, limit: Int = None, params={}) -> List[LedgerEntry]:
7539
7625
  """
7540
7626
  fetch the history of changes, actions done by the user or operations that altered the balance of the user
7541
- :see: https://huobiapi.github.io/docs/spot/v1/en/#get-account-history
7627
+
7628
+ https://huobiapi.github.io/docs/spot/v1/en/#get-account-history
7629
+
7542
7630
  :param str [code]: unified currency code, default is None
7543
7631
  :param int [since]: timestamp in ms of the earliest ledger entry, default is None
7544
7632
  :param int [limit]: max number of ledger entries to return, default is None
@@ -7646,92 +7734,41 @@ class htx(Exchange, ImplicitAPI):
7646
7734
  # ]
7647
7735
  # }
7648
7736
  #
7649
- data = self.safe_list(response, 'data')
7737
+ data = self.safe_list(response, 'data', [])
7650
7738
  return self.parse_leverage_tiers(data, symbols, 'contract_code')
7651
7739
 
7652
- async def fetch_market_leverage_tiers(self, symbol: str, params={}) -> List[LeverageTier]:
7653
- """
7654
- retrieve information on the maximum leverage, and maintenance margin for trades of varying trade sizes for a single market
7655
- :param str symbol: unified market symbol
7656
- :param dict [params]: extra parameters specific to the exchange API endpoint
7657
- :returns dict: a `leverage tiers structure <https://docs.ccxt.com/#/?id=leverage-tiers-structure>`
7658
- """
7659
- await self.load_markets()
7660
- request: dict = {}
7661
- if symbol is not None:
7662
- market = self.market(symbol)
7663
- if not market['contract']:
7664
- raise BadRequest(self.id + ' fetchMarketLeverageTiers() symbol supports contract markets only')
7665
- request['contract_code'] = market['id']
7666
- response = await self.contractPublicGetLinearSwapApiV1SwapAdjustfactor(self.extend(request, params))
7667
- #
7668
- # {
7669
- # "status": "ok",
7670
- # "data": [
7671
- # {
7672
- # "symbol": "MANA",
7673
- # "contract_code": "MANA-USDT",
7674
- # "margin_mode": "isolated",
7675
- # "trade_partition": "USDT",
7676
- # "list": [
7677
- # {
7678
- # "lever_rate": 75,
7679
- # "ladders": [
7680
- # {
7681
- # "ladder": 0,
7682
- # "min_size": 0,
7683
- # "max_size": 999,
7684
- # "adjust_factor": 0.7
7685
- # },
7686
- # ...
7687
- # ]
7688
- # }
7689
- # ...
7690
- # ]
7691
- # },
7692
- # ...
7693
- # ]
7694
- # }
7695
- #
7696
- data = self.safe_value(response, 'data')
7697
- tiers = self.parse_leverage_tiers(data, [symbol], 'contract_code')
7698
- return self.safe_value(tiers, symbol)
7699
-
7700
- def parse_leverage_tiers(self, response, symbols: Strings = None, marketIdKey=None):
7701
- result: dict = {}
7702
- for i in range(0, len(response)):
7703
- item = response[i]
7704
- list = self.safe_value(item, 'list', [])
7705
- tiers = []
7706
- currency = self.safe_string(item, 'trade_partition')
7707
- id = self.safe_string(item, marketIdKey)
7708
- symbol = self.safe_symbol(id)
7709
- if self.in_array(symbol, symbols):
7710
- for j in range(0, len(list)):
7711
- obj = list[j]
7712
- leverage = self.safe_string(obj, 'lever_rate')
7713
- ladders = self.safe_value(obj, 'ladders', [])
7714
- for k in range(0, len(ladders)):
7715
- bracket = ladders[k]
7716
- adjustFactor = self.safe_string(bracket, 'adjust_factor')
7717
- tiers.append({
7718
- 'tier': self.safe_integer(bracket, 'ladder'),
7719
- 'currency': self.safe_currency_code(currency),
7720
- 'minNotional': self.safe_number(bracket, 'min_size'),
7721
- 'maxNotional': self.safe_number(bracket, 'max_size'),
7722
- 'maintenanceMarginRate': self.parse_number(Precise.string_div(adjustFactor, leverage)),
7723
- 'maxLeverage': self.parse_number(leverage),
7724
- 'info': bracket,
7725
- })
7726
- result[symbol] = tiers
7727
- return result
7740
+ def parse_market_leverage_tiers(self, info, market: Market = None) -> List[LeverageTier]:
7741
+ currencyId = self.safe_string(info, 'trade_partition')
7742
+ marketId = self.safe_string(info, 'contract_code')
7743
+ tiers = []
7744
+ brackets = self.safe_list(info, 'list', [])
7745
+ for i in range(0, len(brackets)):
7746
+ item = brackets[i]
7747
+ leverage = self.safe_string(item, 'lever_rate')
7748
+ ladders = self.safe_list(item, 'ladders', [])
7749
+ for k in range(0, len(ladders)):
7750
+ bracket = ladders[k]
7751
+ adjustFactor = self.safe_string(bracket, 'adjust_factor')
7752
+ tiers.append({
7753
+ 'tier': self.safe_integer(bracket, 'ladder'),
7754
+ 'symbol': self.safe_symbol(marketId, market, None, 'swap'),
7755
+ 'currency': self.safe_currency_code(currencyId),
7756
+ 'minNotional': self.safe_number(bracket, 'min_size'),
7757
+ 'maxNotional': self.safe_number(bracket, 'max_size'),
7758
+ 'maintenanceMarginRate': self.parse_number(Precise.string_div(adjustFactor, leverage)),
7759
+ 'maxLeverage': self.parse_number(leverage),
7760
+ 'info': bracket,
7761
+ })
7762
+ return tiers
7728
7763
 
7729
7764
  async def fetch_open_interest_history(self, symbol: str, timeframe='1h', since: Int = None, limit: Int = None, params={}):
7730
7765
  """
7731
7766
  Retrieves the open interest history of a currency
7732
- :see: https://huobiapi.github.io/docs/dm/v1/en/#query-information-on-open-interest
7733
- :see: https://huobiapi.github.io/docs/coin_margined_swap/v1/en/#query-information-on-open-interest
7734
- :see: https://huobiapi.github.io/docs/usdt_swap/v1/en/#general-query-information-on-open-interest
7767
+
7768
+ https://huobiapi.github.io/docs/dm/v1/en/#query-information-on-open-interest
7769
+ https://huobiapi.github.io/docs/coin_margined_swap/v1/en/#query-information-on-open-interest
7770
+ https://huobiapi.github.io/docs/usdt_swap/v1/en/#general-query-information-on-open-interest
7771
+
7735
7772
  :param str symbol: Unified CCXT market symbol
7736
7773
  :param str timeframe: '1h', '4h', '12h', or '1d'
7737
7774
  :param int [since]: Not used by huobi api, but response parsed by CCXT
@@ -7841,9 +7878,11 @@ class htx(Exchange, ImplicitAPI):
7841
7878
  async def fetch_open_interest(self, symbol: str, params={}):
7842
7879
  """
7843
7880
  Retrieves the open interest of a currency
7844
- :see: https://huobiapi.github.io/docs/dm/v1/en/#get-contract-open-interest-information
7845
- :see: https://huobiapi.github.io/docs/coin_margined_swap/v1/en/#get-swap-open-interest-information
7846
- :see: https://huobiapi.github.io/docs/usdt_swap/v1/en/#general-get-swap-open-interest-information
7881
+
7882
+ https://huobiapi.github.io/docs/dm/v1/en/#get-contract-open-interest-information
7883
+ https://huobiapi.github.io/docs/coin_margined_swap/v1/en/#get-swap-open-interest-information
7884
+ https://huobiapi.github.io/docs/usdt_swap/v1/en/#general-get-swap-open-interest-information
7885
+
7847
7886
  :param str symbol: Unified CCXT market symbol
7848
7887
  :param dict [params]: exchange specific parameters
7849
7888
  :returns dict} an open interest structure{@link https://docs.ccxt.com/#/?id=open-interest-structure:
@@ -8008,8 +8047,10 @@ class htx(Exchange, ImplicitAPI):
8008
8047
  async def borrow_isolated_margin(self, symbol: str, code: str, amount: float, params={}):
8009
8048
  """
8010
8049
  create a loan to borrow margin
8011
- :see: https://huobiapi.github.io/docs/spot/v1/en/#request-a-margin-loan-isolated
8012
- :see: https://huobiapi.github.io/docs/spot/v1/en/#request-a-margin-loan-cross
8050
+
8051
+ https://huobiapi.github.io/docs/spot/v1/en/#request-a-margin-loan-isolated
8052
+ https://huobiapi.github.io/docs/spot/v1/en/#request-a-margin-loan-cross
8053
+
8013
8054
  :param str symbol: unified market symbol, required for isolated margin
8014
8055
  :param str code: unified currency code of the currency to borrow
8015
8056
  :param float amount: the amount to borrow
@@ -8041,8 +8082,10 @@ class htx(Exchange, ImplicitAPI):
8041
8082
  async def borrow_cross_margin(self, code: str, amount: float, params={}):
8042
8083
  """
8043
8084
  create a loan to borrow margin
8044
- :see: https://huobiapi.github.io/docs/spot/v1/en/#request-a-margin-loan-isolated
8045
- :see: https://huobiapi.github.io/docs/spot/v1/en/#request-a-margin-loan-cross
8085
+
8086
+ https://huobiapi.github.io/docs/spot/v1/en/#request-a-margin-loan-isolated
8087
+ https://huobiapi.github.io/docs/spot/v1/en/#request-a-margin-loan-cross
8088
+
8046
8089
  :param str code: unified currency code of the currency to borrow
8047
8090
  :param float amount: the amount to borrow
8048
8091
  :param dict [params]: extra parameters specific to the exchange API endpoint
@@ -8071,10 +8114,12 @@ class htx(Exchange, ImplicitAPI):
8071
8114
  async def repay_isolated_margin(self, symbol: str, code: str, amount, params={}):
8072
8115
  """
8073
8116
  repay borrowed margin and interest
8074
- :see: https://huobiapi.github.io/docs/spot/v1/en/#repay-margin-loan-cross-isolated
8117
+
8118
+ https://huobiapi.github.io/docs/spot/v1/en/#repay-margin-loan-cross-isolated
8119
+
8120
+ :param str symbol: unified market symbol
8075
8121
  :param str code: unified currency code of the currency to repay
8076
8122
  :param float amount: the amount to repay
8077
- :param str symbol: unified market symbol
8078
8123
  :param dict [params]: extra parameters specific to the exchange API endpoint
8079
8124
  :returns dict: a `margin loan structure <https://docs.ccxt.com/#/?id=margin-loan-structure>`
8080
8125
  """
@@ -8109,7 +8154,9 @@ class htx(Exchange, ImplicitAPI):
8109
8154
  async def repay_cross_margin(self, code: str, amount, params={}):
8110
8155
  """
8111
8156
  repay borrowed margin and interest
8112
- :see: https://huobiapi.github.io/docs/spot/v1/en/#repay-margin-loan-cross-isolated
8157
+
8158
+ https://huobiapi.github.io/docs/spot/v1/en/#repay-margin-loan-cross-isolated
8159
+
8113
8160
  :param str code: unified currency code of the currency to repay
8114
8161
  :param float amount: the amount to repay
8115
8162
  :param dict [params]: extra parameters specific to the exchange API endpoint
@@ -8178,9 +8225,11 @@ class htx(Exchange, ImplicitAPI):
8178
8225
  async def fetch_settlement_history(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
8179
8226
  """
8180
8227
  Fetches historical settlement records
8181
- :see: https://huobiapi.github.io/docs/dm/v1/en/#query-historical-settlement-records-of-the-platform-interface
8182
- :see: https://huobiapi.github.io/docs/coin_margined_swap/v1/en/#query-historical-settlement-records-of-the-platform-interface
8183
- :see: https://huobiapi.github.io/docs/usdt_swap/v1/en/#general-query-historical-settlement-records-of-the-platform-interface
8228
+
8229
+ https://huobiapi.github.io/docs/dm/v1/en/#query-historical-settlement-records-of-the-platform-interface
8230
+ https://huobiapi.github.io/docs/coin_margined_swap/v1/en/#query-historical-settlement-records-of-the-platform-interface
8231
+ https://huobiapi.github.io/docs/usdt_swap/v1/en/#general-query-historical-settlement-records-of-the-platform-interface
8232
+
8184
8233
  :param str symbol: unified symbol of the market to fetch the settlement history for
8185
8234
  :param int [since]: timestamp in ms, value range = current time - 90 days,default = current time - 90 days
8186
8235
  :param int [limit]: page items, default 20, shall not exceed 50
@@ -8274,7 +8323,9 @@ class htx(Exchange, ImplicitAPI):
8274
8323
  async def fetch_deposit_withdraw_fees(self, codes: Strings = None, params={}):
8275
8324
  """
8276
8325
  fetch deposit and withdraw fees
8277
- :see: https://huobiapi.github.io/docs/spot/v1/en/#get-all-supported-currencies-v2
8326
+
8327
+ https://huobiapi.github.io/docs/spot/v1/en/#get-all-supported-currencies-v2
8328
+
8278
8329
  :param str[]|None codes: list of unified currency codes
8279
8330
  :param dict [params]: extra parameters specific to the exchange API endpoint
8280
8331
  :returns dict[]: a list of `fees structures <https://docs.ccxt.com/#/?id=fee-structure>`
@@ -8475,9 +8526,11 @@ class htx(Exchange, ImplicitAPI):
8475
8526
  async def fetch_liquidations(self, symbol: str, since: Int = None, limit: Int = None, params={}):
8476
8527
  """
8477
8528
  retrieves the public liquidations of a trading pair
8478
- :see: https://huobiapi.github.io/docs/usdt_swap/v1/en/#general-query-liquidation-orders-new
8479
- :see: https://huobiapi.github.io/docs/coin_margined_swap/v1/en/#query-liquidation-orders-new
8480
- :see: https://huobiapi.github.io/docs/dm/v1/en/#query-liquidation-order-information-new
8529
+
8530
+ https://huobiapi.github.io/docs/usdt_swap/v1/en/#general-query-liquidation-orders-new
8531
+ https://huobiapi.github.io/docs/coin_margined_swap/v1/en/#query-liquidation-orders-new
8532
+ https://huobiapi.github.io/docs/dm/v1/en/#query-liquidation-order-information-new
8533
+
8481
8534
  :param str symbol: unified CCXT market symbol
8482
8535
  :param int [since]: the earliest time in ms to fetch liquidations for
8483
8536
  :param int [limit]: the maximum number of liquidation structures to retrieve
@@ -8567,17 +8620,19 @@ class htx(Exchange, ImplicitAPI):
8567
8620
  async def close_position(self, symbol: str, side: OrderSide = None, params={}) -> Order:
8568
8621
  """
8569
8622
  closes open positions for a contract market, requires 'amount' in params, unlike other exchanges
8570
- :see: https://huobiapi.github.io/docs/usdt_swap/v1/en/#isolated-place-lightning-close-order # USDT-M(isolated)
8571
- :see: https://huobiapi.github.io/docs/usdt_swap/v1/en/#cross-place-lightning-close-position # USDT-M(cross)
8572
- :see: https://huobiapi.github.io/docs/coin_margined_swap/v1/en/#place-lightning-close-order # Coin-M swap
8573
- :see: https://huobiapi.github.io/docs/dm/v1/en/#place-flash-close-order # Coin-M futures
8623
+
8624
+ https://huobiapi.github.io/docs/usdt_swap/v1/en/#isolated-place-lightning-close-order # USDT-M(isolated)
8625
+ https://huobiapi.github.io/docs/usdt_swap/v1/en/#cross-place-lightning-close-position # USDT-M(cross)
8626
+ https://huobiapi.github.io/docs/coin_margined_swap/v1/en/#place-lightning-close-order # Coin-M swap
8627
+ https://huobiapi.github.io/docs/dm/v1/en/#place-flash-close-order # Coin-M futures
8628
+
8574
8629
  :param str symbol: unified CCXT market symbol
8575
8630
  :param str side: 'buy' or 'sell', the side of the closing order, opposite side side
8576
8631
  :param dict [params]: extra parameters specific to the okx api endpoint
8577
8632
  :param str [params.clientOrderId]: client needs to provide unique API and have to maintain the API themselves afterwards. [1, 9223372036854775807]
8578
8633
  :param dict [params.marginMode]: 'cross' or 'isolated', required for linear markets
8579
- *
8580
- * EXCHANGE SPECIFIC PARAMETERS
8634
+
8635
+ EXCHANGE SPECIFIC PARAMETERS
8581
8636
  :param number [params.amount]: order quantity
8582
8637
  :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
8583
8638
  :returns dict: `an order structure <https://docs.ccxt.com/#/?id=position-structure>`
@@ -8618,8 +8673,10 @@ class htx(Exchange, ImplicitAPI):
8618
8673
  async def set_position_mode(self, hedged: bool, symbol: Str = None, params={}):
8619
8674
  """
8620
8675
  set hedged to True or False
8621
- :see: https://huobiapi.github.io/docs/usdt_swap/v1/en/#isolated-switch-position-mode
8622
- :see: https://huobiapi.github.io/docs/usdt_swap/v1/en/#cross-switch-position-mode
8676
+
8677
+ https://huobiapi.github.io/docs/usdt_swap/v1/en/#isolated-switch-position-mode
8678
+ https://huobiapi.github.io/docs/usdt_swap/v1/en/#cross-switch-position-mode
8679
+
8623
8680
  :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
8624
8681
  :param str [symbol]: unified market symbol, required for isolated margin mode
8625
8682
  :param dict [params]: extra parameters specific to the exchange API endpoint