ccxt 4.4.65__py2.py3-none-any.whl → 4.4.67__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 +5 -1
- ccxt/abstract/cryptomus.py +20 -0
- ccxt/abstract/derive.py +117 -0
- ccxt/abstract/tradeogre.py +1 -0
- ccxt/abstract/whitebit.py +16 -0
- ccxt/async_support/__init__.py +5 -1
- ccxt/async_support/base/exchange.py +1 -1
- ccxt/async_support/binance.py +5 -3
- ccxt/async_support/bitget.py +22 -12
- ccxt/async_support/bitrue.py +5 -2
- ccxt/async_support/cryptomus.py +1041 -0
- ccxt/async_support/derive.py +2530 -0
- ccxt/async_support/gate.py +5 -1
- ccxt/async_support/htx.py +19 -5
- ccxt/async_support/tradeogre.py +131 -13
- ccxt/async_support/whitebit.py +276 -2
- ccxt/base/errors.py +0 -6
- ccxt/base/exchange.py +8 -1
- ccxt/binance.py +5 -3
- ccxt/bitget.py +22 -12
- ccxt/bitrue.py +5 -2
- ccxt/cryptomus.py +1041 -0
- ccxt/derive.py +2529 -0
- ccxt/gate.py +5 -1
- ccxt/htx.py +19 -5
- ccxt/pro/__init__.py +3 -1
- ccxt/pro/derive.py +704 -0
- ccxt/pro/gate.py +1 -0
- ccxt/test/tests_async.py +36 -3
- ccxt/test/tests_sync.py +36 -3
- ccxt/tradeogre.py +131 -13
- ccxt/whitebit.py +276 -2
- {ccxt-4.4.65.dist-info → ccxt-4.4.67.dist-info}/METADATA +14 -9
- {ccxt-4.4.65.dist-info → ccxt-4.4.67.dist-info}/RECORD +37 -30
- {ccxt-4.4.65.dist-info → ccxt-4.4.67.dist-info}/LICENSE.txt +0 -0
- {ccxt-4.4.65.dist-info → ccxt-4.4.67.dist-info}/WHEEL +0 -0
- {ccxt-4.4.65.dist-info → ccxt-4.4.67.dist-info}/top_level.txt +0 -0
ccxt/gate.py
CHANGED
@@ -1946,7 +1946,11 @@ class gate(Exchange, ImplicitAPI):
|
|
1946
1946
|
"""
|
1947
1947
|
self.load_markets()
|
1948
1948
|
symbols = self.market_symbols(symbols)
|
1949
|
-
|
1949
|
+
market = None
|
1950
|
+
if symbols is not None:
|
1951
|
+
firstSymbol = self.safe_string(symbols, 0)
|
1952
|
+
market = self.market(firstSymbol)
|
1953
|
+
request, query = self.prepare_request(market, 'swap', params)
|
1950
1954
|
response = self.publicFuturesGetSettleContracts(self.extend(request, query))
|
1951
1955
|
#
|
1952
1956
|
# [
|
ccxt/htx.py
CHANGED
@@ -909,6 +909,7 @@ class htx(Exchange, ImplicitAPI):
|
|
909
909
|
'1041': InvalidOrder, # {"status":"error","err_code":1041,"err_msg":"The order amount exceeds the limit(170000Cont), please modify and order again.","ts":1643802784940}
|
910
910
|
'1047': InsufficientFunds, # {"status":"error","err_code":1047,"err_msg":"Insufficient margin available.","ts":1643802672652}
|
911
911
|
'1048': InsufficientFunds, # {"status":"error","err_code":1048,"err_msg":"Insufficient close amount available.","ts":1652772408864}
|
912
|
+
'1061': OrderNotFound, # {"status":"ok","data":{"errors":[{"order_id":"1349442392365359104","err_code":1061,"err_msg":"The order does not exist."}],"successes":""},"ts":1741773744526}
|
912
913
|
'1051': InvalidOrder, # {"status":"error","err_code":1051,"err_msg":"No orders to cancel.","ts":1652552125876}
|
913
914
|
'1066': BadSymbol, # {"status":"error","err_code":1066,"err_msg":"The symbol field cannot be empty. Please re-enter.","ts":1640550819147}
|
914
915
|
'1067': InvalidOrder, # {"status":"error","err_code":1067,"err_msg":"The client_order_id field is invalid. Please re-enter.","ts":1643802119413}
|
@@ -6756,14 +6757,17 @@ class htx(Exchange, ImplicitAPI):
|
|
6756
6757
|
"""
|
6757
6758
|
self.load_markets()
|
6758
6759
|
symbols = self.market_symbols(symbols)
|
6759
|
-
|
6760
|
-
|
6761
|
-
subType = self.
|
6762
|
-
|
6760
|
+
defaultSubType = self.safe_string(self.options, 'defaultSubType', 'linear')
|
6761
|
+
subType = None
|
6762
|
+
subType, params = self.handle_option_and_params(params, 'fetchFundingRates', 'subType', defaultSubType)
|
6763
|
+
if symbols is not None:
|
6764
|
+
firstSymbol = self.safe_string(symbols, 0)
|
6765
|
+
market = self.market(firstSymbol)
|
6766
|
+
isLinear = market['linear']
|
6767
|
+
subType = 'linear' if isLinear else 'inverse'
|
6763
6768
|
request: dict = {
|
6764
6769
|
# 'contract_code': market['id'],
|
6765
6770
|
}
|
6766
|
-
params = self.omit(params, 'subType')
|
6767
6771
|
response = None
|
6768
6772
|
if subType == 'linear':
|
6769
6773
|
response = self.contractPublicGetLinearSwapApiV1SwapBatchFundingRate(self.extend(request, params))
|
@@ -7031,6 +7035,7 @@ class htx(Exchange, ImplicitAPI):
|
|
7031
7035
|
if 'status' in response:
|
7032
7036
|
#
|
7033
7037
|
# {"status":"error","err-code":"order-limitorder-amount-min-error","err-msg":"limit order amount error, min: `0.001`","data":null}
|
7038
|
+
# {"status":"ok","data":{"errors":[{"order_id":"1349442392365359104","err_code":1061,"err_msg":"The order does not exist."}],"successes":""},"ts":1741773744526}
|
7034
7039
|
#
|
7035
7040
|
status = self.safe_string(response, 'status')
|
7036
7041
|
if status == 'error':
|
@@ -7046,6 +7051,15 @@ class htx(Exchange, ImplicitAPI):
|
|
7046
7051
|
feedback = self.id + ' ' + body
|
7047
7052
|
code = self.safe_string(response, 'code')
|
7048
7053
|
self.throw_exactly_matched_exception(self.exceptions['exact'], code, feedback)
|
7054
|
+
data = self.safe_dict(response, 'data')
|
7055
|
+
errorsList = self.safe_list(data, 'errors')
|
7056
|
+
if errorsList is not None:
|
7057
|
+
first = self.safe_dict(errorsList, 0)
|
7058
|
+
errcode = self.safe_string(first, 'err_code')
|
7059
|
+
errmessage = self.safe_string(first, 'err_msg')
|
7060
|
+
feedBack = self.id + ' ' + body
|
7061
|
+
self.throw_exactly_matched_exception(self.exceptions['exact'], errcode, feedBack)
|
7062
|
+
self.throw_exactly_matched_exception(self.exceptions['exact'], errmessage, feedBack)
|
7049
7063
|
return None
|
7050
7064
|
|
7051
7065
|
def fetch_funding_history(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
|
ccxt/pro/__init__.py
CHANGED
@@ -4,7 +4,7 @@
|
|
4
4
|
|
5
5
|
# ----------------------------------------------------------------------------
|
6
6
|
|
7
|
-
__version__ = '4.4.
|
7
|
+
__version__ = '4.4.67'
|
8
8
|
|
9
9
|
# ----------------------------------------------------------------------------
|
10
10
|
|
@@ -47,6 +47,7 @@ from ccxt.pro.coinone import coinone # noqa
|
|
47
47
|
from ccxt.pro.cryptocom import cryptocom # noqa: F401
|
48
48
|
from ccxt.pro.defx import defx # noqa: F401
|
49
49
|
from ccxt.pro.deribit import deribit # noqa: F401
|
50
|
+
from ccxt.pro.derive import derive # noqa: F401
|
50
51
|
from ccxt.pro.exmo import exmo # noqa: F401
|
51
52
|
from ccxt.pro.gate import gate # noqa: F401
|
52
53
|
from ccxt.pro.gateio import gateio # noqa: F401
|
@@ -122,6 +123,7 @@ exchanges = [
|
|
122
123
|
'cryptocom',
|
123
124
|
'defx',
|
124
125
|
'deribit',
|
126
|
+
'derive',
|
125
127
|
'exmo',
|
126
128
|
'gate',
|
127
129
|
'gateio',
|