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