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