ccxt 4.4.45__py2.py3-none-any.whl → 4.4.47__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.
Files changed (118) hide show
  1. ccxt/__init__.py +1 -1
  2. ccxt/abstract/binance.py +1 -0
  3. ccxt/abstract/binancecoinm.py +1 -0
  4. ccxt/abstract/binanceus.py +1 -0
  5. ccxt/abstract/binanceusdm.py +1 -0
  6. ccxt/abstract/bybit.py +1 -0
  7. ccxt/ace.py +58 -0
  8. ccxt/alpaca.py +80 -0
  9. ccxt/ascendex.py +110 -3
  10. ccxt/async_support/__init__.py +1 -1
  11. ccxt/async_support/ace.py +58 -0
  12. ccxt/async_support/alpaca.py +80 -0
  13. ccxt/async_support/ascendex.py +110 -3
  14. ccxt/async_support/base/exchange.py +1 -1
  15. ccxt/async_support/bigone.py +113 -4
  16. ccxt/async_support/binance.py +4 -5
  17. ccxt/async_support/binanceus.py +10 -0
  18. ccxt/async_support/bingx.py +1 -2
  19. ccxt/async_support/bit2c.py +56 -0
  20. ccxt/async_support/bitbank.py +58 -0
  21. ccxt/async_support/bitbns.py +60 -0
  22. ccxt/async_support/bitfinex.py +2 -3
  23. ccxt/async_support/bitfinex1.py +8 -0
  24. ccxt/async_support/bitflyer.py +71 -0
  25. ccxt/async_support/bitget.py +103 -40
  26. ccxt/async_support/bithumb.py +54 -0
  27. ccxt/async_support/bitmex.py +1 -2
  28. ccxt/async_support/bitopro.py +74 -0
  29. ccxt/async_support/bitrue.py +97 -17
  30. ccxt/async_support/bitso.py +59 -0
  31. ccxt/async_support/bitteam.py +73 -0
  32. ccxt/async_support/bitvavo.py +70 -2
  33. ccxt/async_support/bl3p.py +42 -0
  34. ccxt/async_support/blockchaincom.py +66 -2
  35. ccxt/async_support/blofin.py +87 -1
  36. ccxt/async_support/btcalpha.py +73 -0
  37. ccxt/async_support/btcbox.py +58 -0
  38. ccxt/async_support/btcmarkets.py +73 -0
  39. ccxt/async_support/btcturk.py +61 -0
  40. ccxt/async_support/bybit.py +87 -39
  41. ccxt/async_support/cex.py +57 -0
  42. ccxt/async_support/coinbase.py +1 -1
  43. ccxt/async_support/coinbaseexchange.py +76 -0
  44. ccxt/async_support/coinex.py +1 -2
  45. ccxt/async_support/delta.py +10 -6
  46. ccxt/async_support/gate.py +3 -4
  47. ccxt/async_support/hashkey.py +1 -2
  48. ccxt/async_support/hollaex.py +1 -1
  49. ccxt/async_support/htx.py +2 -4
  50. ccxt/async_support/hyperliquid.py +6 -7
  51. ccxt/async_support/krakenfutures.py +2 -0
  52. ccxt/async_support/lbank.py +1 -2
  53. ccxt/async_support/mexc.py +1 -0
  54. ccxt/async_support/okx.py +13 -9
  55. ccxt/async_support/onetrading.py +18 -3
  56. ccxt/async_support/oxfun.py +1 -2
  57. ccxt/async_support/whitebit.py +2 -2
  58. ccxt/async_support/woo.py +1 -2
  59. ccxt/async_support/woofipro.py +1 -2
  60. ccxt/base/errors.py +6 -0
  61. ccxt/base/exchange.py +16 -14
  62. ccxt/bigone.py +113 -4
  63. ccxt/binance.py +4 -5
  64. ccxt/binanceus.py +10 -0
  65. ccxt/bingx.py +1 -2
  66. ccxt/bit2c.py +56 -0
  67. ccxt/bitbank.py +58 -0
  68. ccxt/bitbns.py +60 -0
  69. ccxt/bitfinex.py +2 -3
  70. ccxt/bitfinex1.py +8 -0
  71. ccxt/bitflyer.py +71 -0
  72. ccxt/bitget.py +103 -40
  73. ccxt/bithumb.py +54 -0
  74. ccxt/bitmex.py +1 -2
  75. ccxt/bitopro.py +74 -0
  76. ccxt/bitrue.py +97 -17
  77. ccxt/bitso.py +59 -0
  78. ccxt/bitteam.py +73 -0
  79. ccxt/bitvavo.py +70 -2
  80. ccxt/bl3p.py +42 -0
  81. ccxt/blockchaincom.py +66 -2
  82. ccxt/blofin.py +87 -1
  83. ccxt/btcalpha.py +73 -0
  84. ccxt/btcbox.py +58 -0
  85. ccxt/btcmarkets.py +73 -0
  86. ccxt/btcturk.py +61 -0
  87. ccxt/bybit.py +87 -39
  88. ccxt/cex.py +57 -0
  89. ccxt/coinbase.py +1 -1
  90. ccxt/coinbaseexchange.py +76 -0
  91. ccxt/coinex.py +1 -2
  92. ccxt/delta.py +10 -6
  93. ccxt/gate.py +3 -4
  94. ccxt/hashkey.py +1 -2
  95. ccxt/hollaex.py +1 -1
  96. ccxt/htx.py +2 -4
  97. ccxt/hyperliquid.py +6 -7
  98. ccxt/krakenfutures.py +2 -0
  99. ccxt/lbank.py +1 -2
  100. ccxt/mexc.py +1 -0
  101. ccxt/okx.py +13 -9
  102. ccxt/onetrading.py +18 -3
  103. ccxt/oxfun.py +1 -2
  104. ccxt/pro/__init__.py +1 -1
  105. ccxt/pro/bingx.py +3 -5
  106. ccxt/pro/bitget.py +2 -4
  107. ccxt/pro/coinex.py +1 -1
  108. ccxt/pro/xt.py +1 -1
  109. ccxt/test/tests_async.py +2 -0
  110. ccxt/test/tests_sync.py +2 -0
  111. ccxt/whitebit.py +2 -2
  112. ccxt/woo.py +1 -2
  113. ccxt/woofipro.py +1 -2
  114. {ccxt-4.4.45.dist-info → ccxt-4.4.47.dist-info}/METADATA +4 -5
  115. {ccxt-4.4.45.dist-info → ccxt-4.4.47.dist-info}/RECORD +118 -118
  116. {ccxt-4.4.45.dist-info → ccxt-4.4.47.dist-info}/LICENSE.txt +0 -0
  117. {ccxt-4.4.45.dist-info → ccxt-4.4.47.dist-info}/WHEEL +0 -0
  118. {ccxt-4.4.45.dist-info → ccxt-4.4.47.dist-info}/top_level.txt +0 -0
ccxt/btcturk.py CHANGED
@@ -136,6 +136,67 @@ class btcturk(Exchange, ImplicitAPI):
136
136
  },
137
137
  },
138
138
  },
139
+ 'features': {
140
+ 'spot': {
141
+ 'sandbox': False,
142
+ 'createOrder': {
143
+ 'marginMode': False,
144
+ 'triggerPrice': True,
145
+ 'triggerPriceType': None,
146
+ 'triggerDirection': False,
147
+ 'stopLossPrice': False,
148
+ 'takeProfitPrice': False,
149
+ 'attachedStopLossTakeProfit': None,
150
+ 'timeInForce': {
151
+ 'IOC': False,
152
+ 'FOK': False,
153
+ 'PO': False,
154
+ 'GTD': False,
155
+ },
156
+ 'hedged': False,
157
+ 'leverage': False,
158
+ 'marketBuyRequiresPrice': False,
159
+ 'marketBuyByCost': False,
160
+ 'selfTradePrevention': False,
161
+ 'trailing': False,
162
+ 'iceberg': False,
163
+ },
164
+ 'createOrders': None,
165
+ 'fetchMyTrades': {
166
+ 'marginMode': False,
167
+ 'limit': 100,
168
+ 'daysBack': 100000,
169
+ 'untilDays': 30,
170
+ },
171
+ 'fetchOrder': None,
172
+ 'fetchOpenOrders': {
173
+ 'marginMode': False,
174
+ 'limit': None,
175
+ 'trigger': False,
176
+ 'trailing': False,
177
+ },
178
+ 'fetchOrders': {
179
+ 'marginMode': False,
180
+ 'limit': 1000,
181
+ 'daysBack': 100000,
182
+ 'untilDays': 30,
183
+ 'trigger': False,
184
+ 'trailing': False,
185
+ },
186
+ 'fetchClosedOrders': None,
187
+ 'fetchOHLCV': {
188
+ 'limit': None,
189
+ },
190
+ },
191
+ 'swap': {
192
+ 'linear': None,
193
+ 'inverse': None,
194
+ },
195
+ 'future': {
196
+ 'linear': None,
197
+ 'inverse': None,
198
+ },
199
+ },
139
200
  'fees': {
140
201
  'trading': {
141
202
  'maker': self.parse_number('0.0005'),
ccxt/bybit.py CHANGED
@@ -355,6 +355,7 @@ class bybit(Exchange, ImplicitAPI):
355
355
  'v5/account/contract-transaction-log': 1,
356
356
  'v5/account/smp-group': 1,
357
357
  'v5/account/mmp-state': 5,
358
+ 'v5/account/withdrawal': 5,
358
359
  # asset
359
360
  'v5/asset/exchange/query-coin-list': 0.5, # 100/s => cost = 50 / 100 = 0.5
360
361
  'v5/asset/exchange/convert-result-query': 0.5, # 100/s => cost = 50 / 100 = 0.5
@@ -1072,8 +1073,78 @@ class bybit(Exchange, ImplicitAPI):
1072
1073
  'ERC20': 'ETH',
1073
1074
  'TRC20': 'TRX',
1074
1075
  'BEP20': 'BSC',
1076
+ 'SOL': 'SOL',
1077
+ 'ACA': 'ACA',
1078
+ 'ADA': 'ADA',
1079
+ 'ALGO': 'ALGO',
1080
+ 'APT': 'APTOS',
1081
+ 'AR': 'AR',
1082
+ 'ARBONE': 'ARBI',
1083
+ 'AVAXC': 'CAVAX',
1084
+ 'AVAXX': 'XAVAX',
1085
+ 'ATOM': 'ATOM',
1086
+ 'BCH': 'BCH',
1087
+ 'BEP2': 'BNB',
1088
+ 'CHZ': 'CHZ',
1089
+ 'DCR': 'DCR',
1090
+ 'DGB': 'DGB',
1091
+ 'DOGE': 'DOGE',
1092
+ 'DOT': 'DOT',
1093
+ 'EGLD': 'EGLD',
1094
+ 'EOS': 'EOS',
1095
+ 'ETC': 'ETC',
1096
+ 'ETHF': 'ETHF',
1097
+ 'ETHW': 'ETHW',
1098
+ 'FIL': 'FIL',
1099
+ 'STEP': 'FITFI',
1100
+ 'FLOW': 'FLOW',
1101
+ 'FTM': 'FTM',
1102
+ 'GLMR': 'GLMR',
1103
+ 'HBAR': 'HBAR',
1104
+ 'HNT': 'HNT',
1105
+ 'ICP': 'ICP',
1106
+ 'ICX': 'ICX',
1107
+ 'KDA': 'KDA',
1108
+ 'KLAY': 'KLAY',
1109
+ 'KMA': 'KMA',
1110
+ 'KSM': 'KSM',
1111
+ 'LTC': 'LTC',
1112
+ # 'TERRA': 'LUNANEW',
1113
+ # 'TERRACLASSIC': 'LUNA',
1114
+ 'MATIC': 'MATIC',
1115
+ 'MINA': 'MINA',
1116
+ 'MOVR': 'MOVR',
1117
+ 'NEAR': 'NEAR',
1118
+ 'NEM': 'NEM',
1119
+ 'OASYS': 'OAS',
1120
+ 'OASIS': 'ROSE',
1075
1121
  'OMNI': 'OMNI',
1076
- 'SPL': 'SOL',
1122
+ 'ONE': 'ONE',
1123
+ 'OPTIMISM': 'OP',
1124
+ 'POKT': 'POKT',
1125
+ 'QTUM': 'QTUM',
1126
+ 'RVN': 'RVN',
1127
+ 'SC': 'SC',
1128
+ 'SCRT': 'SCRT',
1129
+ 'STX': 'STX',
1130
+ 'THETA': 'THETA',
1131
+ 'TON': 'TON',
1132
+ 'WAVES': 'WAVES',
1133
+ 'WAX': 'WAXP',
1134
+ 'XDC': 'XDC',
1135
+ 'XEC': 'XEC',
1136
+ 'XLM': 'XLM',
1137
+ 'XRP': 'XRP',
1138
+ 'XTZ': 'XTZ',
1139
+ 'XYM': 'XYM',
1140
+ 'ZEN': 'ZEN',
1141
+ 'ZIL': 'ZIL',
1142
+ 'ZKSYNC': 'ZKSYNC',
1143
+ # todo: uncomment after consensus
1144
+ # 'CADUCEUS': 'CMP',
1145
+ # 'KON': 'KON', # konpay, "konchain"
1146
+ # 'AURORA': 'AURORA',
1147
+ # 'BITCOINGOLD': 'BTG',
1077
1148
  },
1078
1149
  'networksById': {
1079
1150
  'ETH': 'ERC20',
@@ -2629,8 +2700,7 @@ class bybit(Exchange, ImplicitAPI):
2629
2700
  timestamp = self.safe_integer(response, 'time')
2630
2701
  for i in range(0, len(tickerList)):
2631
2702
  tickerList[i]['timestamp'] = timestamp # will be removed inside the parser
2632
- result = self.parse_funding_rates(tickerList)
2633
- return self.filter_by_array(result, 'symbol', symbols)
2703
+ return self.parse_funding_rates(tickerList, symbols)
2634
2704
 
2635
2705
  def fetch_funding_rate_history(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
2636
2706
  """
@@ -3139,7 +3209,11 @@ class bybit(Exchange, ImplicitAPI):
3139
3209
  if (loan is not None) and (interest is not None):
3140
3210
  account['debt'] = Precise.string_add(loan, interest)
3141
3211
  account['total'] = self.safe_string(coinEntry, 'walletBalance')
3142
- account['free'] = self.safe_string_2(coinEntry, 'availableToWithdraw', 'free')
3212
+ free = self.safe_string_2(coinEntry, 'availableToWithdraw', 'free')
3213
+ if free is not None:
3214
+ account['free'] = free
3215
+ else:
3216
+ account['used'] = self.safe_string(coinEntry, 'locked')
3143
3217
  # account['used'] = self.safe_string(coinEntry, 'locked')
3144
3218
  currencyId = self.safe_string(coinEntry, 'coin')
3145
3219
  code = self.safe_currency_code(currencyId)
@@ -5058,12 +5132,11 @@ classic accounts only/ spot not supported* fetches information on an order made
5058
5132
  address = self.safe_string(depositAddress, 'addressDeposit')
5059
5133
  tag = self.safe_string(depositAddress, 'tagDeposit')
5060
5134
  code = self.safe_string(currency, 'code')
5061
- chain = self.safe_string(depositAddress, 'chain')
5062
5135
  self.check_address(address)
5063
5136
  return {
5064
5137
  'info': depositAddress,
5065
5138
  'currency': code,
5066
- 'network': chain,
5139
+ 'network': self.network_id_to_code(self.safe_string(depositAddress, 'chain'), code),
5067
5140
  'address': address,
5068
5141
  'tag': tag,
5069
5142
  }
@@ -5083,6 +5156,10 @@ classic accounts only/ spot not supported* fetches information on an order made
5083
5156
  request: dict = {
5084
5157
  'coin': currency['id'],
5085
5158
  }
5159
+ networkCode = None
5160
+ networkCode, params = self.handle_network_code_and_params(params)
5161
+ if networkCode is not None:
5162
+ request['chainType'] = self.network_code_to_id(networkCode, code)
5086
5163
  response = self.privateGetV5AssetDepositQueryAddress(self.extend(request, params))
5087
5164
  #
5088
5165
  # {
@@ -5123,40 +5200,11 @@ classic accounts only/ spot not supported* fetches information on an order made
5123
5200
  :returns dict: an `address structure <https://docs.ccxt.com/#/?id=address-structure>`
5124
5201
  """
5125
5202
  self.load_markets()
5126
- networkCode, query = self.handle_network_code_and_params(params)
5127
- networkId = self.network_code_to_id(networkCode)
5128
5203
  currency = self.currency(code)
5129
- request: dict = {
5130
- 'coin': currency['id'],
5131
- }
5132
- if networkId is not None:
5133
- request['chainType'] = networkId
5134
- response = self.privateGetV5AssetDepositQueryAddress(self.extend(request, query))
5135
- #
5136
- # {
5137
- # "retCode": 0,
5138
- # "retMsg": "success",
5139
- # "result": {
5140
- # "coin": "USDT",
5141
- # "chains": [
5142
- # {
5143
- # "chainType": "ERC20",
5144
- # "addressDeposit": "0xd9e1cd77afa0e50b452a62fbb68a3340602286c3",
5145
- # "tagDeposit": "",
5146
- # "chain": "ETH"
5147
- # }
5148
- # ]
5149
- # },
5150
- # "retExtInfo": {},
5151
- # "time": 1672192792860
5152
- # }
5153
- #
5154
- result = self.safe_dict(response, 'result', {})
5155
- chains = self.safe_list(result, 'chains', [])
5156
- chainsIndexedById = self.index_by(chains, 'chain')
5157
- selectedNetworkId = self.select_network_id_from_raw_networks(code, networkCode, chainsIndexedById)
5158
- addressObject = self.safe_dict(chainsIndexedById, selectedNetworkId, {})
5159
- return self.parse_deposit_address(addressObject, currency)
5204
+ networkCode, paramsOmited = self.handle_network_code_and_params(params)
5205
+ indexedAddresses = self.fetch_deposit_addresses_by_network(code, paramsOmited)
5206
+ selectedNetworkCode = self.select_network_code_from_unified_networks(currency['code'], networkCode, indexedAddresses)
5207
+ return indexedAddresses[selectedNetworkCode]
5160
5208
 
5161
5209
  def fetch_deposits(self, code: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Transaction]:
5162
5210
  """
ccxt/cex.py CHANGED
@@ -118,6 +118,63 @@ class cex(Exchange, ImplicitAPI):
118
118
  },
119
119
  },
120
120
  },
121
+ 'features': {
122
+ 'spot': {
123
+ 'sandbox': False,
124
+ 'createOrder': {
125
+ 'marginMode': False,
126
+ 'triggerPrice': True,
127
+ 'triggerPriceType': None,
128
+ 'triggerDirection': False,
129
+ 'stopLossPrice': False, # todo
130
+ 'takeProfitPrice': False, # todo
131
+ 'attachedStopLossTakeProfit': None,
132
+ 'timeInForce': {
133
+ 'IOC': True,
134
+ 'FOK': True,
135
+ 'PO': False, # todo check
136
+ 'GTD': True,
137
+ },
138
+ 'hedged': False,
139
+ 'leverage': False,
140
+ 'marketBuyRequiresPrice': False,
141
+ 'marketBuyByCost': True, # todo check
142
+ 'selfTradePrevention': False,
143
+ 'trailing': False,
144
+ 'iceberg': False,
145
+ },
146
+ 'createOrders': None,
147
+ 'fetchMyTrades': None,
148
+ 'fetchOrder': None,
149
+ 'fetchOpenOrders': {
150
+ 'marginMode': False,
151
+ 'limit': 1000,
152
+ 'trigger': False,
153
+ 'trailing': False,
154
+ },
155
+ 'fetchOrders': None,
156
+ 'fetchClosedOrders': {
157
+ 'marginMode': False,
158
+ 'limit': 1000,
159
+ 'daysBack': 100000,
160
+ 'daysBackCanceled': 1,
161
+ 'untilDays': 100000,
162
+ 'trigger': False,
163
+ 'trailing': False,
164
+ },
165
+ 'fetchOHLCV': {
166
+ 'limit': 1000,
167
+ },
168
+ },
169
+ 'swap': {
170
+ 'linear': None,
171
+ 'inverse': None,
172
+ },
173
+ 'future': {
174
+ 'linear': None,
175
+ 'inverse': None,
176
+ },
177
+ },
121
178
  'precisionMode': TICK_SIZE,
122
179
  'exceptions': {
123
180
  'exact': {},
ccxt/coinbase.py CHANGED
@@ -2382,7 +2382,7 @@ class coinbase(Exchange, ImplicitAPI):
2382
2382
  request, params = self.prepare_account_request_with_currency_code(code, limit, params)
2383
2383
  # for pagination use parameter 'starting_after'
2384
2384
  # the value for the next page can be obtained from the result of the previous call in the 'pagination' field
2385
- # eg: instance.last_json_response.pagination.next_starting_after
2385
+ # eg: instance.last_http_response -> pagination.next_starting_after
2386
2386
  response = self.v2PrivateGetAccountsAccountIdTransactions(self.extend(request, params))
2387
2387
  ledger = self.parse_ledger(response['data'], currency, since, limit)
2388
2388
  length = len(ledger)
ccxt/coinbaseexchange.py CHANGED
@@ -225,6 +225,82 @@ class coinbaseexchange(Exchange, ImplicitAPI):
225
225
  },
226
226
  },
227
227
  },
228
+ 'features': {
229
+ 'default': {
230
+ 'sandbox': True,
231
+ 'createOrder': {
232
+ 'marginMode': True,
233
+ 'triggerPrice': True,
234
+ 'triggerPriceType': None,
235
+ 'triggerDirection': False,
236
+ 'stopLossPrice': False, # todo
237
+ 'takeProfitPrice': False, # todo
238
+ 'attachedStopLossTakeProfit': None,
239
+ 'timeInForce': {
240
+ 'IOC': True,
241
+ 'FOK': True,
242
+ 'PO': True,
243
+ 'GTD': True,
244
+ },
245
+ 'hedged': False,
246
+ 'trailing': False,
247
+ 'leverage': False,
248
+ 'marketBuyByCost': False,
249
+ 'marketBuyRequiresPrice': False,
250
+ 'selfTradePrevention': False,
251
+ 'iceberg': True, # todo: implement
252
+ },
253
+ 'createOrders': None,
254
+ 'fetchMyTrades': {
255
+ 'marginMode': False,
256
+ 'limit': 100,
257
+ 'daysBack': 100000,
258
+ 'untilDays': 100000,
259
+ },
260
+ 'fetchOrder': {
261
+ 'marginMode': False,
262
+ 'trigger': False,
263
+ 'trailing': False,
264
+ },
265
+ 'fetchOpenOrders': {
266
+ 'marginMode': False,
267
+ 'limit': 100,
268
+ 'trigger': False,
269
+ 'trailing': False,
270
+ },
271
+ 'fetchOrders': {
272
+ 'marginMode': False,
273
+ 'limit': 100,
274
+ 'daysBack': 100000,
275
+ 'untilDays': 100000,
276
+ 'trigger': False,
277
+ 'trailing': False,
278
+ },
279
+ 'fetchClosedOrders': {
280
+ 'marginMode': False,
281
+ 'limit': 100,
282
+ 'daysBack': 100000,
283
+ 'daysBackCanceled': 1,
284
+ 'untilDays': 100000,
285
+ 'trigger': False,
286
+ 'trailing': False,
287
+ },
288
+ 'fetchOHLCV': {
289
+ 'limit': 300,
290
+ },
291
+ },
292
+ 'spot': {
293
+ 'extends': 'default',
294
+ },
295
+ 'swap': {
296
+ 'linear': None,
297
+ 'inverse': None,
298
+ },
299
+ 'future': {
300
+ 'linear': None,
301
+ 'inverse': None,
302
+ },
303
+ },
228
304
  'exceptions': {
229
305
  'exact': {
230
306
  'Insufficient funds': InsufficientFunds,
ccxt/coinex.py CHANGED
@@ -4588,8 +4588,7 @@ class coinex(Exchange, ImplicitAPI):
4588
4588
  # }
4589
4589
  #
4590
4590
  data = self.safe_list(response, 'data', [])
4591
- result = self.parse_funding_rates(data, market)
4592
- return self.filter_by_array(result, 'symbol', symbols)
4591
+ return self.parse_funding_rates(data, symbols)
4593
4592
 
4594
4593
  def withdraw(self, code: str, amount: float, address: str, tag=None, params={}) -> Transaction:
4595
4594
  """
ccxt/delta.py CHANGED
@@ -1446,13 +1446,14 @@ class delta(Exchange, ImplicitAPI):
1446
1446
  """
1447
1447
  fetches historical candlestick data containing the open, high, low, and close price, and the volume of a market
1448
1448
 
1449
- https://docs.delta.exchange/#get-ohlc-candles
1449
+ https://docs.delta.exchange/#delta-exchange-api-v2-historical-ohlc-candles-sparklines
1450
1450
 
1451
1451
  :param str symbol: unified symbol of the market to fetch OHLCV data for
1452
1452
  :param str timeframe: the length of time each candle represents
1453
1453
  :param int [since]: timestamp in ms of the earliest candle to fetch
1454
1454
  :param int [limit]: the maximum amount of candles to fetch
1455
1455
  :param dict [params]: extra parameters specific to the exchange API endpoint
1456
+ :param str [params.until]: timestamp in ms of the latest candle to fetch
1456
1457
  :returns int[][]: A list of candles ordered, open, high, low, close, volume
1457
1458
  """
1458
1459
  self.load_markets()
@@ -1462,14 +1463,18 @@ class delta(Exchange, ImplicitAPI):
1462
1463
  }
1463
1464
  duration = self.parse_timeframe(timeframe)
1464
1465
  limit = limit if limit else 2000 # max 2000
1466
+ until = self.safe_integer_product(params, 'until', 0.001)
1467
+ untilIsDefined = (until is not None)
1468
+ if untilIsDefined:
1469
+ until = self.parse_to_int(until)
1465
1470
  if since is None:
1466
- end = self.seconds()
1471
+ end = until if untilIsDefined else self.seconds()
1467
1472
  request['end'] = end
1468
1473
  request['start'] = end - limit * duration
1469
1474
  else:
1470
1475
  start = self.parse_to_int(since / 1000)
1471
1476
  request['start'] = start
1472
- request['end'] = self.sum(start, limit * duration)
1477
+ request['end'] = until if untilIsDefined else self.sum(start, limit * duration)
1473
1478
  price = self.safe_string(params, 'price')
1474
1479
  if price == 'mark':
1475
1480
  request['symbol'] = 'MARK:' + market['id']
@@ -1477,7 +1482,7 @@ class delta(Exchange, ImplicitAPI):
1477
1482
  request['symbol'] = market['info']['spot_index']['symbol']
1478
1483
  else:
1479
1484
  request['symbol'] = market['id']
1480
- params = self.omit(params, 'price')
1485
+ params = self.omit(params, ['price', 'until'])
1481
1486
  response = self.publicGetHistoryCandles(self.extend(request, params))
1482
1487
  #
1483
1488
  # {
@@ -2458,8 +2463,7 @@ class delta(Exchange, ImplicitAPI):
2458
2463
  # }
2459
2464
  #
2460
2465
  rates = self.safe_list(response, 'result', [])
2461
- result = self.parse_funding_rates(rates)
2462
- return self.filter_by_array(result, 'symbol', symbols)
2466
+ return self.parse_funding_rates(rates, symbols)
2463
2467
 
2464
2468
  def parse_funding_rate(self, contract, market: Market = None) -> FundingRate:
2465
2469
  #
ccxt/gate.py CHANGED
@@ -734,7 +734,6 @@ class gate(Exchange, ImplicitAPI):
734
734
  'takeProfitPrice': True,
735
735
  'attachedStopLossTakeProfit': None,
736
736
  'timeInForce': {
737
- 'GTC': True,
738
737
  'IOC': True,
739
738
  'FOK': True,
740
739
  'PO': True,
@@ -1962,8 +1961,7 @@ class gate(Exchange, ImplicitAPI):
1962
1961
  # }
1963
1962
  # ]
1964
1963
  #
1965
- result = self.parse_funding_rates(response)
1966
- return self.filter_by_array(result, 'symbol', symbols)
1964
+ return self.parse_funding_rates(response, symbols)
1967
1965
 
1968
1966
  def parse_funding_rate(self, contract, market: Market = None) -> FundingRate:
1969
1967
  #
@@ -2377,7 +2375,8 @@ class gate(Exchange, ImplicitAPI):
2377
2375
  chainKeys = list(withdrawFixOnChains.keys())
2378
2376
  for i in range(0, len(chainKeys)):
2379
2377
  chainKey = chainKeys[i]
2380
- result['networks'][chainKey] = {
2378
+ networkCode = self.network_id_to_code(chainKey, self.safe_string(fee, 'currency'))
2379
+ result['networks'][networkCode] = {
2381
2380
  'withdraw': {
2382
2381
  'fee': self.parse_number(withdrawFixOnChains[chainKey]),
2383
2382
  'percentage': False,
ccxt/hashkey.py CHANGED
@@ -3623,8 +3623,7 @@ class hashkey(Exchange, ImplicitAPI):
3623
3623
  # {"symbol": "ETHUSDT-PERPETUAL", "rate": "0.0001", "nextSettleTime": "1722297600000"}
3624
3624
  # ]
3625
3625
  #
3626
- fundingRates = self.parse_funding_rates(response)
3627
- return self.filter_by_array(fundingRates, 'symbol', symbols)
3626
+ return self.parse_funding_rates(response, symbols)
3628
3627
 
3629
3628
  def parse_funding_rate(self, contract, market: Market = None) -> FundingRate:
3630
3629
  #
ccxt/hollaex.py CHANGED
@@ -353,7 +353,7 @@ class hollaex(Exchange, ImplicitAPI):
353
353
  # "verified":true,
354
354
  # "allow_deposit":true,
355
355
  # "allow_withdrawal":true,
356
- # "withdrawal_fee":0.0001,
356
+ # "withdrawal_fee":0.0002,
357
357
  # "min":0.001,
358
358
  # "max":100000,
359
359
  # "increment_unit":0.001,
ccxt/htx.py CHANGED
@@ -6779,8 +6779,7 @@ class htx(Exchange, ImplicitAPI):
6779
6779
  # }
6780
6780
  #
6781
6781
  data = self.safe_value(response, 'data', [])
6782
- result = self.parse_funding_rates(data)
6783
- return self.filter_by_array(result, 'symbol', symbols)
6782
+ return self.parse_funding_rates(data, symbols)
6784
6783
 
6785
6784
  def fetch_borrow_interest(self, code: Str = None, symbol: Str = None, since: Int = None, limit: Int = None, params={}) -> List[BorrowInterest]:
6786
6785
  """
@@ -8097,8 +8096,7 @@ class htx(Exchange, ImplicitAPI):
8097
8096
  # }
8098
8097
  #
8099
8098
  data = self.safe_list(response, 'data', [])
8100
- result = self.parse_open_interests(data)
8101
- return self.filter_by_array(result, 'symbol', symbols)
8099
+ return self.parse_open_interests(data, symbols)
8102
8100
 
8103
8101
  def fetch_open_interest(self, symbol: str, params={}):
8104
8102
  """
ccxt/hyperliquid.py CHANGED
@@ -238,7 +238,6 @@ class hyperliquid(Exchange, ImplicitAPI):
238
238
  'takeProfitPrice': False,
239
239
  'attachedStopLossTakeProfit': None,
240
240
  'timeInForce': {
241
- 'GTC': True,
242
241
  'IOC': True,
243
242
  'FOK': False,
244
243
  'PO': True,
@@ -967,8 +966,7 @@ class hyperliquid(Exchange, ImplicitAPI):
967
966
  self.safe_dict(assetCtxs, i, {})
968
967
  )
969
968
  result.append(data)
970
- funding_rates = self.parse_funding_rates(result)
971
- return self.filter_by_array(funding_rates, 'symbol', symbols)
969
+ return self.parse_funding_rates(result, symbols)
972
970
 
973
971
  def parse_funding_rate(self, info, market: Market = None) -> FundingRate:
974
972
  #
@@ -1859,6 +1857,8 @@ class hyperliquid(Exchange, ImplicitAPI):
1859
1857
  :returns dict[]: a list of `funding rate structures <https://docs.ccxt.com/#/?id=funding-rate-history-structure>`
1860
1858
  """
1861
1859
  self.load_markets()
1860
+ if symbol is None:
1861
+ raise ArgumentsRequired(self.id + ' fetchFundingRateHistory() requires a symbol argument')
1862
1862
  market = self.market(symbol)
1863
1863
  request: dict = {
1864
1864
  'type': 'fundingHistory',
@@ -2181,7 +2181,7 @@ class hyperliquid(Exchange, ImplicitAPI):
2181
2181
  else:
2182
2182
  market = self.safe_market(marketId, market)
2183
2183
  symbol = market['symbol']
2184
- timestamp = self.safe_integer_2(order, 'timestamp', 'statusTimestamp')
2184
+ timestamp = self.safe_integer(entry, 'timestamp')
2185
2185
  status = self.safe_string_2(order, 'status', 'ccxtStatus')
2186
2186
  order = self.omit(order, ['ccxtStatus'])
2187
2187
  side = self.safe_string(entry, 'side')
@@ -2196,7 +2196,7 @@ class hyperliquid(Exchange, ImplicitAPI):
2196
2196
  'timestamp': timestamp,
2197
2197
  'datetime': self.iso8601(timestamp),
2198
2198
  'lastTradeTimestamp': None,
2199
- 'lastUpdateTimestamp': None,
2199
+ 'lastUpdateTimestamp': self.safe_integer(order, 'statusTimestamp'),
2200
2200
  'symbol': symbol,
2201
2201
  'type': self.parse_order_type(self.safe_string_lower(entry, 'orderType')),
2202
2202
  'timeInForce': self.safe_string_upper(entry, 'tif'),
@@ -3147,8 +3147,7 @@ class hyperliquid(Exchange, ImplicitAPI):
3147
3147
  self.load_markets()
3148
3148
  symbols = self.market_symbols(symbols)
3149
3149
  swapMarkets = self.fetch_swap_markets()
3150
- result = self.parse_open_interests(swapMarkets)
3151
- return self.filter_by_array(result, 'symbol', symbols)
3150
+ return self.parse_open_interests(swapMarkets, symbols)
3152
3151
 
3153
3152
  def fetch_open_interest(self, symbol: str, params={}):
3154
3153
  """
ccxt/krakenfutures.py CHANGED
@@ -2476,6 +2476,8 @@ class krakenfutures(Exchange, ImplicitAPI):
2476
2476
  marketId = self.safe_string(info, 'symbol')
2477
2477
  market = self.safe_market(marketId, market)
2478
2478
  tiers = []
2479
+ if marginLevels is None:
2480
+ return tiers
2479
2481
  for i in range(0, len(marginLevels)):
2480
2482
  tier = marginLevels[i]
2481
2483
  initialMargin = self.safe_string(tier, 'initialMargin')
ccxt/lbank.py CHANGED
@@ -1248,8 +1248,7 @@ class lbank(Exchange, ImplicitAPI):
1248
1248
  # "success": True,
1249
1249
  # }
1250
1250
  data = self.safe_list(response, 'data', [])
1251
- result = self.parse_funding_rates(data)
1252
- return self.filter_by_array(result, 'symbol', symbols)
1251
+ return self.parse_funding_rates(data, symbols)
1253
1252
 
1254
1253
  def fetch_balance(self, params={}) -> Balances:
1255
1254
  """
ccxt/mexc.py CHANGED
@@ -457,6 +457,7 @@ class mexc(Exchange, ImplicitAPI):
457
457
  '1h': '60m',
458
458
  '4h': '4h',
459
459
  '1d': '1d',
460
+ '1w': '1W',
460
461
  '1M': '1M',
461
462
  },
462
463
  'swap': {