ccxt 4.3.8__py2.py3-none-any.whl → 4.3.9__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.
Potentially problematic release.
This version of ccxt might be problematic. Click here for more details.
- ccxt/__init__.py +1 -1
- ccxt/abstract/bingx.py +1 -1
- ccxt/abstract/coinmetro.py +1 -0
- ccxt/async_support/__init__.py +1 -1
- ccxt/async_support/base/exchange.py +1 -1
- ccxt/async_support/bingx.py +18 -11
- ccxt/async_support/coinex.py +496 -250
- ccxt/async_support/coinmetro.py +31 -31
- ccxt/async_support/okx.py +47 -1
- ccxt/base/exchange.py +1 -1
- ccxt/bingx.py +18 -11
- ccxt/coinex.py +496 -250
- ccxt/coinmetro.py +31 -31
- ccxt/okx.py +47 -1
- ccxt/pro/__init__.py +1 -1
- {ccxt-4.3.8.dist-info → ccxt-4.3.9.dist-info}/METADATA +4 -4
- {ccxt-4.3.8.dist-info → ccxt-4.3.9.dist-info}/RECORD +19 -19
- {ccxt-4.3.8.dist-info → ccxt-4.3.9.dist-info}/WHEEL +0 -0
- {ccxt-4.3.8.dist-info → ccxt-4.3.9.dist-info}/top_level.txt +0 -0
ccxt/__init__.py
CHANGED
ccxt/abstract/bingx.py
CHANGED
@@ -86,13 +86,13 @@ class ImplicitAPI:
|
|
86
86
|
wallets_v1_private_post_capital_deposit_createsubaddress = walletsV1PrivatePostCapitalDepositCreateSubAddress = Entry('capital/deposit/createSubAddress', ['wallets', 'v1', 'private'], 'POST', {'cost': 1})
|
87
87
|
subaccount_v1_private_get_list = subAccountV1PrivateGetList = Entry('list', ['subAccount', 'v1', 'private'], 'GET', {'cost': 3})
|
88
88
|
subaccount_v1_private_get_assets = subAccountV1PrivateGetAssets = Entry('assets', ['subAccount', 'v1', 'private'], 'GET', {'cost': 3})
|
89
|
-
subaccount_v1_private_get_apikey_query = subAccountV1PrivateGetApiKeyQuery = Entry('apiKey/query', ['subAccount', 'v1', 'private'], 'GET', {'cost': 1})
|
90
89
|
subaccount_v1_private_post_create = subAccountV1PrivatePostCreate = Entry('create', ['subAccount', 'v1', 'private'], 'POST', {'cost': 3})
|
91
90
|
subaccount_v1_private_post_apikey_create = subAccountV1PrivatePostApiKeyCreate = Entry('apiKey/create', ['subAccount', 'v1', 'private'], 'POST', {'cost': 3})
|
92
91
|
subaccount_v1_private_post_apikey_edit = subAccountV1PrivatePostApiKeyEdit = Entry('apiKey/edit', ['subAccount', 'v1', 'private'], 'POST', {'cost': 3})
|
93
92
|
subaccount_v1_private_post_apikey_del = subAccountV1PrivatePostApiKeyDel = Entry('apiKey/del', ['subAccount', 'v1', 'private'], 'POST', {'cost': 3})
|
94
93
|
subaccount_v1_private_post_updatestatus = subAccountV1PrivatePostUpdateStatus = Entry('updateStatus', ['subAccount', 'v1', 'private'], 'POST', {'cost': 3})
|
95
94
|
account_v1_private_get_uid = accountV1PrivateGetUid = Entry('uid', ['account', 'v1', 'private'], 'GET', {'cost': 1})
|
95
|
+
account_v1_private_get_apikey_query = accountV1PrivateGetApiKeyQuery = Entry('apiKey/query', ['account', 'v1', 'private'], 'GET', {'cost': 1})
|
96
96
|
account_v1_private_post_innertransfer_authorizesubaccount = accountV1PrivatePostInnerTransferAuthorizeSubAccount = Entry('innerTransfer/authorizeSubAccount', ['account', 'v1', 'private'], 'POST', {'cost': 3})
|
97
97
|
user_auth_private_post_userdatastream = userAuthPrivatePostUserDataStream = Entry('userDataStream', ['user', 'auth', 'private'], 'POST', {'cost': 1})
|
98
98
|
user_auth_private_put_userdatastream = userAuthPrivatePutUserDataStream = Entry('userDataStream', ['user', 'auth', 'private'], 'PUT', {'cost': 1})
|
ccxt/abstract/coinmetro.py
CHANGED
@@ -11,6 +11,7 @@ class ImplicitAPI:
|
|
11
11
|
public_get_exchange_book_pair = publicGetExchangeBookPair = Entry('exchange/book/{pair}', 'public', 'GET', {'cost': 3})
|
12
12
|
public_get_exchange_bookupdates_pair_from = publicGetExchangeBookUpdatesPairFrom = Entry('exchange/bookUpdates/{pair}/{from}', 'public', 'GET', {'cost': 1})
|
13
13
|
private_get_users_balances = privateGetUsersBalances = Entry('users/balances', 'private', 'GET', {'cost': 1})
|
14
|
+
private_get_users_wallets = privateGetUsersWallets = Entry('users/wallets', 'private', 'GET', {'cost': 1})
|
14
15
|
private_get_users_wallets_history_since = privateGetUsersWalletsHistorySince = Entry('users/wallets/history/{since}', 'private', 'GET', {'cost': 1.67})
|
15
16
|
private_get_exchange_orders_status_orderid = privateGetExchangeOrdersStatusOrderID = Entry('exchange/orders/status/{orderID}', 'private', 'GET', {'cost': 1})
|
16
17
|
private_get_exchange_orders_active = privateGetExchangeOrdersActive = Entry('exchange/orders/active', 'private', 'GET', {'cost': 1})
|
ccxt/async_support/__init__.py
CHANGED
ccxt/async_support/bingx.py
CHANGED
@@ -304,7 +304,6 @@ class bingx(Exchange, ImplicitAPI):
|
|
304
304
|
'get': {
|
305
305
|
'list': 3,
|
306
306
|
'assets': 3,
|
307
|
-
'apiKey/query': 1,
|
308
307
|
},
|
309
308
|
'post': {
|
310
309
|
'create': 3,
|
@@ -321,6 +320,7 @@ class bingx(Exchange, ImplicitAPI):
|
|
321
320
|
'private': {
|
322
321
|
'get': {
|
323
322
|
'uid': 1,
|
323
|
+
'apiKey/query': 1,
|
324
324
|
},
|
325
325
|
'post': {
|
326
326
|
'innerTransfer/authorizeSubAccount': 3,
|
@@ -1756,6 +1756,12 @@ class bingx(Exchange, ImplicitAPI):
|
|
1756
1756
|
}
|
1757
1757
|
isMarketOrder = type == 'MARKET'
|
1758
1758
|
isSpot = marketType == 'spot'
|
1759
|
+
stopLossPrice = self.safe_string(params, 'stopLossPrice')
|
1760
|
+
takeProfitPrice = self.safe_string(params, 'takeProfitPrice')
|
1761
|
+
triggerPrice = self.safe_string_2(params, 'stopPrice', 'triggerPrice')
|
1762
|
+
isTriggerOrder = triggerPrice is not None
|
1763
|
+
isStopLossPriceOrder = stopLossPrice is not None
|
1764
|
+
isTakeProfitPriceOrder = takeProfitPrice is not None
|
1759
1765
|
exchangeClientOrderId = 'newClientOrderId' if isSpot else 'clientOrderID'
|
1760
1766
|
clientOrderId = self.safe_string_2(params, exchangeClientOrderId, 'clientOrderId')
|
1761
1767
|
if clientOrderId is not None:
|
@@ -1768,7 +1774,6 @@ class bingx(Exchange, ImplicitAPI):
|
|
1768
1774
|
request['timeInForce'] = 'IOC'
|
1769
1775
|
elif timeInForce == 'GTC':
|
1770
1776
|
request['timeInForce'] = 'GTC'
|
1771
|
-
triggerPrice = self.safe_string_2(params, 'stopPrice', 'triggerPrice')
|
1772
1777
|
if isSpot:
|
1773
1778
|
cost = self.safe_number_2(params, 'cost', 'quoteOrderQty')
|
1774
1779
|
params = self.omit(params, 'cost')
|
@@ -1791,17 +1796,19 @@ class bingx(Exchange, ImplicitAPI):
|
|
1791
1796
|
request['type'] = 'TRIGGER_LIMIT'
|
1792
1797
|
elif type == 'MARKET':
|
1793
1798
|
request['type'] = 'TRIGGER_MARKET'
|
1799
|
+
elif (stopLossPrice is not None) or (takeProfitPrice is not None):
|
1800
|
+
stopTakePrice = stopLossPrice if (stopLossPrice is not None) else takeProfitPrice
|
1801
|
+
if type == 'LIMIT':
|
1802
|
+
request['type'] = 'TAKE_STOP_LIMIT'
|
1803
|
+
elif type == 'MARKET':
|
1804
|
+
request['type'] = 'TAKE_STOP_MARKET'
|
1805
|
+
request['stopPrice'] = self.parse_to_numeric(self.price_to_precision(symbol, stopTakePrice))
|
1794
1806
|
else:
|
1795
1807
|
if timeInForce == 'FOK':
|
1796
1808
|
request['timeInForce'] = 'FOK'
|
1797
|
-
stopLossPrice = self.safe_string(params, 'stopLossPrice')
|
1798
|
-
takeProfitPrice = self.safe_string(params, 'takeProfitPrice')
|
1799
1809
|
trailingAmount = self.safe_string(params, 'trailingAmount')
|
1800
1810
|
trailingPercent = self.safe_string_2(params, 'trailingPercent', 'priceRate')
|
1801
1811
|
trailingType = self.safe_string(params, 'trailingType', 'TRAILING_STOP_MARKET')
|
1802
|
-
isTriggerOrder = triggerPrice is not None
|
1803
|
-
isStopLossPriceOrder = stopLossPrice is not None
|
1804
|
-
isTakeProfitPriceOrder = takeProfitPrice is not None
|
1805
1812
|
isTrailingAmountOrder = trailingAmount is not None
|
1806
1813
|
isTrailingPercentOrder = trailingPercent is not None
|
1807
1814
|
isTrailing = isTrailingAmountOrder or isTrailingPercentOrder
|
@@ -1879,7 +1886,7 @@ class bingx(Exchange, ImplicitAPI):
|
|
1879
1886
|
positionSide = 'LONG' if (side == 'buy') else 'SHORT'
|
1880
1887
|
request['positionSide'] = positionSide
|
1881
1888
|
request['quantity'] = self.parse_to_numeric(self.amount_to_precision(symbol, amount))
|
1882
|
-
|
1889
|
+
params = self.omit(params, ['reduceOnly', 'triggerPrice', 'stopLossPrice', 'takeProfitPrice', 'trailingAmount', 'trailingPercent', 'trailingType', 'takeProfit', 'stopLoss', 'clientOrderId'])
|
1883
1890
|
return self.extend(request, params)
|
1884
1891
|
|
1885
1892
|
async def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: Num = None, params={}):
|
@@ -1897,9 +1904,9 @@ class bingx(Exchange, ImplicitAPI):
|
|
1897
1904
|
:param bool [params.postOnly]: True to place a post only order
|
1898
1905
|
:param str [params.timeInForce]: spot supports 'PO', 'GTC' and 'IOC', swap supports 'PO', 'GTC', 'IOC' and 'FOK'
|
1899
1906
|
:param bool [params.reduceOnly]: *swap only* True or False whether the order is reduce only
|
1900
|
-
:param float [params.triggerPrice]:
|
1901
|
-
:param float [params.stopLossPrice]:
|
1902
|
-
:param float [params.takeProfitPrice]:
|
1907
|
+
:param float [params.triggerPrice]: triggerPrice at which the attached take profit / stop loss order will be triggered
|
1908
|
+
:param float [params.stopLossPrice]: stop loss trigger price
|
1909
|
+
:param float [params.takeProfitPrice]: take profit trigger price
|
1903
1910
|
:param float [params.cost]: the quote quantity that can be used alternative for the amount
|
1904
1911
|
:param float [params.trailingAmount]: *swap only* the quote amount to trail away from the current market price
|
1905
1912
|
:param float [params.trailingPercent]: *swap only* the percent to trail away from the current market price
|