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/xt.py CHANGED
@@ -7,7 +7,7 @@ from ccxt.async_support.base.exchange import Exchange
7
7
  from ccxt.abstract.xt import ImplicitAPI
8
8
  import asyncio
9
9
  import hashlib
10
- from ccxt.base.types import Currencies, Currency, DepositAddress, Int, LedgerEntry, LeverageTier, MarginModification, Market, Num, Order, OrderSide, OrderType, Str, Tickers, FundingRate, Transaction, TransferEntry
10
+ from ccxt.base.types import Currencies, Currency, DepositAddress, Int, LedgerEntry, LeverageTier, LeverageTiers, MarginModification, Market, Num, Order, OrderSide, OrderType, Str, Tickers, FundingRate, Transaction, TransferEntry
11
11
  from typing import List
12
12
  from ccxt.base.errors import ExchangeError
13
13
  from ccxt.base.errors import AuthenticationError
@@ -696,7 +696,9 @@ class xt(Exchange, ImplicitAPI):
696
696
  async def fetch_time(self, params={}):
697
697
  """
698
698
  fetches the current integer timestamp in milliseconds from the xt server
699
- :see: https://doc.xt.com/#market1serverInfo
699
+
700
+ https://doc.xt.com/#market1serverInfo
701
+
700
702
  :param dict params: extra parameters specific to the xt api endpoint
701
703
  :returns int: the current integer timestamp in milliseconds from the xt server
702
704
  """
@@ -717,7 +719,9 @@ class xt(Exchange, ImplicitAPI):
717
719
  async def fetch_currencies(self, params={}) -> Currencies:
718
720
  """
719
721
  fetches all available currencies on an exchange
720
- :see: https://doc.xt.com/#deposit_withdrawalsupportedCurrenciesGet
722
+
723
+ https://doc.xt.com/#deposit_withdrawalsupportedCurrenciesGet
724
+
721
725
  :param dict params: extra parameters specific to the xt api endpoint
722
726
  :returns dict: an associative dictionary of currencies
723
727
  """
@@ -864,8 +868,10 @@ class xt(Exchange, ImplicitAPI):
864
868
  async def fetch_markets(self, params={}) -> List[Market]:
865
869
  """
866
870
  retrieves data on all markets for xt
867
- :see: https://doc.xt.com/#market2symbol
868
- :see: https://doc.xt.com/#futures_quotesgetSymbols
871
+
872
+ https://doc.xt.com/#market2symbol
873
+ https://doc.xt.com/#futures_quotesgetSymbols
874
+
869
875
  :param dict params: extra parameters specific to the xt api endpoint
870
876
  :returns dict[]: an array of objects representing market data
871
877
  """
@@ -1259,8 +1265,10 @@ class xt(Exchange, ImplicitAPI):
1259
1265
  async def fetch_ohlcv(self, symbol: str, timeframe='1m', since: Int = None, limit: Int = None, params={}):
1260
1266
  """
1261
1267
  fetches historical candlestick data containing the open, high, low, and close price, and the volume of a market
1262
- :see: https://doc.xt.com/#market4kline
1263
- :see: https://doc.xt.com/#futures_quotesgetKLine
1268
+
1269
+ https://doc.xt.com/#market4kline
1270
+ https://doc.xt.com/#futures_quotesgetKLine
1271
+
1264
1272
  :param str symbol: unified symbol of the market to fetch OHLCV data for
1265
1273
  :param str timeframe: the length of time each candle represents
1266
1274
  :param int [since]: timestamp in ms of the earliest candle to fetch
@@ -1369,8 +1377,10 @@ class xt(Exchange, ImplicitAPI):
1369
1377
 
1370
1378
  async def fetch_order_book(self, symbol: str, limit: Int = None, params={}):
1371
1379
  """
1372
- :see: https://doc.xt.com/#market3depth
1373
- :see: https://doc.xt.com/#futures_quotesgetDepth
1380
+
1381
+ https://doc.xt.com/#market3depth
1382
+ https://doc.xt.com/#futures_quotesgetDepth
1383
+
1374
1384
  fetches information on open orders with bid(buy) and ask(sell) prices, volumes and other data
1375
1385
  :param str symbol: unified market symbol to fetch the order book for
1376
1386
  :param int [limit]: the maximum amount of order book entries to return
@@ -1455,8 +1465,10 @@ class xt(Exchange, ImplicitAPI):
1455
1465
  async def fetch_ticker(self, symbol: str, params={}):
1456
1466
  """
1457
1467
  fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
1458
- :see: https://doc.xt.com/#market10ticker24h
1459
- :see: https://doc.xt.com/#futures_quotesgetAggTicker
1468
+
1469
+ https://doc.xt.com/#market10ticker24h
1470
+ https://doc.xt.com/#futures_quotesgetAggTicker
1471
+
1460
1472
  :param str symbol: unified market symbol to fetch the ticker for
1461
1473
  :param dict params: extra parameters specific to the xt api endpoint
1462
1474
  :returns dict: a `ticker structure <https://docs.ccxt.com/en/latest/manual.html#ticker-structure>`
@@ -1527,8 +1539,10 @@ class xt(Exchange, ImplicitAPI):
1527
1539
  async def fetch_tickers(self, symbols: List[str] = None, params={}) -> Tickers:
1528
1540
  """
1529
1541
  fetches price tickers for multiple markets, statistical calculations with the information calculated over the past 24 hours each market
1530
- :see: https://doc.xt.com/#market10ticker24h
1531
- :see: https://doc.xt.com/#futures_quotesgetAggTickers
1542
+
1543
+ https://doc.xt.com/#market10ticker24h
1544
+ https://doc.xt.com/#futures_quotesgetAggTickers
1545
+
1532
1546
  :param str [symbols]: unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned
1533
1547
  :param dict params: extra parameters specific to the xt api endpoint
1534
1548
  :returns dict: an array of `ticker structures <https://docs.ccxt.com/en/latest/manual.html#ticker-structure>`
@@ -1609,7 +1623,9 @@ class xt(Exchange, ImplicitAPI):
1609
1623
  async def fetch_bids_asks(self, symbols: List[str] = None, params={}):
1610
1624
  """
1611
1625
  fetches the bid and ask price and volume for multiple markets
1612
- :see: https://doc.xt.com/#market9tickerBook
1626
+
1627
+ https://doc.xt.com/#market9tickerBook
1628
+
1613
1629
  :param str [symbols]: unified symbols of the markets to fetch the bids and asks for, all markets are returned if not assigned
1614
1630
  :param dict params: extra parameters specific to the xt api endpoint
1615
1631
  :returns dict: a dictionary of `ticker structures <https://docs.ccxt.com/en/latest/manual.html#ticker-structure>`
@@ -1728,8 +1744,10 @@ class xt(Exchange, ImplicitAPI):
1728
1744
  async def fetch_trades(self, symbol: str, since: Int = None, limit: Int = None, params={}):
1729
1745
  """
1730
1746
  get the list of most recent trades for a particular symbol
1731
- :see: https://doc.xt.com/#market5tradeRecent
1732
- :see: https://doc.xt.com/#futures_quotesgetDeal
1747
+
1748
+ https://doc.xt.com/#market5tradeRecent
1749
+ https://doc.xt.com/#futures_quotesgetDeal
1750
+
1733
1751
  :param str symbol: unified market symbol to fetch trades for
1734
1752
  :param int [since]: timestamp in ms of the earliest trade to fetch
1735
1753
  :param int [limit]: the maximum amount of trades to fetch
@@ -1795,8 +1813,10 @@ class xt(Exchange, ImplicitAPI):
1795
1813
  async def fetch_my_trades(self, symbol: str = None, since: Int = None, limit: Int = None, params={}):
1796
1814
  """
1797
1815
  fetch all trades made by the user
1798
- :see: https://doc.xt.com/#tradetradeGet
1799
- :see: https://doc.xt.com/#futures_ordergetTrades
1816
+
1817
+ https://doc.xt.com/#tradetradeGet
1818
+ https://doc.xt.com/#futures_ordergetTrades
1819
+
1800
1820
  :param str [symbol]: unified market symbol to fetch trades for
1801
1821
  :param int [since]: timestamp in ms of the earliest trade to fetch
1802
1822
  :param int [limit]: the maximum amount of trades to fetch
@@ -2060,8 +2080,10 @@ class xt(Exchange, ImplicitAPI):
2060
2080
  async def fetch_balance(self, params={}):
2061
2081
  """
2062
2082
  query for balance and get the amount of funds available for trading or funds locked in orders
2063
- :see: https://doc.xt.com/#balancebalancesGet
2064
- :see: https://doc.xt.com/#futures_usergetBalances
2083
+
2084
+ https://doc.xt.com/#balancebalancesGet
2085
+ https://doc.xt.com/#futures_usergetBalances
2086
+
2065
2087
  :param dict params: extra parameters specific to the xt api endpoint
2066
2088
  :returns dict: a `balance structure <https://docs.ccxt.com/en/latest/manual.html?#balance-structure>`
2067
2089
  """
@@ -2177,7 +2199,9 @@ class xt(Exchange, ImplicitAPI):
2177
2199
 
2178
2200
  async def create_market_buy_order_with_cost(self, symbol: str, cost: float, params={}):
2179
2201
  """
2180
- :see: https://doc.xt.com/#orderorderPost
2202
+
2203
+ https://doc.xt.com/#orderorderPost
2204
+
2181
2205
  create a market buy order by providing the symbol and cost
2182
2206
  :param str symbol: unified symbol of the market to create an order in
2183
2207
  :param float cost: how much you want to trade in units of the quote currency
@@ -2193,10 +2217,12 @@ class xt(Exchange, ImplicitAPI):
2193
2217
  async def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: Num = None, params={}):
2194
2218
  """
2195
2219
  create a trade order
2196
- :see: https://doc.xt.com/#orderorderPost
2197
- :see: https://doc.xt.com/#futures_ordercreate
2198
- :see: https://doc.xt.com/#futures_entrustcreatePlan
2199
- :see: https://doc.xt.com/#futures_entrustcreateProfit
2220
+
2221
+ https://doc.xt.com/#orderorderPost
2222
+ https://doc.xt.com/#futures_ordercreate
2223
+ https://doc.xt.com/#futures_entrustcreatePlan
2224
+ https://doc.xt.com/#futures_entrustcreateProfit
2225
+
2200
2226
  :param str symbol: unified symbol of the market to create an order in
2201
2227
  :param str type: 'market' or 'limit'
2202
2228
  :param str side: 'buy' or 'sell'
@@ -2342,10 +2368,12 @@ class xt(Exchange, ImplicitAPI):
2342
2368
  async def fetch_order(self, id: str, symbol: str = None, params={}):
2343
2369
  """
2344
2370
  fetches information on an order made by the user
2345
- :see: https://doc.xt.com/#orderorderGet
2346
- :see: https://doc.xt.com/#futures_ordergetById
2347
- :see: https://doc.xt.com/#futures_entrustgetPlanById
2348
- :see: https://doc.xt.com/#futures_entrustgetProfitById
2371
+
2372
+ https://doc.xt.com/#orderorderGet
2373
+ https://doc.xt.com/#futures_ordergetById
2374
+ https://doc.xt.com/#futures_entrustgetPlanById
2375
+ https://doc.xt.com/#futures_entrustgetProfitById
2376
+
2349
2377
  :param str id: order id
2350
2378
  :param str [symbol]: unified symbol of the market the order was made in
2351
2379
  :param dict params: extra parameters specific to the xt api endpoint
@@ -2512,9 +2540,11 @@ class xt(Exchange, ImplicitAPI):
2512
2540
  async def fetch_orders(self, symbol: str = None, since: Int = None, limit: Int = None, params={}):
2513
2541
  """
2514
2542
  fetches information on multiple orders made by the user
2515
- :see: https://doc.xt.com/#orderhistoryOrderGet
2516
- :see: https://doc.xt.com/#futures_ordergetHistory
2517
- :see: https://doc.xt.com/#futures_entrustgetPlanHistory
2543
+
2544
+ https://doc.xt.com/#orderhistoryOrderGet
2545
+ https://doc.xt.com/#futures_ordergetHistory
2546
+ https://doc.xt.com/#futures_entrustgetPlanHistory
2547
+
2518
2548
  :param str [symbol]: unified market symbol of the market the orders were made in
2519
2549
  :param int [since]: timestamp in ms of the earliest order
2520
2550
  :param int [limit]: the maximum number of order structures to retrieve
@@ -2920,10 +2950,12 @@ class xt(Exchange, ImplicitAPI):
2920
2950
  async def fetch_open_orders(self, symbol: str = None, since: Int = None, limit: Int = None, params={}):
2921
2951
  """
2922
2952
  fetch all unfilled currently open orders
2923
- :see: https://doc.xt.com/#orderopenOrderGet
2924
- :see: https://doc.xt.com/#futures_ordergetOrders
2925
- :see: https://doc.xt.com/#futures_entrustgetPlan
2926
- :see: https://doc.xt.com/#futures_entrustgetProfit
2953
+
2954
+ https://doc.xt.com/#orderopenOrderGet
2955
+ https://doc.xt.com/#futures_ordergetOrders
2956
+ https://doc.xt.com/#futures_entrustgetPlan
2957
+ https://doc.xt.com/#futures_entrustgetProfit
2958
+
2927
2959
  :param str [symbol]: unified market symbol of the market the orders were made in
2928
2960
  :param int [since]: timestamp in ms of the earliest order
2929
2961
  :param int [limit]: the maximum number of open order structures to retrieve
@@ -2937,10 +2969,12 @@ class xt(Exchange, ImplicitAPI):
2937
2969
  async def fetch_closed_orders(self, symbol: str = None, since: Int = None, limit: Int = None, params={}):
2938
2970
  """
2939
2971
  fetches information on multiple closed orders made by the user
2940
- :see: https://doc.xt.com/#orderhistoryOrderGet
2941
- :see: https://doc.xt.com/#futures_ordergetOrders
2942
- :see: https://doc.xt.com/#futures_entrustgetPlan
2943
- :see: https://doc.xt.com/#futures_entrustgetProfit
2972
+
2973
+ https://doc.xt.com/#orderhistoryOrderGet
2974
+ https://doc.xt.com/#futures_ordergetOrders
2975
+ https://doc.xt.com/#futures_entrustgetPlan
2976
+ https://doc.xt.com/#futures_entrustgetProfit
2977
+
2944
2978
  :param str [symbol]: unified market symbol of the market the orders were made in
2945
2979
  :param int [since]: timestamp in ms of the earliest order
2946
2980
  :param int [limit]: the maximum number of order structures to retrieve
@@ -2954,10 +2988,12 @@ class xt(Exchange, ImplicitAPI):
2954
2988
  async def fetch_canceled_orders(self, symbol: str = None, since: Int = None, limit: Int = None, params={}):
2955
2989
  """
2956
2990
  fetches information on multiple canceled orders made by the user
2957
- :see: https://doc.xt.com/#orderhistoryOrderGet
2958
- :see: https://doc.xt.com/#futures_ordergetOrders
2959
- :see: https://doc.xt.com/#futures_entrustgetPlan
2960
- :see: https://doc.xt.com/#futures_entrustgetProfit
2991
+
2992
+ https://doc.xt.com/#orderhistoryOrderGet
2993
+ https://doc.xt.com/#futures_ordergetOrders
2994
+ https://doc.xt.com/#futures_entrustgetPlan
2995
+ https://doc.xt.com/#futures_entrustgetProfit
2996
+
2961
2997
  :param str [symbol]: unified market symbol of the market the orders were made in
2962
2998
  :param int [since]: timestamp in ms of the earliest order
2963
2999
  :param int [limit]: the maximum number of order structures to retrieve
@@ -2971,10 +3007,12 @@ class xt(Exchange, ImplicitAPI):
2971
3007
  async def cancel_order(self, id: str, symbol: str = None, params={}):
2972
3008
  """
2973
3009
  cancels an open order
2974
- :see: https://doc.xt.com/#orderorderDel
2975
- :see: https://doc.xt.com/#futures_ordercancel
2976
- :see: https://doc.xt.com/#futures_entrustcancelPlan
2977
- :see: https://doc.xt.com/#futures_entrustcancelProfit
3010
+
3011
+ https://doc.xt.com/#orderorderDel
3012
+ https://doc.xt.com/#futures_ordercancel
3013
+ https://doc.xt.com/#futures_entrustcancelPlan
3014
+ https://doc.xt.com/#futures_entrustcancelProfit
3015
+
2978
3016
  :param str id: order id
2979
3017
  :param str [symbol]: unified symbol of the market the order was made in
2980
3018
  :param dict params: extra parameters specific to the xt api endpoint
@@ -3046,10 +3084,12 @@ class xt(Exchange, ImplicitAPI):
3046
3084
  async def cancel_all_orders(self, symbol: str = None, params={}):
3047
3085
  """
3048
3086
  cancel all open orders in a market
3049
- :see: https://doc.xt.com/#orderopenOrderDel
3050
- :see: https://doc.xt.com/#futures_ordercancelBatch
3051
- :see: https://doc.xt.com/#futures_entrustcancelPlanBatch
3052
- :see: https://doc.xt.com/#futures_entrustcancelProfitBatch
3087
+
3088
+ https://doc.xt.com/#orderopenOrderDel
3089
+ https://doc.xt.com/#futures_ordercancelBatch
3090
+ https://doc.xt.com/#futures_entrustcancelPlanBatch
3091
+ https://doc.xt.com/#futures_entrustcancelProfitBatch
3092
+
3053
3093
  :param str [symbol]: unified market symbol of the market to cancel orders in
3054
3094
  :param dict params: extra parameters specific to the xt api endpoint
3055
3095
  :param bool [params.stop]: if the order is a stop trigger order or not
@@ -3117,7 +3157,9 @@ class xt(Exchange, ImplicitAPI):
3117
3157
  async def cancel_orders(self, ids: List[str], symbol: str = None, params={}) -> List[Order]:
3118
3158
  """
3119
3159
  cancel multiple orders
3120
- :see: https://doc.xt.com/#orderbatchOrderDel
3160
+
3161
+ https://doc.xt.com/#orderbatchOrderDel
3162
+
3121
3163
  :param str[] ids: order ids
3122
3164
  :param str [symbol]: unified market symbol of the market to cancel orders in
3123
3165
  :param dict params: extra parameters specific to the xt api endpoint
@@ -3329,7 +3371,9 @@ class xt(Exchange, ImplicitAPI):
3329
3371
  async def fetch_ledger(self, code: Str = None, since: Int = None, limit: Int = None, params={}) -> List[LedgerEntry]:
3330
3372
  """
3331
3373
  fetch the history of changes, actions done by the user or operations that altered the balance of the user
3332
- :see: https://doc.xt.com/#futures_usergetBalanceBill
3374
+
3375
+ https://doc.xt.com/#futures_usergetBalanceBill
3376
+
3333
3377
  :param str [code]: unified currency code
3334
3378
  :param int [since]: timestamp in ms of the earliest ledger entry
3335
3379
  :param int [limit]: max number of ledger entries to return
@@ -3438,7 +3482,9 @@ class xt(Exchange, ImplicitAPI):
3438
3482
  async def fetch_deposit_address(self, code: str, params={}) -> DepositAddress:
3439
3483
  """
3440
3484
  fetch the deposit address for a currency associated with self account
3441
- :see: https://doc.xt.com/#deposit_withdrawaldepositAddressGet
3485
+
3486
+ https://doc.xt.com/#deposit_withdrawaldepositAddressGet
3487
+
3442
3488
  :param str code: unified currency code
3443
3489
  :param dict params: extra parameters specific to the xt api endpoint
3444
3490
  :param str params['network']: required network id
@@ -3489,7 +3535,9 @@ class xt(Exchange, ImplicitAPI):
3489
3535
  async def fetch_deposits(self, code: Str = None, since: Int = None, limit: Int = None, params={}):
3490
3536
  """
3491
3537
  fetch all deposits made to an account
3492
- :see: https://doc.xt.com/#deposit_withdrawalhistoryDepositGet
3538
+
3539
+ https://doc.xt.com/#deposit_withdrawalhistoryDepositGet
3540
+
3493
3541
  :param str [code]: unified currency code
3494
3542
  :param int [since]: the earliest time in ms to fetch deposits for
3495
3543
  :param int [limit]: the maximum number of transaction structures to retrieve
@@ -3540,7 +3588,9 @@ class xt(Exchange, ImplicitAPI):
3540
3588
  async def fetch_withdrawals(self, code: Str = None, since: Int = None, limit: Int = None, params={}):
3541
3589
  """
3542
3590
  fetch all withdrawals made from an account
3543
- :see: https://doc.xt.com/#deposit_withdrawalwithdrawHistory
3591
+
3592
+ https://doc.xt.com/#deposit_withdrawalwithdrawHistory
3593
+
3544
3594
  :param str [code]: unified currency code
3545
3595
  :param int [since]: the earliest time in ms to fetch withdrawals for
3546
3596
  :param int [limit]: the maximum number of transaction structures to retrieve
@@ -3591,7 +3641,9 @@ class xt(Exchange, ImplicitAPI):
3591
3641
  async def withdraw(self, code: str, amount: float, address: str, tag=None, params={}) -> Transaction:
3592
3642
  """
3593
3643
  make a withdrawal
3594
- :see: https://doc.xt.com/#deposit_withdrawalwithdraw
3644
+
3645
+ https://doc.xt.com/#deposit_withdrawalwithdraw
3646
+
3595
3647
  :param str code: unified currency code
3596
3648
  :param float amount: the amount to withdraw
3597
3649
  :param str address: the address to withdraw to
@@ -3719,7 +3771,9 @@ class xt(Exchange, ImplicitAPI):
3719
3771
  async def set_leverage(self, leverage: Int, symbol: str = None, params={}):
3720
3772
  """
3721
3773
  set the level of leverage for a market
3722
- :see: https://doc.xt.com/#futures_useradjustLeverage
3774
+
3775
+ https://doc.xt.com/#futures_useradjustLeverage
3776
+
3723
3777
  :param float leverage: the rate of leverage
3724
3778
  :param str symbol: unified market symbol
3725
3779
  :param dict params: extra parameters specific to the xt api endpoint
@@ -3761,7 +3815,9 @@ class xt(Exchange, ImplicitAPI):
3761
3815
  async def add_margin(self, symbol: str, amount: float, params={}):
3762
3816
  """
3763
3817
  add margin to a position
3764
- :see: https://doc.xt.com/#futures_useradjustMargin
3818
+
3819
+ https://doc.xt.com/#futures_useradjustMargin
3820
+
3765
3821
  :param str symbol: unified market symbol
3766
3822
  :param float amount: amount of margin to add
3767
3823
  :param dict params: extra parameters specific to the xt api endpoint
@@ -3773,7 +3829,9 @@ class xt(Exchange, ImplicitAPI):
3773
3829
  async def reduce_margin(self, symbol: str, amount: float, params={}):
3774
3830
  """
3775
3831
  remove margin from a position
3776
- :see: https://doc.xt.com/#futures_useradjustMargin
3832
+
3833
+ https://doc.xt.com/#futures_useradjustMargin
3834
+
3777
3835
  :param str symbol: unified market symbol
3778
3836
  :param float amount: the amount of margin to remove
3779
3837
  :param dict params: extra parameters specific to the xt api endpoint
@@ -3824,10 +3882,12 @@ class xt(Exchange, ImplicitAPI):
3824
3882
  'datetime': None,
3825
3883
  }
3826
3884
 
3827
- async def fetch_leverage_tiers(self, symbols: List[str] = None, params={}):
3885
+ async def fetch_leverage_tiers(self, symbols: List[str] = None, params={}) -> LeverageTiers:
3828
3886
  """
3829
- :see: https://doc.xt.com/#futures_quotesgetLeverageBrackets
3830
3887
  retrieve information on the maximum leverage for different trade sizes
3888
+
3889
+ https://doc.xt.com/#futures_quotesgetLeverageBrackets
3890
+
3831
3891
  :param str [symbols]: a list of unified market symbols
3832
3892
  :param dict params: extra parameters specific to the xt api endpoint
3833
3893
  :returns dict: a dictionary of `leverage tiers structures <https://docs.ccxt.com/#/?id=leverage-tiers-structure>`
@@ -3868,7 +3928,7 @@ class xt(Exchange, ImplicitAPI):
3868
3928
  symbols = self.market_symbols(symbols)
3869
3929
  return self.parse_leverage_tiers(data, symbols, 'symbol')
3870
3930
 
3871
- def parse_leverage_tiers(self, response, symbols=None, marketIdKey=None):
3931
+ def parse_leverage_tiers(self, response, symbols=None, marketIdKey=None) -> LeverageTiers:
3872
3932
  #
3873
3933
  # {
3874
3934
  # "symbol": "rad_usdt",
@@ -3901,8 +3961,10 @@ class xt(Exchange, ImplicitAPI):
3901
3961
 
3902
3962
  async def fetch_market_leverage_tiers(self, symbol: str, params={}) -> List[LeverageTier]:
3903
3963
  """
3904
- :see: https://doc.xt.com/#futures_quotesgetLeverageBracket
3905
3964
  retrieve information on the maximum leverage for different trade sizes of a single market
3965
+
3966
+ https://doc.xt.com/#futures_quotesgetLeverageBracket
3967
+
3906
3968
  :param str symbol: unified market symbol
3907
3969
  :param dict params: extra parameters specific to the xt api endpoint
3908
3970
  :returns dict: a `leverage tiers structure <https://docs.ccxt.com/#/?id=leverage-tiers-structure>`
@@ -3944,7 +4006,7 @@ class xt(Exchange, ImplicitAPI):
3944
4006
  data = self.safe_value(response, 'result', {})
3945
4007
  return self.parse_market_leverage_tiers(data, market)
3946
4008
 
3947
- def parse_market_leverage_tiers(self, info, market=None):
4009
+ def parse_market_leverage_tiers(self, info, market=None) -> List[LeverageTier]:
3948
4010
  #
3949
4011
  # {
3950
4012
  # "symbol": "rad_usdt",
@@ -3970,6 +4032,7 @@ class xt(Exchange, ImplicitAPI):
3970
4032
  market = self.safe_market(marketId, market, '_', 'contract')
3971
4033
  tiers.append({
3972
4034
  'tier': self.safe_integer(tier, 'bracket'),
4035
+ 'symbol': self.safe_symbol(marketId, market, '_', 'contract'),
3973
4036
  'currency': market['settle'],
3974
4037
  'minNotional': self.safe_number(brackets[i - 1], 'maxNominalValue', 0),
3975
4038
  'maxNotional': self.safe_number(tier, 'maxNominalValue'),
@@ -3982,7 +4045,9 @@ class xt(Exchange, ImplicitAPI):
3982
4045
  async def fetch_funding_rate_history(self, symbol: str = None, since: Int = None, limit: Int = None, params={}):
3983
4046
  """
3984
4047
  fetches historical funding rates
3985
- :see: https://doc.xt.com/#futures_quotesgetFundingRateRecord
4048
+
4049
+ https://doc.xt.com/#futures_quotesgetFundingRateRecord
4050
+
3986
4051
  :param str [symbol]: unified symbol of the market to fetch the funding rate history for
3987
4052
  :param int [since]: timestamp in ms of the earliest funding rate to fetch
3988
4053
  :param int [limit]: the maximum amount of [funding rate structures] to fetch
@@ -4048,7 +4113,9 @@ class xt(Exchange, ImplicitAPI):
4048
4113
  async def fetch_funding_interval(self, symbol: str, params={}) -> FundingRate:
4049
4114
  """
4050
4115
  fetch the current funding rate interval
4051
- :see: https://doc.xt.com/#futures_quotesgetFundingRate
4116
+
4117
+ https://doc.xt.com/#futures_quotesgetFundingRate
4118
+
4052
4119
  :param str symbol: unified market symbol
4053
4120
  :param dict [params]: extra parameters specific to the exchange API endpoint
4054
4121
  :returns dict: a `funding rate structure <https://docs.ccxt.com/#/?id=funding-rate-structure>`
@@ -4058,7 +4125,9 @@ class xt(Exchange, ImplicitAPI):
4058
4125
  async def fetch_funding_rate(self, symbol: str, params={}) -> FundingRate:
4059
4126
  """
4060
4127
  fetch the current funding rate
4061
- :see: https://doc.xt.com/#futures_quotesgetFundingRate
4128
+
4129
+ https://doc.xt.com/#futures_quotesgetFundingRate
4130
+
4062
4131
  :param str symbol: unified market symbol
4063
4132
  :param dict params: extra parameters specific to the xt api endpoint
4064
4133
  :returns dict: a `funding rate structure <https://docs.ccxt.com/#/?id=funding-rate-structure>`
@@ -4130,7 +4199,9 @@ class xt(Exchange, ImplicitAPI):
4130
4199
  async def fetch_funding_history(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
4131
4200
  """
4132
4201
  fetch the funding history
4133
- :see: https://doc.xt.com/#futures_usergetFunding
4202
+
4203
+ https://doc.xt.com/#futures_usergetFunding
4204
+
4134
4205
  :param str symbol: unified market symbol
4135
4206
  :param int [since]: the starting timestamp in milliseconds
4136
4207
  :param int [limit]: the number of entries to return
@@ -4214,7 +4285,9 @@ class xt(Exchange, ImplicitAPI):
4214
4285
  async def fetch_position(self, symbol: str, params={}):
4215
4286
  """
4216
4287
  fetch data on a single open contract trade position
4217
- :see: https://doc.xt.com/#futures_usergetPosition
4288
+
4289
+ https://doc.xt.com/#futures_usergetPosition
4290
+
4218
4291
  :param str symbol: unified market symbol of the market the position is held in
4219
4292
  :param dict params: extra parameters specific to the xt api endpoint
4220
4293
  :returns dict: a `position structure <https://docs.ccxt.com/#/?id=position-structure>`
@@ -4269,7 +4342,9 @@ class xt(Exchange, ImplicitAPI):
4269
4342
  async def fetch_positions(self, symbols: List[str] = None, params={}):
4270
4343
  """
4271
4344
  fetch all open positions
4272
- :see: https://doc.xt.com/#futures_usergetPosition
4345
+
4346
+ https://doc.xt.com/#futures_usergetPosition
4347
+
4273
4348
  :param str [symbols]: list of unified market symbols, not supported with xt
4274
4349
  :param dict params: extra parameters specific to the xt api endpoint
4275
4350
  :returns dict[]: a list of `position structure <https://docs.ccxt.com/#/?id=position-structure>`
@@ -4370,7 +4445,9 @@ class xt(Exchange, ImplicitAPI):
4370
4445
  async def transfer(self, code: str, amount: float, fromAccount: str, toAccount: str, params={}) -> TransferEntry:
4371
4446
  """
4372
4447
  transfer currency internally between wallets on the same account
4373
- :see: https://doc.xt.com/#transfersubTransferPost
4448
+
4449
+ https://doc.xt.com/#transfersubTransferPost
4450
+
4374
4451
  :param str code: unified currency code
4375
4452
  :param float amount: amount to transfer
4376
4453
  :param str fromAccount: account to transfer from - spot, swap, leverage, finance