ccxt 4.4.30__py2.py3-none-any.whl → 4.4.32__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.
- ccxt/__init__.py +1 -1
- ccxt/ace.py +36 -12
- ccxt/alpaca.py +62 -22
- ccxt/ascendex.py +65 -30
- ccxt/async_support/__init__.py +1 -1
- ccxt/async_support/ace.py +36 -12
- ccxt/async_support/alpaca.py +62 -22
- ccxt/async_support/ascendex.py +65 -30
- ccxt/async_support/base/exchange.py +3 -3
- ccxt/async_support/base/ws/aiohttp_client.py +25 -3
- ccxt/async_support/bigone.py +71 -27
- ccxt/async_support/binance.py +555 -323
- ccxt/async_support/bingx.py +208 -108
- ccxt/async_support/bit2c.py +34 -12
- ccxt/async_support/bitbank.py +42 -14
- ccxt/async_support/bitbns.py +17 -9
- ccxt/async_support/bitfinex.py +68 -24
- ccxt/async_support/bitfinex2.py +116 -44
- ccxt/async_support/bitflyer.py +54 -18
- ccxt/async_support/bitget.py +277 -145
- ccxt/async_support/bithumb.py +39 -14
- ccxt/async_support/bitmart.py +145 -79
- ccxt/async_support/bitmex.py +90 -30
- ccxt/async_support/bitopro.py +66 -22
- ccxt/async_support/bitrue.py +109 -57
- ccxt/async_support/bitso.py +55 -19
- ccxt/async_support/bitstamp.py +84 -36
- ccxt/async_support/bitteam.py +51 -17
- ccxt/async_support/bitvavo.py +57 -22
- ccxt/async_support/bl3p.py +26 -10
- ccxt/async_support/blockchaincom.py +63 -21
- ccxt/async_support/blofin.py +95 -38
- ccxt/async_support/btcalpha.py +48 -16
- ccxt/async_support/btcbox.py +27 -9
- ccxt/async_support/btcmarkets.py +57 -19
- ccxt/async_support/btcturk.py +36 -12
- ccxt/async_support/bybit.py +251 -95
- ccxt/async_support/cex.py +65 -22
- ccxt/async_support/coinbase.py +138 -56
- ccxt/async_support/coinbaseexchange.py +76 -28
- ccxt/async_support/coinbaseinternational.py +75 -27
- ccxt/async_support/coincatch.py +191 -97
- ccxt/async_support/coincheck.py +33 -11
- ccxt/async_support/coinex.py +212 -101
- ccxt/async_support/coinlist.py +87 -30
- ccxt/async_support/coinmate.py +55 -24
- ccxt/async_support/coinmetro.py +52 -18
- ccxt/async_support/coinone.py +27 -10
- ccxt/async_support/coinsph.py +73 -27
- ccxt/async_support/coinspot.py +25 -9
- ccxt/async_support/cryptocom.py +103 -38
- ccxt/async_support/currencycom.py +70 -23
- ccxt/async_support/delta.py +90 -30
- ccxt/async_support/deribit.py +131 -50
- ccxt/async_support/digifinex.py +114 -51
- ccxt/async_support/exmo.py +104 -45
- ccxt/async_support/gate.py +313 -157
- ccxt/async_support/gemini.py +57 -20
- ccxt/async_support/hashkey.py +151 -66
- ccxt/async_support/hitbtc.py +157 -74
- ccxt/async_support/hollaex.py +76 -25
- ccxt/async_support/htx.py +297 -240
- ccxt/async_support/huobijp.py +1 -0
- ccxt/async_support/hyperliquid.py +94 -38
- ccxt/async_support/idex.py +73 -24
- ccxt/async_support/independentreserve.py +12 -5
- ccxt/async_support/indodax.py +54 -17
- ccxt/async_support/kraken.py +108 -36
- ccxt/async_support/krakenfutures.py +88 -34
- ccxt/async_support/kucoin.py +214 -110
- ccxt/async_support/kucoinfutures.py +209 -64
- ccxt/async_support/kuna.py +80 -39
- ccxt/async_support/latoken.py +70 -33
- ccxt/async_support/lbank.py +89 -38
- ccxt/async_support/luno.py +54 -19
- ccxt/async_support/lykke.py +54 -19
- ccxt/async_support/mercado.py +1 -0
- ccxt/async_support/mexc.py +226 -108
- ccxt/async_support/ndax.py +58 -19
- ccxt/async_support/novadax.py +67 -22
- ccxt/async_support/oceanex.py +58 -19
- ccxt/async_support/okcoin.py +81 -38
- ccxt/async_support/okx.py +270 -109
- ccxt/async_support/onetrading.py +3 -1
- ccxt/async_support/oxfun.py +95 -36
- ccxt/async_support/p2b.py +49 -23
- ccxt/async_support/paradex.py +75 -27
- ccxt/async_support/paymium.py +31 -11
- ccxt/async_support/phemex.py +108 -56
- ccxt/async_support/poloniex.py +80 -30
- ccxt/async_support/poloniexfutures.py +72 -30
- ccxt/async_support/probit.py +64 -22
- ccxt/async_support/timex.py +58 -19
- ccxt/async_support/tokocrypto.py +63 -22
- ccxt/async_support/tradeogre.py +7 -2
- ccxt/async_support/upbit.py +72 -25
- ccxt/async_support/vertex.py +74 -28
- ccxt/async_support/wavesexchange.py +32 -8
- ccxt/async_support/wazirx.py +51 -17
- ccxt/async_support/whitebit.py +105 -41
- ccxt/async_support/woo.py +162 -65
- ccxt/async_support/woofipro.py +119 -50
- ccxt/async_support/xt.py +150 -73
- ccxt/async_support/yobit.py +49 -16
- ccxt/async_support/zaif.py +30 -10
- ccxt/async_support/zonda.py +46 -16
- ccxt/base/exchange.py +47 -35
- ccxt/base/types.py +1 -0
- ccxt/bigone.py +71 -27
- ccxt/binance.py +555 -323
- ccxt/bingx.py +208 -108
- ccxt/bit2c.py +34 -12
- ccxt/bitbank.py +42 -14
- ccxt/bitbns.py +17 -9
- ccxt/bitfinex.py +68 -24
- ccxt/bitfinex2.py +116 -44
- ccxt/bitflyer.py +54 -18
- ccxt/bitget.py +277 -145
- ccxt/bithumb.py +39 -14
- ccxt/bitmart.py +145 -79
- ccxt/bitmex.py +90 -30
- ccxt/bitopro.py +66 -22
- ccxt/bitrue.py +109 -57
- ccxt/bitso.py +55 -19
- ccxt/bitstamp.py +84 -36
- ccxt/bitteam.py +51 -17
- ccxt/bitvavo.py +57 -22
- ccxt/bl3p.py +26 -10
- ccxt/blockchaincom.py +63 -21
- ccxt/blofin.py +95 -38
- ccxt/btcalpha.py +48 -16
- ccxt/btcbox.py +27 -9
- ccxt/btcmarkets.py +57 -19
- ccxt/btcturk.py +36 -12
- ccxt/bybit.py +251 -95
- ccxt/cex.py +65 -22
- ccxt/coinbase.py +138 -56
- ccxt/coinbaseexchange.py +76 -28
- ccxt/coinbaseinternational.py +75 -27
- ccxt/coincatch.py +191 -97
- ccxt/coincheck.py +33 -11
- ccxt/coinex.py +212 -101
- ccxt/coinlist.py +87 -30
- ccxt/coinmate.py +55 -24
- ccxt/coinmetro.py +52 -18
- ccxt/coinone.py +27 -10
- ccxt/coinsph.py +73 -27
- ccxt/coinspot.py +25 -9
- ccxt/cryptocom.py +103 -38
- ccxt/currencycom.py +70 -23
- ccxt/delta.py +90 -30
- ccxt/deribit.py +131 -50
- ccxt/digifinex.py +114 -51
- ccxt/exmo.py +104 -45
- ccxt/gate.py +313 -157
- ccxt/gemini.py +57 -20
- ccxt/hashkey.py +151 -66
- ccxt/hitbtc.py +157 -74
- ccxt/hollaex.py +76 -25
- ccxt/htx.py +297 -240
- ccxt/huobijp.py +1 -0
- ccxt/hyperliquid.py +94 -38
- ccxt/idex.py +73 -24
- ccxt/independentreserve.py +12 -5
- ccxt/indodax.py +54 -17
- ccxt/kraken.py +108 -36
- ccxt/krakenfutures.py +88 -34
- ccxt/kucoin.py +214 -110
- ccxt/kucoinfutures.py +209 -64
- ccxt/kuna.py +80 -39
- ccxt/latoken.py +70 -33
- ccxt/lbank.py +89 -38
- ccxt/luno.py +54 -19
- ccxt/lykke.py +54 -19
- ccxt/mercado.py +1 -0
- ccxt/mexc.py +226 -108
- ccxt/ndax.py +58 -19
- ccxt/novadax.py +67 -22
- ccxt/oceanex.py +58 -19
- ccxt/okcoin.py +81 -38
- ccxt/okx.py +270 -109
- ccxt/onetrading.py +3 -1
- ccxt/oxfun.py +95 -36
- ccxt/p2b.py +49 -23
- ccxt/paradex.py +75 -27
- ccxt/paymium.py +31 -11
- ccxt/phemex.py +108 -56
- ccxt/poloniex.py +80 -30
- ccxt/poloniexfutures.py +72 -30
- ccxt/pro/__init__.py +1 -1
- ccxt/pro/alpaca.py +15 -5
- ccxt/pro/ascendex.py +18 -6
- ccxt/pro/binance.py +204 -123
- ccxt/pro/bingx.py +44 -24
- ccxt/pro/bitfinex.py +13 -5
- ccxt/pro/bitget.py +76 -37
- ccxt/pro/bithumb.py +12 -4
- ccxt/pro/bitmart.py +44 -20
- ccxt/pro/bitmex.py +42 -14
- ccxt/pro/bitopro.py +15 -5
- ccxt/pro/bitrue.py +7 -3
- ccxt/pro/bitvavo.py +97 -62
- ccxt/pro/blockchaincom.py +18 -6
- ccxt/pro/blofin.py +36 -12
- ccxt/pro/bybit.py +100 -42
- ccxt/pro/cex.py +48 -16
- ccxt/pro/coinbase.py +32 -12
- ccxt/pro/coinbaseexchange.py +1 -1
- ccxt/pro/coinbaseinternational.py +34 -14
- ccxt/pro/coincatch.py +54 -19
- ccxt/pro/coincheck.py +6 -2
- ccxt/pro/coinex.py +40 -20
- ccxt/pro/coinone.py +9 -3
- ccxt/pro/cryptocom.py +71 -27
- ccxt/pro/deribit.py +36 -12
- ccxt/pro/exmo.py +10 -4
- ccxt/pro/gate.py +65 -31
- ccxt/pro/gemini.py +21 -7
- ccxt/pro/hashkey.py +27 -9
- ccxt/pro/hitbtc.py +61 -37
- ccxt/pro/hollaex.py +15 -5
- ccxt/pro/htx.py +39 -21
- ccxt/pro/hyperliquid.py +41 -14
- ccxt/pro/kraken.py +49 -17
- ccxt/pro/krakenfutures.py +47 -24
- ccxt/pro/kucoin.py +60 -31
- ccxt/pro/kucoinfutures.py +41 -19
- ccxt/pro/lbank.py +27 -9
- ccxt/pro/luno.py +3 -1
- ccxt/pro/mexc.py +36 -19
- ccxt/pro/ndax.py +12 -4
- ccxt/pro/okcoin.py +18 -6
- ccxt/pro/okx.py +76 -28
- ccxt/pro/onetrading.py +21 -7
- ccxt/pro/oxfun.py +54 -20
- ccxt/pro/p2b.py +23 -11
- ccxt/pro/paradex.py +12 -4
- ccxt/pro/phemex.py +31 -19
- ccxt/pro/poloniex.py +50 -22
- ccxt/pro/poloniexfutures.py +17 -7
- ccxt/pro/probit.py +18 -6
- ccxt/pro/upbit.py +25 -9
- ccxt/pro/vertex.py +20 -6
- ccxt/pro/wazirx.py +21 -7
- ccxt/pro/whitebit.py +25 -9
- ccxt/pro/woo.py +32 -12
- ccxt/pro/woofipro.py +35 -13
- ccxt/pro/xt.py +46 -26
- ccxt/probit.py +64 -22
- ccxt/timex.py +58 -19
- ccxt/tokocrypto.py +63 -22
- ccxt/tradeogre.py +7 -2
- ccxt/upbit.py +72 -25
- ccxt/vertex.py +74 -28
- ccxt/wavesexchange.py +32 -8
- ccxt/wazirx.py +51 -17
- ccxt/whitebit.py +105 -41
- ccxt/woo.py +162 -65
- ccxt/woofipro.py +119 -50
- ccxt/xt.py +150 -73
- ccxt/yobit.py +49 -16
- ccxt/zaif.py +30 -10
- ccxt/zonda.py +46 -16
- {ccxt-4.4.30.dist-info → ccxt-4.4.32.dist-info}/METADATA +11 -5
- {ccxt-4.4.30.dist-info → ccxt-4.4.32.dist-info}/RECORD +268 -268
- {ccxt-4.4.30.dist-info → ccxt-4.4.32.dist-info}/LICENSE.txt +0 -0
- {ccxt-4.4.30.dist-info → ccxt-4.4.32.dist-info}/WHEEL +0 -0
- {ccxt-4.4.30.dist-info → ccxt-4.4.32.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
|
-
|
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
|
-
|
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
|
-
|
868
|
-
|
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
|
-
|
1263
|
-
|
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
|
-
|
1373
|
-
|
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
|
-
|
1459
|
-
|
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
|
-
|
1531
|
-
|
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
|
-
|
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
|
-
|
1732
|
-
|
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
|
-
|
1799
|
-
|
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
|
-
|
2064
|
-
|
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
|
-
|
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
|
-
|
2197
|
-
|
2198
|
-
|
2199
|
-
|
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
|
-
|
2346
|
-
|
2347
|
-
|
2348
|
-
|
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
|
-
|
2516
|
-
|
2517
|
-
|
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
|
-
|
2924
|
-
|
2925
|
-
|
2926
|
-
|
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
|
-
|
2941
|
-
|
2942
|
-
|
2943
|
-
|
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
|
-
|
2958
|
-
|
2959
|
-
|
2960
|
-
|
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
|
-
|
2975
|
-
|
2976
|
-
|
2977
|
-
|
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
|
-
|
3050
|
-
|
3051
|
-
|
3052
|
-
|
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
|
-
|
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
|
-
|
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
|
-
|
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
|
-
|
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
|
-
|
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
|
-
|
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
|
-
|
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
|
-
|
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
|
-
|
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
|
-
|
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
|
-
|
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
|
-
|
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
|
-
|
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
|
-
|
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
|
-
|
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
|
-
|
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
|