ccxt 4.1.75__py2.py3-none-any.whl → 4.1.77__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/abstract/binance.py +2 -0
- ccxt/abstract/binancecoinm.py +2 -0
- ccxt/abstract/binanceus.py +2 -0
- ccxt/abstract/binanceusdm.py +2 -0
- ccxt/abstract/okx.py +23 -9
- ccxt/ace.py +2 -0
- ccxt/alpaca.py +2 -0
- ccxt/async_support/__init__.py +1 -1
- ccxt/async_support/ace.py +2 -0
- ccxt/async_support/alpaca.py +2 -0
- ccxt/async_support/base/exchange.py +7 -1
- ccxt/async_support/binance.py +4 -0
- ccxt/async_support/binanceus.py +2 -0
- ccxt/async_support/bingx.py +76 -25
- ccxt/async_support/bit2c.py +2 -0
- ccxt/async_support/bitbank.py +2 -0
- ccxt/async_support/bithumb.py +2 -0
- ccxt/async_support/bitmex.py +5 -1
- ccxt/async_support/bitopro.py +2 -0
- ccxt/async_support/bitpanda.py +2 -0
- ccxt/async_support/bitrue.py +24 -1
- ccxt/async_support/bitso.py +2 -0
- ccxt/async_support/bitstamp.py +5 -2
- ccxt/async_support/bittrex.py +2 -0
- ccxt/async_support/bitvavo.py +2 -0
- ccxt/async_support/bl3p.py +2 -0
- ccxt/async_support/btcalpha.py +2 -0
- ccxt/async_support/btcbox.py +2 -0
- ccxt/async_support/btcmarkets.py +2 -0
- ccxt/async_support/btcturk.py +2 -0
- ccxt/async_support/bybit.py +2 -0
- ccxt/async_support/coinbase.py +33 -6
- ccxt/async_support/coincheck.py +2 -0
- ccxt/async_support/coinlist.py +2 -0
- ccxt/async_support/coinmate.py +2 -0
- ccxt/async_support/coinone.py +2 -0
- ccxt/async_support/coinsph.py +2 -0
- ccxt/async_support/coinspot.py +2 -0
- ccxt/async_support/cryptocom.py +2 -167
- ccxt/async_support/gate.py +1 -0
- ccxt/async_support/gemini.py +2 -0
- ccxt/async_support/idex.py +2 -0
- ccxt/async_support/independentreserve.py +2 -0
- ccxt/async_support/indodax.py +2 -0
- ccxt/async_support/kucoin.py +2 -0
- ccxt/async_support/kuna.py +2 -0
- ccxt/async_support/latoken.py +2 -0
- ccxt/async_support/luno.py +2 -0
- ccxt/async_support/mercado.py +2 -0
- ccxt/async_support/mexc.py +2 -0
- ccxt/async_support/ndax.py +2 -0
- ccxt/async_support/novadax.py +2 -0
- ccxt/async_support/okx.py +25 -10
- ccxt/async_support/p2b.py +2 -0
- ccxt/async_support/wavesexchange.py +2 -0
- ccxt/async_support/wazirx.py +2 -0
- ccxt/async_support/woo.py +2 -0
- ccxt/async_support/yobit.py +2 -0
- ccxt/async_support/zonda.py +2 -0
- ccxt/base/exchange.py +7 -1
- ccxt/binance.py +4 -0
- ccxt/binanceus.py +2 -0
- ccxt/bingx.py +76 -25
- ccxt/bit2c.py +2 -0
- ccxt/bitbank.py +2 -0
- ccxt/bithumb.py +2 -0
- ccxt/bitmex.py +5 -1
- ccxt/bitopro.py +2 -0
- ccxt/bitpanda.py +2 -0
- ccxt/bitrue.py +24 -1
- ccxt/bitso.py +2 -0
- ccxt/bitstamp.py +5 -2
- ccxt/bittrex.py +2 -0
- ccxt/bitvavo.py +2 -0
- ccxt/bl3p.py +2 -0
- ccxt/btcalpha.py +2 -0
- ccxt/btcbox.py +2 -0
- ccxt/btcmarkets.py +2 -0
- ccxt/btcturk.py +2 -0
- ccxt/bybit.py +2 -0
- ccxt/coinbase.py +33 -6
- ccxt/coincheck.py +2 -0
- ccxt/coinlist.py +2 -0
- ccxt/coinmate.py +2 -0
- ccxt/coinone.py +2 -0
- ccxt/coinsph.py +2 -0
- ccxt/coinspot.py +2 -0
- ccxt/cryptocom.py +2 -167
- ccxt/gate.py +1 -0
- ccxt/gemini.py +2 -0
- ccxt/idex.py +2 -0
- ccxt/independentreserve.py +2 -0
- ccxt/indodax.py +2 -0
- ccxt/kucoin.py +2 -0
- ccxt/kuna.py +2 -0
- ccxt/latoken.py +2 -0
- ccxt/luno.py +2 -0
- ccxt/mercado.py +2 -0
- ccxt/mexc.py +2 -0
- ccxt/ndax.py +2 -0
- ccxt/novadax.py +2 -0
- ccxt/okx.py +25 -10
- ccxt/p2b.py +2 -0
- ccxt/pro/__init__.py +1 -1
- ccxt/wavesexchange.py +2 -0
- ccxt/wazirx.py +2 -0
- ccxt/woo.py +2 -0
- ccxt/yobit.py +2 -0
- ccxt/zonda.py +2 -0
- {ccxt-4.1.75.dist-info → ccxt-4.1.77.dist-info}/METADATA +4 -4
- {ccxt-4.1.75.dist-info → ccxt-4.1.77.dist-info}/RECORD +114 -114
- {ccxt-4.1.75.dist-info → ccxt-4.1.77.dist-info}/WHEEL +0 -0
- {ccxt-4.1.75.dist-info → ccxt-4.1.77.dist-info}/top_level.txt +0 -0
ccxt/async_support/btcalpha.py
CHANGED
ccxt/async_support/btcbox.py
CHANGED
ccxt/async_support/btcmarkets.py
CHANGED
ccxt/async_support/btcturk.py
CHANGED
ccxt/async_support/bybit.py
CHANGED
@@ -51,6 +51,8 @@ class bybit(Exchange, ImplicitAPI):
|
|
51
51
|
'borrowCrossMargin': True,
|
52
52
|
'cancelAllOrders': True,
|
53
53
|
'cancelOrder': True,
|
54
|
+
'closeAllPositions': False,
|
55
|
+
'closePosition': False,
|
54
56
|
'createMarketBuyOrderWithCost': True,
|
55
57
|
'createMarketSellOrderWithCost': False,
|
56
58
|
'createOrder': True,
|
ccxt/async_support/coinbase.py
CHANGED
@@ -45,11 +45,16 @@ class coinbase(Exchange, ImplicitAPI):
|
|
45
45
|
'addMargin': False,
|
46
46
|
'cancelOrder': True,
|
47
47
|
'cancelOrders': True,
|
48
|
+
'closeAllPositions': False,
|
49
|
+
'closePosition': False,
|
48
50
|
'createDepositAddress': True,
|
49
51
|
'createLimitBuyOrder': True,
|
50
52
|
'createLimitSellOrder': True,
|
51
53
|
'createMarketBuyOrder': True,
|
54
|
+
'createMarketBuyOrderWithCost': True,
|
55
|
+
'createMarketOrderWithCost': False,
|
52
56
|
'createMarketSellOrder': True,
|
57
|
+
'createMarketSellOrderWithCost': False,
|
53
58
|
'createOrder': True,
|
54
59
|
'createPostOnlyOrder': True,
|
55
60
|
'createReduceOnlyOrder': False,
|
@@ -2008,6 +2013,22 @@ class coinbase(Exchange, ImplicitAPI):
|
|
2008
2013
|
request['limit'] = limit
|
2009
2014
|
return request
|
2010
2015
|
|
2016
|
+
async def create_market_buy_order_with_cost(self, symbol: str, cost, params={}):
|
2017
|
+
"""
|
2018
|
+
create a market buy order by providing the symbol and cost
|
2019
|
+
:see: https://docs.cloud.coinbase.com/advanced-trade-api/reference/retailbrokerageapi_postorder
|
2020
|
+
:param str symbol: unified symbol of the market to create an order in
|
2021
|
+
:param float cost: how much you want to trade in units of the quote currency
|
2022
|
+
:param dict [params]: extra parameters specific to the exchange API endpoint
|
2023
|
+
:returns dict: an `order structure <https://docs.ccxt.com/#/?id=order-structure>`
|
2024
|
+
"""
|
2025
|
+
await self.load_markets()
|
2026
|
+
market = self.market(symbol)
|
2027
|
+
if not market['spot']:
|
2028
|
+
raise NotSupported(self.id + ' createMarketBuyOrderWithCost() supports spot orders only')
|
2029
|
+
params['createMarketBuyOrderRequiresPrice'] = False
|
2030
|
+
return await self.create_order(symbol, 'market', 'buy', cost, None, params)
|
2031
|
+
|
2011
2032
|
async def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount, price=None, params={}):
|
2012
2033
|
"""
|
2013
2034
|
create a trade order
|
@@ -2026,6 +2047,7 @@ class coinbase(Exchange, ImplicitAPI):
|
|
2026
2047
|
:param str [params.timeInForce]: 'GTC', 'IOC', 'GTD' or 'PO'
|
2027
2048
|
:param str [params.stop_direction]: 'UNKNOWN_STOP_DIRECTION', 'STOP_DIRECTION_STOP_UP', 'STOP_DIRECTION_STOP_DOWN' the direction the stopPrice is triggered from
|
2028
2049
|
:param str [params.end_time]: '2023-05-25T17:01:05.092Z' for 'GTD' orders
|
2050
|
+
:param float [params.cost]: *spot market buy only* the quote quantity that can be used alternative for the amount
|
2029
2051
|
:returns dict: an `order structure <https://docs.ccxt.com/#/?id=order-structure>`
|
2030
2052
|
"""
|
2031
2053
|
await self.load_markets()
|
@@ -2112,18 +2134,23 @@ class coinbase(Exchange, ImplicitAPI):
|
|
2112
2134
|
if isStop or isStopLoss or isTakeProfit:
|
2113
2135
|
raise NotSupported(self.id + ' createOrder() only stop limit orders are supported')
|
2114
2136
|
if side == 'buy':
|
2115
|
-
createMarketBuyOrderRequiresPrice = self.safe_value(self.options, 'createMarketBuyOrderRequiresPrice', True)
|
2116
2137
|
total = None
|
2117
|
-
|
2138
|
+
createMarketBuyOrderRequiresPrice = True
|
2139
|
+
createMarketBuyOrderRequiresPrice, params = self.handle_option_and_params(params, 'createOrder', 'createMarketBuyOrderRequiresPrice', True)
|
2140
|
+
cost = self.safe_number(params, 'cost')
|
2141
|
+
params = self.omit(params, 'cost')
|
2142
|
+
if cost is not None:
|
2143
|
+
total = self.cost_to_precision(symbol, cost)
|
2144
|
+
elif createMarketBuyOrderRequiresPrice:
|
2118
2145
|
if price is None:
|
2119
|
-
raise InvalidOrder(self.id + ' createOrder() requires a price argument for market buy orders on spot markets to calculate the total amount to spend(amount * price), alternatively set the createMarketBuyOrderRequiresPrice option to False and pass
|
2146
|
+
raise InvalidOrder(self.id + ' createOrder() requires a price argument for market buy orders on spot markets to calculate the total amount to spend(amount * price), alternatively set the createMarketBuyOrderRequiresPrice option or param to False and pass the cost to spend in the amount argument')
|
2120
2147
|
else:
|
2121
2148
|
amountString = self.number_to_string(amount)
|
2122
2149
|
priceString = self.number_to_string(price)
|
2123
|
-
|
2124
|
-
total = self.
|
2150
|
+
costRequest = Precise.string_mul(amountString, priceString)
|
2151
|
+
total = self.cost_to_precision(symbol, costRequest)
|
2125
2152
|
else:
|
2126
|
-
total = self.
|
2153
|
+
total = self.cost_to_precision(symbol, amount)
|
2127
2154
|
request['order_configuration'] = {
|
2128
2155
|
'market_market_ioc': {
|
2129
2156
|
'quote_size': total,
|
ccxt/async_support/coincheck.py
CHANGED
ccxt/async_support/coinlist.py
CHANGED
@@ -48,6 +48,8 @@ class coinlist(Exchange, ImplicitAPI):
|
|
48
48
|
'cancelAllOrders': True,
|
49
49
|
'cancelOrder': True,
|
50
50
|
'cancelOrders': True,
|
51
|
+
'closeAllPositions': False,
|
52
|
+
'closePosition': False,
|
51
53
|
'createDepositAddress': False,
|
52
54
|
'createOrder': True,
|
53
55
|
'createPostOnlyOrder': True,
|
ccxt/async_support/coinmate.py
CHANGED
ccxt/async_support/coinone.py
CHANGED
ccxt/async_support/coinsph.py
CHANGED
@@ -51,6 +51,8 @@ class coinsph(Exchange, ImplicitAPI):
|
|
51
51
|
'cancelAllOrders': True,
|
52
52
|
'cancelOrder': True,
|
53
53
|
'cancelOrders': False,
|
54
|
+
'closeAllPositions': False,
|
55
|
+
'closePosition': False,
|
54
56
|
'createDepositAddress': False,
|
55
57
|
'createOrder': True,
|
56
58
|
'createPostOnlyOrder': False,
|
ccxt/async_support/coinspot.py
CHANGED
ccxt/async_support/cryptocom.py
CHANGED
@@ -102,7 +102,7 @@ class cryptocom(Exchange, ImplicitAPI):
|
|
102
102
|
'fetchTradingFees': False,
|
103
103
|
'fetchTransactionFees': False,
|
104
104
|
'fetchTransactions': False,
|
105
|
-
'fetchTransfers':
|
105
|
+
'fetchTransfers': False,
|
106
106
|
'fetchUnderlyingAssets': False,
|
107
107
|
'fetchVolatilityHistory': False,
|
108
108
|
'fetchWithdrawals': True,
|
@@ -111,7 +111,7 @@ class cryptocom(Exchange, ImplicitAPI):
|
|
111
111
|
'setLeverage': False,
|
112
112
|
'setMarginMode': False,
|
113
113
|
'setPositionMode': False,
|
114
|
-
'transfer':
|
114
|
+
'transfer': False,
|
115
115
|
'withdraw': True,
|
116
116
|
},
|
117
117
|
'timeframes': {
|
@@ -1707,171 +1707,6 @@ class cryptocom(Exchange, ImplicitAPI):
|
|
1707
1707
|
withdrawalList = self.safe_value(data, 'withdrawal_list', [])
|
1708
1708
|
return self.parse_transactions(withdrawalList, currency, since, limit)
|
1709
1709
|
|
1710
|
-
async def transfer(self, code: str, amount, fromAccount, toAccount, params={}):
|
1711
|
-
"""
|
1712
|
-
transfer currency internally between wallets on the same account
|
1713
|
-
:param str code: unified currency code
|
1714
|
-
:param float amount: amount to transfer
|
1715
|
-
:param str fromAccount: account to transfer from
|
1716
|
-
:param str toAccount: account to transfer to
|
1717
|
-
:param dict [params]: extra parameters specific to the exchange API endpoint
|
1718
|
-
:returns dict: a `transfer structure <https://docs.ccxt.com/#/?id=transfer-structure>`
|
1719
|
-
"""
|
1720
|
-
await self.load_markets()
|
1721
|
-
currency = self.currency(code)
|
1722
|
-
fromAccount = fromAccount.lower()
|
1723
|
-
toAccount = toAccount.lower()
|
1724
|
-
accountsById = self.safe_value(self.options, 'accountsById', {})
|
1725
|
-
fromId = self.safe_string(accountsById, fromAccount, fromAccount)
|
1726
|
-
toId = self.safe_string(accountsById, toAccount, toAccount)
|
1727
|
-
request = {
|
1728
|
-
'currency': currency['id'],
|
1729
|
-
'amount': float(amount),
|
1730
|
-
'from': fromId,
|
1731
|
-
'to': toId,
|
1732
|
-
}
|
1733
|
-
method = 'v2PrivatePostPrivateDerivTransfer'
|
1734
|
-
if (fromAccount == 'margin') or (toAccount == 'margin'):
|
1735
|
-
method = 'v2PrivatePostPrivateMarginTransfer'
|
1736
|
-
response = await getattr(self, method)(self.extend(request, params))
|
1737
|
-
#
|
1738
|
-
# {
|
1739
|
-
# "id": 11,
|
1740
|
-
# "method": "private/deriv/transfer",
|
1741
|
-
# "code": 0
|
1742
|
-
# }
|
1743
|
-
#
|
1744
|
-
return self.parse_transfer(response, currency)
|
1745
|
-
|
1746
|
-
async def fetch_transfers(self, code: Str = None, since: Int = None, limit: Int = None, params={}):
|
1747
|
-
"""
|
1748
|
-
fetch a history of internal transfers made on an account
|
1749
|
-
:param str code: unified currency code of the currency transferred
|
1750
|
-
:param int [since]: the earliest time in ms to fetch transfers for
|
1751
|
-
:param int [limit]: the maximum number of transfers structures to retrieve
|
1752
|
-
:param dict [params]: extra parameters specific to the exchange API endpoint
|
1753
|
-
:returns dict[]: a list of `transfer structures <https://docs.ccxt.com/#/?id=transfer-structure>`
|
1754
|
-
"""
|
1755
|
-
if not ('direction' in params):
|
1756
|
-
raise ArgumentsRequired(self.id + ' fetchTransfers() requires a direction param to be either "IN" or "OUT"')
|
1757
|
-
await self.load_markets()
|
1758
|
-
currency = None
|
1759
|
-
request = {
|
1760
|
-
'direction': 'OUT',
|
1761
|
-
}
|
1762
|
-
if code is not None:
|
1763
|
-
currency = self.currency(code)
|
1764
|
-
request['currency'] = currency['id']
|
1765
|
-
if since is not None:
|
1766
|
-
request['start_ts'] = since
|
1767
|
-
if limit is not None:
|
1768
|
-
request['page_size'] = limit
|
1769
|
-
method = 'v2PrivatePostPrivateDerivGetTransferHistory'
|
1770
|
-
marginMode, query = self.custom_handle_margin_mode_and_params('fetchTransfers', params)
|
1771
|
-
if marginMode is not None:
|
1772
|
-
method = 'v2PrivatePostPrivateMarginGetTransferHistory'
|
1773
|
-
response = await getattr(self, method)(self.extend(request, query))
|
1774
|
-
#
|
1775
|
-
# {
|
1776
|
-
# "id": "1641032709328",
|
1777
|
-
# "method": "private/deriv/get-transfer-history",
|
1778
|
-
# "code": "0",
|
1779
|
-
# "result": {
|
1780
|
-
# "transfer_list": [
|
1781
|
-
# {
|
1782
|
-
# "direction": "IN",
|
1783
|
-
# "time": "1641025185223",
|
1784
|
-
# "amount": "109.56",
|
1785
|
-
# "status": "COMPLETED",
|
1786
|
-
# "information": "From Spot Wallet",
|
1787
|
-
# "currency": "USDC"
|
1788
|
-
# }
|
1789
|
-
# ]
|
1790
|
-
# }
|
1791
|
-
# }
|
1792
|
-
#
|
1793
|
-
transfer = []
|
1794
|
-
transfer.append({
|
1795
|
-
'response': response,
|
1796
|
-
})
|
1797
|
-
return self.parse_transfers(transfer, currency, since, limit, params)
|
1798
|
-
|
1799
|
-
def parse_transfer_status(self, status):
|
1800
|
-
statuses = {
|
1801
|
-
'COMPLETED': 'ok',
|
1802
|
-
'PROCESSING': 'pending',
|
1803
|
-
}
|
1804
|
-
return self.safe_string(statuses, status, status)
|
1805
|
-
|
1806
|
-
def parse_transfer(self, transfer, currency: Currency = None):
|
1807
|
-
#
|
1808
|
-
# {
|
1809
|
-
# "response": {
|
1810
|
-
# "id": "1641032709328",
|
1811
|
-
# "method": "private/deriv/get-transfer-history",
|
1812
|
-
# "code": "0",
|
1813
|
-
# "result": {
|
1814
|
-
# "transfer_list": [
|
1815
|
-
# {
|
1816
|
-
# "direction": "IN",
|
1817
|
-
# "time": "1641025185223",
|
1818
|
-
# "amount": "109.56",
|
1819
|
-
# "status": "COMPLETED",
|
1820
|
-
# "information": "From Spot Wallet",
|
1821
|
-
# "currency": "USDC"
|
1822
|
-
# }
|
1823
|
-
# ]
|
1824
|
-
# }
|
1825
|
-
# }
|
1826
|
-
# }
|
1827
|
-
#
|
1828
|
-
response = self.safe_value(transfer, 'response', {})
|
1829
|
-
result = self.safe_value(response, 'result', {})
|
1830
|
-
transferList = self.safe_value(result, 'transfer_list', [])
|
1831
|
-
timestamp = None
|
1832
|
-
amount = None
|
1833
|
-
code = None
|
1834
|
-
information = None
|
1835
|
-
status = None
|
1836
|
-
for i in range(0, len(transferList)):
|
1837
|
-
entry = transferList[i]
|
1838
|
-
timestamp = self.safe_integer(entry, 'time')
|
1839
|
-
amount = self.safe_number(entry, 'amount')
|
1840
|
-
currencyId = self.safe_string(entry, 'currency')
|
1841
|
-
code = self.safe_currency_code(currencyId)
|
1842
|
-
information = self.safe_string(entry, 'information')
|
1843
|
-
rawStatus = self.safe_string(entry, 'status')
|
1844
|
-
status = self.parse_transfer_status(rawStatus)
|
1845
|
-
fromAccount = None
|
1846
|
-
toAccount = None
|
1847
|
-
if information is not None:
|
1848
|
-
parts = information.split(' ')
|
1849
|
-
direction = self.safe_string_lower(parts, 0)
|
1850
|
-
method = self.safe_string(response, 'method')
|
1851
|
-
if direction == 'from':
|
1852
|
-
fromAccount = self.safe_string_lower(parts, 1)
|
1853
|
-
if method == 'private/margin/get-transfer-history':
|
1854
|
-
toAccount = 'margin'
|
1855
|
-
else:
|
1856
|
-
toAccount = 'derivative'
|
1857
|
-
elif direction == 'to':
|
1858
|
-
toAccount = self.safe_string_lower(parts, 1)
|
1859
|
-
if method == 'private/margin/get-transfer-history':
|
1860
|
-
fromAccount = 'margin'
|
1861
|
-
else:
|
1862
|
-
fromAccount = 'derivative'
|
1863
|
-
return {
|
1864
|
-
'info': transferList,
|
1865
|
-
'id': self.safe_string(response, 'id'),
|
1866
|
-
'timestamp': timestamp,
|
1867
|
-
'datetime': self.iso8601(timestamp),
|
1868
|
-
'currency': code,
|
1869
|
-
'amount': amount,
|
1870
|
-
'fromAccount': fromAccount,
|
1871
|
-
'toAccount': toAccount,
|
1872
|
-
'status': status,
|
1873
|
-
}
|
1874
|
-
|
1875
1710
|
def parse_ticker(self, ticker, market: Market = None) -> Ticker:
|
1876
1711
|
#
|
1877
1712
|
# fetchTicker
|
ccxt/async_support/gate.py
CHANGED
ccxt/async_support/gemini.py
CHANGED
ccxt/async_support/idex.py
CHANGED
@@ -48,6 +48,8 @@ class idex(Exchange, ImplicitAPI):
|
|
48
48
|
'cancelAllOrders': True,
|
49
49
|
'cancelOrder': True,
|
50
50
|
'cancelOrders': False,
|
51
|
+
'closeAllPositions': False,
|
52
|
+
'closePosition': False,
|
51
53
|
'createDepositAddress': False,
|
52
54
|
'createOrder': True,
|
53
55
|
'createReduceOnlyOrder': False,
|
@@ -30,6 +30,8 @@ class independentreserve(Exchange, ImplicitAPI):
|
|
30
30
|
'option': False,
|
31
31
|
'addMargin': False,
|
32
32
|
'cancelOrder': True,
|
33
|
+
'closeAllPositions': False,
|
34
|
+
'closePosition': False,
|
33
35
|
'createOrder': True,
|
34
36
|
'createReduceOnlyOrder': False,
|
35
37
|
'createStopLimitOrder': False,
|
ccxt/async_support/indodax.py
CHANGED
@@ -39,6 +39,8 @@ class indodax(Exchange, ImplicitAPI):
|
|
39
39
|
'cancelAllOrders': False,
|
40
40
|
'cancelOrder': True,
|
41
41
|
'cancelOrders': False,
|
42
|
+
'closeAllPositions': False,
|
43
|
+
'closePosition': False,
|
42
44
|
'createDepositAddress': False,
|
43
45
|
'createOrder': True,
|
44
46
|
'createReduceOnlyOrder': False,
|
ccxt/async_support/kucoin.py
CHANGED
@@ -54,6 +54,8 @@ class kucoin(Exchange, ImplicitAPI):
|
|
54
54
|
'borrowIsolatedMargin': True,
|
55
55
|
'cancelAllOrders': True,
|
56
56
|
'cancelOrder': True,
|
57
|
+
'closeAllPositions': False,
|
58
|
+
'closePosition': False,
|
57
59
|
'createDepositAddress': True,
|
58
60
|
'createOrder': True,
|
59
61
|
'createOrders': True,
|
ccxt/async_support/kuna.py
CHANGED
ccxt/async_support/latoken.py
CHANGED
ccxt/async_support/luno.py
CHANGED
ccxt/async_support/mercado.py
CHANGED
ccxt/async_support/mexc.py
CHANGED
ccxt/async_support/ndax.py
CHANGED
ccxt/async_support/novadax.py
CHANGED
ccxt/async_support/okx.py
CHANGED
@@ -42,7 +42,7 @@ class okx(Exchange, ImplicitAPI):
|
|
42
42
|
'name': 'OKX',
|
43
43
|
'countries': ['CN', 'US'],
|
44
44
|
'version': 'v5',
|
45
|
-
'rateLimit': 100,
|
45
|
+
'rateLimit': 100 * 1.03, # 3% tolerance because of #20229
|
46
46
|
'pro': True,
|
47
47
|
'certified': True,
|
48
48
|
'has': {
|
@@ -258,6 +258,13 @@ class okx(Exchange, ImplicitAPI):
|
|
258
258
|
'finance/savings/lending-rate-history': 5 / 3,
|
259
259
|
# public broker
|
260
260
|
'finance/sfp/dcd/products': 2 / 3,
|
261
|
+
# copytrading
|
262
|
+
'copytrading/public-lead-traders': 4,
|
263
|
+
'copytrading/public-weekly-pnl': 4,
|
264
|
+
'copytrading/public-stats': 4,
|
265
|
+
'copytrading/public-preference-currency': 4,
|
266
|
+
'copytrading/public-current-subpositions': 4,
|
267
|
+
'copytrading/public-subpositions-history': 4,
|
261
268
|
},
|
262
269
|
},
|
263
270
|
'private': {
|
@@ -367,12 +374,16 @@ class okx(Exchange, ImplicitAPI):
|
|
367
374
|
'finance/staking-defi/eth/balance': 5 / 3,
|
368
375
|
'finance/staking-defi/eth/purchase-redeem-history': 5 / 3,
|
369
376
|
# copytrading
|
370
|
-
'copytrading/current-subpositions':
|
371
|
-
'copytrading/subpositions-history':
|
372
|
-
'copytrading/instruments':
|
373
|
-
'copytrading/profit-sharing-details':
|
374
|
-
'copytrading/total-profit-sharing':
|
375
|
-
'copytrading/unrealized-profit-sharing-details':
|
377
|
+
'copytrading/current-subpositions': 1,
|
378
|
+
'copytrading/subpositions-history': 1,
|
379
|
+
'copytrading/instruments': 4,
|
380
|
+
'copytrading/profit-sharing-details': 4,
|
381
|
+
'copytrading/total-profit-sharing': 4,
|
382
|
+
'copytrading/unrealized-profit-sharing-details': 4,
|
383
|
+
'copytrading/copy-settings': 4,
|
384
|
+
'copytrading/batch-leverage-info': 4,
|
385
|
+
'copytrading/current-lead-traders': 4,
|
386
|
+
'copytrading/lead-traders-history': 4,
|
376
387
|
# broker
|
377
388
|
'broker/nd/info': 10,
|
378
389
|
'broker/nd/subaccount-info': 10,
|
@@ -477,9 +488,13 @@ class okx(Exchange, ImplicitAPI):
|
|
477
488
|
'finance/staking-defi/eth/purchase': 5,
|
478
489
|
'finance/staking-defi/eth/redeem': 5,
|
479
490
|
# copytrading
|
480
|
-
'copytrading/algo-order':
|
481
|
-
'copytrading/close-subposition':
|
482
|
-
'copytrading/set-instruments':
|
491
|
+
'copytrading/algo-order': 1,
|
492
|
+
'copytrading/close-subposition': 1,
|
493
|
+
'copytrading/set-instruments': 4,
|
494
|
+
'copytrading/first-copy-settings': 4,
|
495
|
+
'copytrading/amend-copy-settings': 4,
|
496
|
+
'copytrading/stop-copy-trading': 4,
|
497
|
+
'copytrading/batch-set-leverage': 4,
|
483
498
|
# broker
|
484
499
|
'broker/nd/create-subaccount': 0.25,
|
485
500
|
'broker/nd/delete-subaccount': 1,
|
ccxt/async_support/p2b.py
CHANGED
ccxt/async_support/wazirx.py
CHANGED
@@ -41,6 +41,8 @@ class wazirx(Exchange, ImplicitAPI):
|
|
41
41
|
'borrowMargin': False,
|
42
42
|
'cancelAllOrders': True,
|
43
43
|
'cancelOrder': True,
|
44
|
+
'closeAllPositions': False,
|
45
|
+
'closePosition': False,
|
44
46
|
'createOrder': True,
|
45
47
|
'createReduceOnlyOrder': False,
|
46
48
|
'createStopLimitOrder': True,
|
ccxt/async_support/woo.py
CHANGED
@@ -42,6 +42,8 @@ class woo(Exchange, ImplicitAPI):
|
|
42
42
|
'cancelAllOrders': True,
|
43
43
|
'cancelOrder': True,
|
44
44
|
'cancelWithdraw': False, # exchange have that endpoint disabled atm, but was once implemented in ccxt per old docs: https://kronosresearch.github.io/wootrade-documents/#cancel-withdraw-request
|
45
|
+
'closeAllPositions': False,
|
46
|
+
'closePosition': False,
|
45
47
|
'createDepositAddress': False,
|
46
48
|
'createMarketOrder': False,
|
47
49
|
'createOrder': True,
|
ccxt/async_support/yobit.py
CHANGED
ccxt/async_support/zonda.py
CHANGED
@@ -44,6 +44,8 @@ class zonda(Exchange, ImplicitAPI):
|
|
44
44
|
'cancelAllOrders': False,
|
45
45
|
'cancelOrder': True,
|
46
46
|
'cancelOrders': False,
|
47
|
+
'closeAllPositions': False,
|
48
|
+
'closePosition': False,
|
47
49
|
'createDepositAddress': False,
|
48
50
|
'createOrder': True,
|
49
51
|
'createReduceOnlyOrder': False,
|