OpenAPI adds stock short selling and options functions. For details, please refer to the update logs.
OpenAPI adds stock short selling and options functions. For details, please refer to the update logs.
OpenAPI adds stock short selling and options functions. For details, please refer to the update logs.
Skip to main content

Cancel Order

Interface Description

  • Function description: Cancel the order.

  • Note: Before calling this interface, you must have successfully called the corresponding order interface.

  • Applicable objects: Customers who connect to Webull through the OpenApi development platform.

  • Request URL: /trade/order/cancel

  • Request method: POST

  • Frequency limit: The calling frequency of each AppId is limited to 1 time per second.

Request Parameters

ParameterTypeRequired fieldsDescriptionExample value
account_idStringYesAccount ID20150320010101001
client_order_idStringYesThe 3rd party order ID2022021819071234

Response Parameter

ParameterTypeRequired fieldsDescriptionExample value
client_order_idStringYesThe 3rd party order ID2022021819071234

Request Example

from webullsdktrade.api import API
from webullsdkcore.client import ApiClient
from webullsdkcore.common.region import Region

api_client = ApiClient(your_app_key, your_app_secret, Region.HK.value)
api = API(api_client)
response = api.order.cancel_order(account_id, client_order_id)
if response.status_code == 200:
order_res = response.json()

Response Example

{
"code":
200
"msg":
"ok"
"data":{
"client_order_id":
"01916462123512190"
}
}

Exception Example

{
"error_code":
"TRADE_WEBULL_REQUEST_PROCESSING"
"message":
"The order is processing, please try later"
}