Skip to main content

Cancel Order(v2)

Interface description

  • Function Description: Cancel the equity order according to the incoming client_order_id.

  • 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: /openapi/account/orders/cancel?account_id={account_id}

  • Request method: POST

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

Parameters

ParameterTypeRequiredDescriptionValues/Example
account_idStringRequiredAccount IDCASH_10004248
client_order_idStringRequiredUser-defined order ID.0KGOHL4PR2SLC0DKIND4TI0002

Response

ParameterTypeRequiredDescriptionValues/Example
client_order_idStringRequiredclient_order_id to cancel0KGOHL4PR2SLC0DKIND4TI0002
order_idStringRequiredOrder id
Simple order return, Webull order ID.
80HG7CPSFDPCAL3TP66LKBAS69

Request example


from webullsdkcore.client import ApiClient
from webullsdktrade.api import API

api_client = ApiClient(your_app_key, your_app_secret, Region.JP.value)
api = API(api_client)
res = api.order_v2.cancel_order_v2(account_id=account_id, client_order_id=client_order_id)
if res.status_code == 200:
print("cancel_order_res=" + json.dumps(res.json(), indent=4))

Response

Exception example