cancels an open order https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/exchange-endpoint#cancel-order-s https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/exchange-endpoint#cancel-order-s-by-cloid :param str id: order id :p
(self, id: str, symbol: Str = None, params={})
| 2249 | return request |
| 2250 | |
| 2251 | async def cancel_order(self, id: str, symbol: Str = None, params={}): |
| 2252 | """ |
| 2253 | cancels an open order |
| 2254 | |
| 2255 | https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/exchange-endpoint#cancel-order-s |
| 2256 | https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/exchange-endpoint#cancel-order-s-by-cloid |
| 2257 | |
| 2258 | :param str id: order id |
| 2259 | :param str symbol: unified symbol of the market the order was made in |
| 2260 | :param dict [params]: extra parameters specific to the exchange API endpoint |
| 2261 | :param str [params.clientOrderId]: client order id,(optional 128 bit hex string e.g. 0x1234567890abcdef1234567890abcdef) |
| 2262 | :param str [params.vaultAddress]: the vault address for order |
| 2263 | :param str [params.subAccountAddress]: sub account user address |
| 2264 | :param boolean [params.twap]: whether the order to cancel is a twap order,(default is False) |
| 2265 | :returns dict: An `order structure <https://docs.ccxt.com/?id=order-structure>` |
| 2266 | """ |
| 2267 | if self.safe_bool(params, 'twap', False): |
| 2268 | params = self.omit(params, 'twap') |
| 2269 | return await self.cancel_twap_order(id, symbol, params) |
| 2270 | orders = await self.cancel_orders([id], symbol, params) |
| 2271 | return self.safe_dict(orders, 0) |
| 2272 | |
| 2273 | async def cancel_orders(self, ids: List[str], symbol: Str = None, params={}): |
| 2274 | """ |
nothing calls this directly
no test coverage detected