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

Method edit_orders

python/ccxt/hyperliquid.py:2678–2730  ·  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

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

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