ccxt 4.4.64__py2.py3-none-any.whl → 4.4.65__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/hyperliquid.py CHANGED
@@ -60,6 +60,7 @@ class hyperliquid(Exchange, ImplicitAPI):
60
60
  'createStopOrder': True,
61
61
  'createTriggerOrder': True,
62
62
  'editOrder': True,
63
+ 'editOrders': True,
63
64
  'fetchAccounts': False,
64
65
  'fetchBalance': True,
65
66
  'fetchBorrowInterest': False,
@@ -1355,7 +1356,7 @@ class hyperliquid(Exchange, ImplicitAPI):
1355
1356
  :returns dict: an `order structure <https://docs.ccxt.com/#/?id=order-structure>`
1356
1357
  """
1357
1358
  self.load_markets()
1358
- order, globalParams = self.parse_create_order_args(symbol, type, side, amount, price, params)
1359
+ order, globalParams = self.parse_create_edit_order_args(None, symbol, type, side, amount, price, params)
1359
1360
  orders = self.create_orders([order], globalParams)
1360
1361
  return orders[0]
1361
1362
 
@@ -1709,74 +1710,97 @@ class hyperliquid(Exchange, ImplicitAPI):
1709
1710
  #
1710
1711
  return response
1711
1712
 
1712
- def edit_order_request(self, id: str, symbol: str, type: str, side: str, amount: Num = None, price: Num = None, params={}):
1713
+ def edit_orders_request(self, orders, params={}):
1713
1714
  self.check_required_credentials()
1714
- if id is None:
1715
- raise ArgumentsRequired(self.id + ' editOrder() requires an id argument')
1716
- market = self.market(symbol)
1717
- type = type.upper()
1718
- isMarket = (type == 'MARKET')
1719
- side = side.upper()
1720
- isBuy = (side == 'BUY')
1721
- defaultSlippage = self.safe_string(self.options, 'defaultSlippage')
1722
- slippage = self.safe_string(params, 'slippage', defaultSlippage)
1723
- defaultTimeInForce = 'ioc' if (isMarket) else 'gtc'
1724
- postOnly = self.safe_bool(params, 'postOnly', False)
1725
- if postOnly:
1726
- defaultTimeInForce = 'alo'
1727
- timeInForce = self.safe_string_lower(params, 'timeInForce', defaultTimeInForce)
1728
- timeInForce = self.capitalize(timeInForce)
1729
- clientOrderId = self.safe_string_2(params, 'clientOrderId', 'client_id')
1730
- triggerPrice = self.safe_string_2(params, 'triggerPrice', 'stopPrice')
1731
- stopLossPrice = self.safe_string(params, 'stopLossPrice', triggerPrice)
1732
- takeProfitPrice = self.safe_string(params, 'takeProfitPrice')
1733
- isTrigger = (stopLossPrice or takeProfitPrice)
1734
- params = self.omit(params, ['slippage', 'timeInForce', 'triggerPrice', 'stopLossPrice', 'takeProfitPrice', 'clientOrderId', 'client_id'])
1735
- px = str(price)
1736
- if isMarket:
1737
- px = str(Precise.string_mul(price), Precise.string_add('1', slippage)) if (isBuy) else str(Precise.string_mul(price), Precise.string_sub('1', slippage))
1738
- else:
1739
- px = self.price_to_precision(symbol, str(price))
1740
- sz = self.amount_to_precision(symbol, amount)
1741
- reduceOnly = self.safe_bool(params, 'reduceOnly', False)
1742
- orderType: dict = {}
1743
- if isTrigger:
1744
- isTp = False
1745
- if takeProfitPrice is not None:
1746
- triggerPrice = self.price_to_precision(symbol, takeProfitPrice)
1747
- isTp = True
1715
+ hasClientOrderId = False
1716
+ for i in range(0, len(orders)):
1717
+ rawOrder = orders[i]
1718
+ orderParams = self.safe_dict(rawOrder, 'params', {})
1719
+ clientOrderId = self.safe_string_2(orderParams, 'clientOrderId', 'client_id')
1720
+ if clientOrderId is not None:
1721
+ hasClientOrderId = True
1722
+ if hasClientOrderId:
1723
+ for i in range(0, len(orders)):
1724
+ rawOrder = orders[i]
1725
+ orderParams = self.safe_dict(rawOrder, 'params', {})
1726
+ clientOrderId = self.safe_string_2(orderParams, 'clientOrderId', 'client_id')
1727
+ if clientOrderId is None:
1728
+ raise ArgumentsRequired(self.id + ' editOrders() all orders must have clientOrderId if at least one has a clientOrderId')
1729
+ params = self.omit(params, ['slippage', 'clientOrderId', 'client_id', 'slippage', 'triggerPrice', 'stopPrice', 'stopLossPrice', 'takeProfitPrice', 'timeInForce'])
1730
+ modifies = []
1731
+ for i in range(0, len(orders)):
1732
+ rawOrder = orders[i]
1733
+ id = self.safe_string(rawOrder, 'id')
1734
+ marketId = self.safe_string(rawOrder, 'symbol')
1735
+ market = self.market(marketId)
1736
+ symbol = market['symbol']
1737
+ type = self.safe_string_upper(rawOrder, 'type')
1738
+ isMarket = (type == 'MARKET')
1739
+ side = self.safe_string_upper(rawOrder, 'side')
1740
+ isBuy = (side == 'BUY')
1741
+ amount = self.safe_string(rawOrder, 'amount')
1742
+ price = self.safe_string(rawOrder, 'price')
1743
+ orderParams = self.safe_dict(rawOrder, 'params', {})
1744
+ defaultSlippage = self.safe_string(self.options, 'defaultSlippage')
1745
+ slippage = self.safe_string(orderParams, 'slippage', defaultSlippage)
1746
+ defaultTimeInForce = 'ioc' if (isMarket) else 'gtc'
1747
+ postOnly = self.safe_bool(orderParams, 'postOnly', False)
1748
+ if postOnly:
1749
+ defaultTimeInForce = 'alo'
1750
+ timeInForce = self.safe_string_lower(orderParams, 'timeInForce', defaultTimeInForce)
1751
+ timeInForce = self.capitalize(timeInForce)
1752
+ clientOrderId = self.safe_string_2(orderParams, 'clientOrderId', 'client_id')
1753
+ triggerPrice = self.safe_string_2(orderParams, 'triggerPrice', 'stopPrice')
1754
+ stopLossPrice = self.safe_string(orderParams, 'stopLossPrice', triggerPrice)
1755
+ takeProfitPrice = self.safe_string(orderParams, 'takeProfitPrice')
1756
+ isTrigger = (stopLossPrice or takeProfitPrice)
1757
+ reduceOnly = self.safe_bool(orderParams, 'reduceOnly', False)
1758
+ orderParams = self.omit(orderParams, ['slippage', 'timeInForce', 'triggerPrice', 'stopLossPrice', 'takeProfitPrice', 'clientOrderId', 'client_id', 'postOnly', 'reduceOnly'])
1759
+ px = str(price)
1760
+ if isMarket:
1761
+ px = str(Precise.string_mul(price), Precise.string_add('1', slippage)) if (isBuy) else str(Precise.string_mul(price), Precise.string_sub('1', slippage))
1748
1762
  else:
1749
- triggerPrice = self.price_to_precision(symbol, stopLossPrice)
1750
- orderType['trigger'] = {
1751
- 'isMarket': isMarket,
1752
- 'triggerPx': triggerPrice,
1753
- 'tpsl': 'tp' if (isTp) else 'sl',
1763
+ px = self.price_to_precision(symbol, str(price))
1764
+ sz = self.amount_to_precision(symbol, amount)
1765
+ orderType: dict = {}
1766
+ if isTrigger:
1767
+ isTp = False
1768
+ if takeProfitPrice is not None:
1769
+ triggerPrice = self.price_to_precision(symbol, takeProfitPrice)
1770
+ isTp = True
1771
+ else:
1772
+ triggerPrice = self.price_to_precision(symbol, stopLossPrice)
1773
+ orderType['trigger'] = {
1774
+ 'isMarket': isMarket,
1775
+ 'triggerPx': triggerPrice,
1776
+ 'tpsl': 'tp' if (isTp) else 'sl',
1777
+ }
1778
+ else:
1779
+ orderType['limit'] = {
1780
+ 'tif': timeInForce,
1781
+ }
1782
+ if triggerPrice is None:
1783
+ triggerPrice = '0'
1784
+ orderReq: dict = {
1785
+ 'a': self.parse_to_int(market['baseId']),
1786
+ 'b': isBuy,
1787
+ 'p': px,
1788
+ 's': sz,
1789
+ 'r': reduceOnly,
1790
+ 't': orderType,
1791
+ # 'c': clientOrderId,
1754
1792
  }
1755
- else:
1756
- orderType['limit'] = {
1757
- 'tif': timeInForce,
1793
+ if clientOrderId is not None:
1794
+ orderReq['c'] = clientOrderId
1795
+ modifyReq: dict = {
1796
+ 'oid': self.parse_to_int(id),
1797
+ 'order': orderReq,
1758
1798
  }
1759
- if triggerPrice is None:
1760
- triggerPrice = '0'
1799
+ modifies.append(modifyReq)
1761
1800
  nonce = self.milliseconds()
1762
- orderReq: dict = {
1763
- 'a': self.parse_to_int(market['baseId']),
1764
- 'b': isBuy,
1765
- 'p': px,
1766
- 's': sz,
1767
- 'r': reduceOnly,
1768
- 't': orderType,
1769
- # 'c': clientOrderId,
1770
- }
1771
- if clientOrderId is not None:
1772
- orderReq['c'] = clientOrderId
1773
- modifyReq: dict = {
1774
- 'oid': self.parse_to_int(id),
1775
- 'order': orderReq,
1776
- }
1777
1801
  modifyAction: dict = {
1778
1802
  'type': 'batchModify',
1779
- 'modifies': [modifyReq],
1803
+ 'modifies': modifies,
1780
1804
  }
1781
1805
  vaultAddress = self.format_vault_address(self.safe_string(params, 'vaultAddress'))
1782
1806
  signature = self.sign_l1_action(modifyAction, nonce, vaultAddress)
@@ -1795,7 +1819,6 @@ class hyperliquid(Exchange, ImplicitAPI):
1795
1819
  """
1796
1820
  edit a trade order
1797
1821
 
1798
- https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/exchange-endpoint#modify-an-order
1799
1822
  https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/exchange-endpoint#modify-multiple-orders
1800
1823
 
1801
1824
  :param str id: cancel order id
@@ -1814,8 +1837,24 @@ class hyperliquid(Exchange, ImplicitAPI):
1814
1837
  :returns dict: an `order structure <https://docs.ccxt.com/#/?id=order-structure>`
1815
1838
  """
1816
1839
  self.load_markets()
1817
- market = self.market(symbol)
1818
- request = self.edit_order_request(id, symbol, type, side, amount, price, params)
1840
+ if id is None:
1841
+ raise ArgumentsRequired(self.id + ' editOrder() requires an id argument')
1842
+ order, globalParams = self.parse_create_edit_order_args(id, symbol, type, side, amount, price, params)
1843
+ orders = self.edit_orders([order], globalParams)
1844
+ return orders[0]
1845
+
1846
+ def edit_orders(self, orders: List[OrderRequest], params={}):
1847
+ """
1848
+ edit a list of trade orders
1849
+
1850
+ https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/exchange-endpoint#modify-multiple-orders
1851
+
1852
+ :param Array orders: list of orders to create, each object should contain the parameters required by createOrder, namely symbol, type, side, amount, price and params
1853
+ :param dict [params]: extra parameters specific to the exchange API endpoint
1854
+ :returns dict: an `order structure <https://docs.ccxt.com/#/?id=order-structure>`
1855
+ """
1856
+ self.load_markets()
1857
+ request = self.edit_orders_request(orders, params)
1819
1858
  response = self.privatePostExchange(request)
1820
1859
  #
1821
1860
  # {
@@ -1855,8 +1894,7 @@ class hyperliquid(Exchange, ImplicitAPI):
1855
1894
  responseObject = self.safe_dict(response, 'response', {})
1856
1895
  dataObject = self.safe_dict(responseObject, 'data', {})
1857
1896
  statuses = self.safe_list(dataObject, 'statuses', [])
1858
- first = self.safe_dict(statuses, 0, {})
1859
- return self.parse_order(first, market)
1897
+ return self.parse_orders(statuses)
1860
1898
 
1861
1899
  def fetch_funding_rate_history(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
1862
1900
  """
@@ -3386,7 +3424,7 @@ class hyperliquid(Exchange, ImplicitAPI):
3386
3424
  return byType[type]
3387
3425
  return self.safe_value(config, 'cost', 1)
3388
3426
 
3389
- def parse_create_order_args(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: Num = None, params={}):
3427
+ def parse_create_edit_order_args(self, id: Str, symbol: str, type: OrderType, side: OrderSide, amount: float, price: Num = None, params={}):
3390
3428
  market = self.market(symbol)
3391
3429
  vaultAddress = self.safe_string(params, 'vaultAddress')
3392
3430
  params = self.omit(params, 'vaultAddress')
@@ -3402,4 +3440,6 @@ class hyperliquid(Exchange, ImplicitAPI):
3402
3440
  globalParams = {}
3403
3441
  if vaultAddress is not None:
3404
3442
  globalParams['vaultAddress'] = vaultAddress
3443
+ if id is not None:
3444
+ order['id'] = id
3405
3445
  return [order, globalParams]
ccxt/paradex.py CHANGED
@@ -1170,6 +1170,10 @@ class paradex(Exchange, ImplicitAPI):
1170
1170
  average = self.omit_zero(self.safe_string(order, 'avg_fill_price'))
1171
1171
  remaining = self.omit_zero(self.safe_string(order, 'remaining_size'))
1172
1172
  lastUpdateTimestamp = self.safe_integer(order, 'last_updated_at')
1173
+ flags = self.safe_list(order, 'flags', [])
1174
+ reduceOnly = None
1175
+ if 'REDUCE_ONLY' in flags:
1176
+ reduceOnly = True
1173
1177
  return self.safe_order({
1174
1178
  'id': orderId,
1175
1179
  'clientOrderId': clientOrderId,
@@ -1182,7 +1186,7 @@ class paradex(Exchange, ImplicitAPI):
1182
1186
  'type': self.parse_order_type(orderType),
1183
1187
  'timeInForce': self.parse_time_in_force(self.safe_string(order, 'instrunction')),
1184
1188
  'postOnly': None,
1185
- 'reduceOnly': None,
1189
+ 'reduceOnly': reduceOnly,
1186
1190
  'side': side,
1187
1191
  'price': price,
1188
1192
  'triggerPrice': self.safe_string(order, 'trigger_price'),
@@ -1250,6 +1254,8 @@ class paradex(Exchange, ImplicitAPI):
1250
1254
  :param dict [params]: extra parameters specific to the exchange API endpoint
1251
1255
  :param float [params.stopPrice]: alias for triggerPrice
1252
1256
  :param float [params.triggerPrice]: The price a trigger order is triggered at
1257
+ :param float [params.stopLossPrice]: the price that a stop loss order is triggered at
1258
+ :param float [params.takeProfitPrice]: the price that a take profit order is triggered at
1253
1259
  :param str [params.timeInForce]: "GTC", "IOC", or "POST_ONLY"
1254
1260
  :param bool [params.postOnly]: True or False
1255
1261
  :param bool [params.reduceOnly]: Ensures that the executed order does not flip the opened position.
@@ -1265,11 +1271,15 @@ class paradex(Exchange, ImplicitAPI):
1265
1271
  request: dict = {
1266
1272
  'market': market['id'],
1267
1273
  'side': orderSide,
1268
- 'type': orderType, # LIMIT/MARKET/STOP_LIMIT/STOP_MARKET
1269
- 'size': self.amount_to_precision(symbol, amount),
1274
+ 'type': orderType, # LIMIT/MARKET/STOP_LIMIT/STOP_MARKET,STOP_LOSS_MARKET,STOP_LOSS_LIMIT,TAKE_PROFIT_MARKET,TAKE_PROFIT_LIMIT
1270
1275
  }
1271
1276
  triggerPrice = self.safe_string_2(params, 'triggerPrice', 'stopPrice')
1277
+ stopLossPrice = self.safe_string(params, 'stopLossPrice')
1278
+ takeProfitPrice = self.safe_string(params, 'takeProfitPrice')
1272
1279
  isMarket = orderType == 'MARKET'
1280
+ isTakeProfitOrder = (takeProfitPrice is not None)
1281
+ isStopLossOrder = (stopLossPrice is not None)
1282
+ isStopOrder = (triggerPrice is not None) or isTakeProfitOrder or isStopLossOrder
1273
1283
  timeInForce = self.safe_string_upper(params, 'timeInForce')
1274
1284
  postOnly = self.is_post_only(isMarket, None, params)
1275
1285
  if not isMarket:
@@ -1277,22 +1287,51 @@ class paradex(Exchange, ImplicitAPI):
1277
1287
  request['instruction'] = 'POST_ONLY'
1278
1288
  elif timeInForce == 'ioc':
1279
1289
  request['instruction'] = 'IOC'
1280
- if reduceOnly:
1281
- request['flags'] = [
1282
- 'REDUCE_ONLY',
1283
- ]
1284
1290
  if price is not None:
1285
1291
  request['price'] = self.price_to_precision(symbol, price)
1286
1292
  clientOrderId = self.safe_string_n(params, ['clOrdID', 'clientOrderId', 'client_order_id'])
1287
1293
  if clientOrderId is not None:
1288
1294
  request['client_id'] = clientOrderId
1289
- if triggerPrice is not None:
1295
+ sizeString = '0'
1296
+ stopPrice = None
1297
+ if isStopOrder:
1298
+ # flags: Reduce_Only must be provided for TPSL orders.
1290
1299
  if isMarket:
1291
- request['type'] = 'STOP_MARKET'
1300
+ if isStopLossOrder:
1301
+ stopPrice = self.price_to_precision(symbol, stopLossPrice)
1302
+ reduceOnly = True
1303
+ request['type'] = 'STOP_LOSS_MARKET'
1304
+ elif isTakeProfitOrder:
1305
+ stopPrice = self.price_to_precision(symbol, takeProfitPrice)
1306
+ reduceOnly = True
1307
+ request['type'] = 'TAKE_PROFIT_MARKET'
1308
+ else:
1309
+ stopPrice = self.price_to_precision(symbol, triggerPrice)
1310
+ sizeString = self.amount_to_precision(symbol, amount)
1311
+ request['type'] = 'STOP_MARKET'
1292
1312
  else:
1293
- request['type'] = 'STOP_LIMIT'
1294
- request['trigger_price'] = self.price_to_precision(symbol, triggerPrice)
1295
- params = self.omit(params, ['reduceOnly', 'reduce_only', 'clOrdID', 'clientOrderId', 'client_order_id', 'postOnly', 'timeInForce', 'stopPrice', 'triggerPrice'])
1313
+ if isStopLossOrder:
1314
+ stopPrice = self.price_to_precision(symbol, stopLossPrice)
1315
+ reduceOnly = True
1316
+ request['type'] = 'STOP_LOSS_LIMIT'
1317
+ elif isTakeProfitOrder:
1318
+ stopPrice = self.price_to_precision(symbol, takeProfitPrice)
1319
+ reduceOnly = True
1320
+ request['type'] = 'TAKE_PROFIT_LIMIT'
1321
+ else:
1322
+ stopPrice = self.price_to_precision(symbol, triggerPrice)
1323
+ sizeString = self.amount_to_precision(symbol, amount)
1324
+ request['type'] = 'STOP_LIMIT'
1325
+ else:
1326
+ sizeString = self.amount_to_precision(symbol, amount)
1327
+ if stopPrice is not None:
1328
+ request['trigger_price'] = stopPrice
1329
+ request['size'] = sizeString
1330
+ if reduceOnly:
1331
+ request['flags'] = [
1332
+ 'REDUCE_ONLY',
1333
+ ]
1334
+ params = self.omit(params, ['reduceOnly', 'reduce_only', 'clOrdID', 'clientOrderId', 'client_order_id', 'postOnly', 'timeInForce', 'stopPrice', 'triggerPrice', 'stopLossPrice', 'takeProfitPrice'])
1296
1335
  account = self.retrieve_account()
1297
1336
  now = self.nonce()
1298
1337
  orderReq = {
ccxt/pro/__init__.py CHANGED
@@ -4,7 +4,7 @@
4
4
 
5
5
  # ----------------------------------------------------------------------------
6
6
 
7
- __version__ = '4.4.64'
7
+ __version__ = '4.4.65'
8
8
 
9
9
  # ----------------------------------------------------------------------------
10
10
 
@@ -45,7 +45,6 @@ from ccxt.pro.coincheck import coincheck # noqa
45
45
  from ccxt.pro.coinex import coinex # noqa: F401
46
46
  from ccxt.pro.coinone import coinone # noqa: F401
47
47
  from ccxt.pro.cryptocom import cryptocom # noqa: F401
48
- from ccxt.pro.currencycom import currencycom # noqa: F401
49
48
  from ccxt.pro.defx import defx # noqa: F401
50
49
  from ccxt.pro.deribit import deribit # noqa: F401
51
50
  from ccxt.pro.exmo import exmo # noqa: F401
@@ -121,7 +120,6 @@ exchanges = [
121
120
  'coinex',
122
121
  'coinone',
123
122
  'cryptocom',
124
- 'currencycom',
125
123
  'defx',
126
124
  'deribit',
127
125
  'exmo',
ccxt/pro/bybit.py CHANGED
@@ -767,7 +767,7 @@ class bybit(ccxt.async_support.bybit):
767
767
  self.ohlcvs[symbol][timeframe] = ArrayCacheByTimestamp(limit)
768
768
  stored = self.ohlcvs[symbol][timeframe]
769
769
  for i in range(0, len(data)):
770
- parsed = self.parse_ws_ohlcv(data[i])
770
+ parsed = self.parse_ws_ohlcv(data[i], market)
771
771
  stored.append(parsed)
772
772
  messageHash = 'ohlcv::' + symbol + '::' + timeframe
773
773
  resolveData = [symbol, timeframe, stored]
@@ -789,13 +789,14 @@ class bybit(ccxt.async_support.bybit):
789
789
  # "timestamp": 1670363219614
790
790
  # }
791
791
  #
792
+ volumeIndex = 'turnover' if (market['inverse']) else 'volume'
792
793
  return [
793
794
  self.safe_integer(ohlcv, 'start'),
794
795
  self.safe_number(ohlcv, 'open'),
795
796
  self.safe_number(ohlcv, 'high'),
796
797
  self.safe_number(ohlcv, 'low'),
797
798
  self.safe_number(ohlcv, 'close'),
798
- self.safe_number_2(ohlcv, 'volume', 'turnover'),
799
+ self.safe_number(ohlcv, volumeIndex),
799
800
  ]
800
801
 
801
802
  async def watch_order_book(self, symbol: str, limit: Int = None, params={}) -> OrderBook:
ccxt/pro/gate.py CHANGED
@@ -1128,7 +1128,9 @@ class gate(ccxt.async_support.gate):
1128
1128
  cache = self.positions[type]
1129
1129
  for i in range(0, len(positions)):
1130
1130
  position = positions[i]
1131
- cache.append(position)
1131
+ contracts = self.safe_number(position, 'contracts', 0)
1132
+ if contracts > 0:
1133
+ cache.append(position)
1132
1134
  # don't remove the future from the .futures cache
1133
1135
  future = client.futures[messageHash]
1134
1136
  future.resolve(cache)
@@ -1894,7 +1896,7 @@ class gate(ccxt.async_support.gate):
1894
1896
  }
1895
1897
  if (channel == 'spot.order_place') or (channel == 'futures.order_place'):
1896
1898
  payload['req_header'] = {
1897
- 'x-gate-channel-id': 'ccxt',
1899
+ 'X-Gate-Channel-Id': 'ccxt',
1898
1900
  }
1899
1901
  request: dict = {
1900
1902
  'id': requestId,
ccxt/pro/hyperliquid.py CHANGED
@@ -101,7 +101,7 @@ class hyperliquid(ccxt.async_support.hyperliquid):
101
101
  :returns dict: an `order structure <https://docs.ccxt.com/#/?id=order-structure>`
102
102
  """
103
103
  await self.load_markets()
104
- order, globalParams = self.parseCreateOrderArgs(symbol, type, side, amount, price, params)
104
+ order, globalParams = self.parseCreateEditOrderArgs(None, symbol, type, side, amount, price, params)
105
105
  orders = await self.create_orders_ws([order], globalParams)
106
106
  return orders[0]
107
107
 
@@ -109,7 +109,6 @@ class hyperliquid(ccxt.async_support.hyperliquid):
109
109
  """
110
110
  edit a trade order
111
111
 
112
- https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/exchange-endpoint#modify-an-order
113
112
  https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/exchange-endpoint#modify-multiple-orders
114
113
 
115
114
  :param str id: cancel order id
@@ -130,7 +129,8 @@ class hyperliquid(ccxt.async_support.hyperliquid):
130
129
  await self.load_markets()
131
130
  market = self.market(symbol)
132
131
  url = self.urls['api']['ws']['public']
133
- postRequest = self.edit_order_request(id, symbol, type, side, amount, price, params)
132
+ order, globalParams = self.parseCreateEditOrderArgs(id, symbol, type, side, amount, price, params)
133
+ postRequest = self.editOrdersRequest([order], globalParams)
134
134
  wrapped = self.wrap_as_post_action(postRequest)
135
135
  request = self.safe_dict(wrapped, 'request', {})
136
136
  requestId = self.safe_string(wrapped, 'requestId')
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: ccxt
3
- Version: 4.4.64
3
+ Version: 4.4.65
4
4
  Summary: A JavaScript / TypeScript / Python / C# / PHP cryptocurrency trading library with support for 100+ exchanges
5
5
  Home-page: https://ccxt.com
6
6
  Author: Igor Kroitor
@@ -49,7 +49,7 @@ Requires-Dist: mypy==1.6.1; extra == "type"
49
49
 
50
50
  # CCXT – CryptoCurrency eXchange Trading Library
51
51
 
52
- [![NPM Downloads](https://img.shields.io/npm/dy/ccxt.svg)](https://www.npmjs.com/package/ccxt) [![npm](https://img.shields.io/npm/v/ccxt.svg)](https://npmjs.com/package/ccxt) [![PyPI](https://img.shields.io/pypi/v/ccxt.svg)](https://pypi.python.org/pypi/ccxt) [![NuGet version](https://img.shields.io/nuget/v/ccxt)](https://www.nuget.org/packages/ccxt) [![GoDoc](https://pkg.go.dev/badge/github.com/ccxt/ccxt/go/v4?utm_source=godoc)](https://godoc.org/github.com/ccxt/ccxt/go/v4) [![Discord](https://img.shields.io/discord/690203284119617602?logo=discord&logoColor=white)](https://discord.gg/ccxt) [![Supported Exchanges](https://img.shields.io/badge/exchanges-110-blue.svg)](https://github.com/ccxt/ccxt/wiki/Exchange-Markets) [![Follow CCXT at x.com](https://img.shields.io/twitter/follow/ccxt_official.svg?style=social&label=CCXT)](https://x.com/ccxt_official)
52
+ [![NPM Downloads](https://img.shields.io/npm/dy/ccxt.svg)](https://www.npmjs.com/package/ccxt) [![npm](https://img.shields.io/npm/v/ccxt.svg)](https://npmjs.com/package/ccxt) [![PyPI](https://img.shields.io/pypi/v/ccxt.svg)](https://pypi.python.org/pypi/ccxt) [![NuGet version](https://img.shields.io/nuget/v/ccxt)](https://www.nuget.org/packages/ccxt) [![GoDoc](https://pkg.go.dev/badge/github.com/ccxt/ccxt/go/v4?utm_source=godoc)](https://godoc.org/github.com/ccxt/ccxt/go/v4) [![Discord](https://img.shields.io/discord/690203284119617602?logo=discord&logoColor=white)](https://discord.gg/ccxt) [![Supported Exchanges](https://img.shields.io/badge/exchanges-109-blue.svg)](https://github.com/ccxt/ccxt/wiki/Exchange-Markets) [![Follow CCXT at x.com](https://img.shields.io/twitter/follow/ccxt_official.svg?style=social&label=CCXT)](https://x.com/ccxt_official)
53
53
 
54
54
  A JavaScript / Python / PHP / C# / Go library for cryptocurrency trading and e-commerce with support for many bitcoin/ether/altcoin exchange markets and merchant APIs.
55
55
 
@@ -108,7 +108,7 @@ Current feature list:
108
108
 
109
109
  ## Supported Cryptocurrency Exchanges
110
110
 
111
- The CCXT library currently supports the following 105 cryptocurrency exchange markets and trading APIs:
111
+ The CCXT library currently supports the following 104 cryptocurrency exchange markets and trading APIs:
112
112
 
113
113
  | logo | id | name | ver | type | certified | pro |
114
114
  |-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------|----------------------------------------------------------------------------------------------|:------------------------------------------------------------------------------------------------------------------------------------------------:|--------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------|
@@ -160,7 +160,6 @@ The CCXT library currently supports the following 105 cryptocurrency exchange ma
160
160
  | [![coinsph](https://user-images.githubusercontent.com/1294454/225719995-48ab2026-4ddb-496c-9da7-0d7566617c9b.jpg)](https://coins.ph/) | coinsph | [Coins.ph](https://coins.ph/) | [![API Version 1](https://img.shields.io/badge/1-lightgray)](https://coins-docs.github.io/rest-api) | ![CEX – Centralized EXchange](https://img.shields.io/badge/CEX-green.svg "CEX – Centralized EXchange") | | |
161
161
  | [![coinspot](https://user-images.githubusercontent.com/1294454/28208429-3cacdf9a-6896-11e7-854e-4c79a772a30f.jpg)](https://www.coinspot.com.au/register?code=PJURCU) | coinspot | [CoinSpot](https://www.coinspot.com.au/register?code=PJURCU) | [![API Version *](https://img.shields.io/badge/*-lightgray)](https://www.coinspot.com.au/api) | ![CEX – Centralized EXchange](https://img.shields.io/badge/CEX-green.svg "CEX – Centralized EXchange") | | |
162
162
  | [![cryptocom](https://user-images.githubusercontent.com/1294454/147792121-38ed5e36-c229-48d6-b49a-48d05fc19ed4.jpeg)](https://crypto.com/exch/kdacthrnxt) | cryptocom | [Crypto.com](https://crypto.com/exch/kdacthrnxt) | [![API Version 2](https://img.shields.io/badge/2-lightgray)](https://exchange-docs.crypto.com/exchange/v1/rest-ws/index.html) | ![CEX – Centralized EXchange](https://img.shields.io/badge/CEX-green.svg "CEX – Centralized EXchange") | [![CCXT Certified](https://img.shields.io/badge/CCXT-Certified-green.svg)](https://github.com/ccxt/ccxt/wiki/Certification) | [![CCXT Pro](https://img.shields.io/badge/CCXT-Pro-black)](https://ccxt.pro) |
163
- | [![currencycom](https://user-images.githubusercontent.com/1294454/83718672-36745c00-a63e-11ea-81a9-677b1f789a4d.jpg)](https://currency.com/trading/signup?c=362jaimv&pid=referral) | currencycom | [Currency.com](https://currency.com/trading/signup?c=362jaimv&pid=referral) | [![API Version 2](https://img.shields.io/badge/2-lightgray)](https://currency.com/api) | ![CEX – Centralized EXchange](https://img.shields.io/badge/CEX-green.svg "CEX – Centralized EXchange") | | [![CCXT Pro](https://img.shields.io/badge/CCXT-Pro-black)](https://ccxt.pro) |
164
163
  | [![defx](https://github.com/user-attachments/assets/4e92bace-d7a9-45ea-92be-122168dc87e4)](https://app.defx.com/join/6I2CZ7) | defx | [Defx X](https://app.defx.com/join/6I2CZ7) | [![API Version 1](https://img.shields.io/badge/1-lightgray)](https://docs.defx.com/docs) | ![DEX - Distributed EXchange](https://img.shields.io/badge/DEX-blue.svg "DEX - Distributed EXchange") | | |
165
164
  | [![delta](https://user-images.githubusercontent.com/1294454/99450025-3be60a00-2931-11eb-9302-f4fd8d8589aa.jpg)](https://www.delta.exchange/app/signup/?code=IULYNB) | delta | [Delta Exchange](https://www.delta.exchange/app/signup/?code=IULYNB) | [![API Version 2](https://img.shields.io/badge/2-lightgray)](https://docs.delta.exchange) | ![CEX – Centralized EXchange](https://img.shields.io/badge/CEX-green.svg "CEX – Centralized EXchange") | | |
166
165
  | [![deribit](https://user-images.githubusercontent.com/1294454/41933112-9e2dd65a-798b-11e8-8440-5bab2959fcb8.jpg)](https://www.deribit.com/reg-1189.4038) | deribit | [Deribit](https://www.deribit.com/reg-1189.4038) | [![API Version 2](https://img.shields.io/badge/2-lightgray)](https://docs.deribit.com/v2) | ![CEX – Centralized EXchange](https://img.shields.io/badge/CEX-green.svg "CEX – Centralized EXchange") | | [![CCXT Pro](https://img.shields.io/badge/CCXT-Pro-black)](https://ccxt.pro) |
@@ -277,13 +276,13 @@ console.log(version, Object.keys(exchanges));
277
276
 
278
277
  All-in-one browser bundle (dependencies included), served from a CDN of your choice:
279
278
 
280
- * jsDelivr: https://cdn.jsdelivr.net/npm/ccxt@4.4.64/dist/ccxt.browser.min.js
281
- * unpkg: https://unpkg.com/ccxt@4.4.64/dist/ccxt.browser.min.js
279
+ * jsDelivr: https://cdn.jsdelivr.net/npm/ccxt@4.4.65/dist/ccxt.browser.min.js
280
+ * unpkg: https://unpkg.com/ccxt@4.4.65/dist/ccxt.browser.min.js
282
281
 
283
282
  CDNs are not updated in real-time and may have delays. Defaulting to the most recent version without specifying the version number is not recommended. Please, keep in mind that we are not responsible for the correct operation of those CDN servers.
284
283
 
285
284
  ```HTML
286
- <script type="text/javascript" src="https://cdn.jsdelivr.net/npm/ccxt@4.4.64/dist/ccxt.browser.min.js"></script>
285
+ <script type="text/javascript" src="https://cdn.jsdelivr.net/npm/ccxt@4.4.65/dist/ccxt.browser.min.js"></script>
287
286
  ```
288
287
 
289
288
  Creates a global `ccxt` object: