跳至主要内容

期權撤單

接口说明

  • 功能描述:期權撤單,根據傳入的client_order_id撤單。期權訂單查詢建議使用V2訂單查詢接口:訂單詳情

  • 請求URL: /openapi/account/orders/option/cancel?account_id={account_id}

  • 請求方式: POST

  • 頻次限制:每個AppId調用頻次限制為1秒1次。

請求參數

參數類型是否必須說明示例值
account_idString帳戶id2847483
client_order_idString需要撤單的客戶端訂單id,值為下單的client_order_id。0KGOHL4PR2SLC0DKIND4TI0002

響應參數

參數類型是否必須說明示例值
client_order_idString撤單的client_order_id0KGOHL4PR2SLC0DKIND4TI0002
order_idString撤單的order_idCDI8BOMDU5KO70LEFNLBVV9RA8

請求示例

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_option(account_id, client_order_id)
if response.status_code == 200:
order_res = response.json()

回應示例

異常示例