MCPcopy Create free account
hub / github.com/ccxt/ccxt / edit_orders

Method edit_orders

python/ccxt/async_support/hyperliquid.py:2679–2731  ·  view source on GitHub ↗

edit a list of trade orders https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/exchange-endpoint#modify-multiple-orders :param Array orders: list of orders to create, each object should contain the parameters required by createOrder, namely symbol, type, si

(self, orders: List[OrderRequest], params={})

Source from the content-addressed store, hash-verified

2677 return orders[0]
2678
2679 async def edit_orders(self, orders: List[OrderRequest], params={}):
2680 """
2681 edit a list of trade orders
2682
2683 https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/exchange-endpoint#modify-multiple-orders
2684
2685 :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
2686 :param dict [params]: extra parameters specific to the exchange API endpoint
2687 :returns dict: an `order structure <https://docs.ccxt.com/?id=order-structure>`
2688 """
2689 await self.load_markets()
2690 await self.initialize_client()
2691 request = self.edit_orders_request(orders, params)
2692 response = await self.privatePostExchange(request)
2693 #
2694 # {
2695 # "status": "ok",
2696 # "response": {
2697 # "type": "order",
2698 # "data": {
2699 # "statuses": [
2700 # {
2701 # "resting": {
2702 # "oid": 5063830287
2703 # }
2704 # }
2705 # ]
2706 # }
2707 # }
2708 # }
2709 # when the order is filled immediately
2710 # {
2711 # "status":"ok",
2712 # "response":{
2713 # "type":"order",
2714 # "data":{
2715 # "statuses":[
2716 # {
2717 # "filled":{
2718 # "totalSz":"0.1",
2719 # "avgPx":"100.84",
2720 # "oid":6195281425
2721 # }
2722 # }
2723 # ]
2724 # }
2725 # }
2726 # }
2727 #
2728 responseObject = self.safe_dict(response, 'response', {})
2729 dataObject = self.safe_dict(responseObject, 'data', {})
2730 statuses = self.safe_list(dataObject, 'statuses', [])
2731 return self.parse_orders(statuses)
2732
2733 async def create_vault(self, name: str, description: str, initialUsd: int, params={}):
2734 """

Callers 1

edit_orderMethod · 0.95

Calls 7

initialize_clientMethod · 0.95
edit_orders_requestMethod · 0.95
safe_dictMethod · 0.80
safe_listMethod · 0.80
parse_ordersMethod · 0.80
privatePostExchangeMethod · 0.65
load_marketsMethod · 0.45

Tested by

no test coverage detected