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/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
- request, query = self.prepare_request(None, 'swap', params)
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
- options = self.safe_value(self.options, 'fetchFundingRates', {})
6760
- defaultSubType = self.safe_string(self.options, 'defaultSubType', 'inverse')
6761
- subType = self.safe_string(options, 'subType', defaultSubType)
6762
- subType = self.safe_string(params, 'subType', subType)
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.65'
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',