edit a trade order https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/exchange-endpoint#modify-multiple-orders :param str id: cancel order id :param str symbol: unified symbol of the market to create an order in :param str type: 'market' or
(self, id: str, symbol: str, type: str, side: str, amount: Num = None, price: Num = None, params={})
| 2647 | return request |
| 2648 | |
| 2649 | def edit_order(self, id: str, symbol: str, type: str, side: str, amount: Num = None, price: Num = None, params={}): |
| 2650 | """ |
| 2651 | edit a trade order |
| 2652 | |
| 2653 | https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/exchange-endpoint#modify-multiple-orders |
| 2654 | |
| 2655 | :param str id: cancel order id |
| 2656 | :param str symbol: unified symbol of the market to create an order in |
| 2657 | :param str type: 'market' or 'limit' |
| 2658 | :param str side: 'buy' or 'sell' |
| 2659 | :param float amount: how much of currency you want to trade in units of base currency |
| 2660 | :param float [price]: the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders |
| 2661 | :param dict [params]: extra parameters specific to the exchange API endpoint |
| 2662 | :param str [params.timeInForce]: 'Gtc', 'Ioc', 'Alo' |
| 2663 | :param bool [params.postOnly]: True or False whether the order is post-only |
| 2664 | :param bool [params.reduceOnly]: True or False whether the order is reduce-only |
| 2665 | :param float [params.triggerPrice]: The price at which a trigger order is triggered at |
| 2666 | :param str [params.clientOrderId]: client order id,(optional 128 bit hex string e.g. 0x1234567890abcdef1234567890abcdef) |
| 2667 | :param str [params.vaultAddress]: the vault address for order |
| 2668 | :param str [params.subAccountAddress]: sub account user address |
| 2669 | :returns dict: an `order structure <https://docs.ccxt.com/?id=order-structure>` |
| 2670 | """ |
| 2671 | self.load_markets() |
| 2672 | if id is None: |
| 2673 | raise ArgumentsRequired(self.id + ' editOrder() requires an id argument') |
| 2674 | order, globalParams = self.parse_create_edit_order_args(id, symbol, type, side, amount, price, params) |
| 2675 | orders = self.edit_orders([order], globalParams) |
| 2676 | return orders[0] |
| 2677 | |
| 2678 | def edit_orders(self, orders: List[OrderRequest], params={}): |
| 2679 | """ |
nothing calls this directly
no test coverage detected