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

Method cancel_order

python/ccxt/hyperliquid.py:2250–2270  ·  view source on GitHub ↗

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={})

Source from the content-addressed store, hash-verified

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 """

Callers

nothing calls this directly

Calls 5

cancel_twap_orderMethod · 0.95
cancel_ordersMethod · 0.95
safe_boolMethod · 0.80
safe_dictMethod · 0.80
omitMethod · 0.45

Tested by

no test coverage detected