跳至主要内容

期權改單

接口说明

  • 功能說明:期權改單,支援改數和價格。期權訂單查詢建議使用V2訂單查詢接口:訂單詳情

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

  • 要求方式: POST

  • 頻次限制:每個AppId呼叫頻次限制為1秒1次。

請求參數

參數類型是否必須說明示例值
account_idString帳戶id2847483
modify_orders[]order_item訂單明細

order_item:

參數類型是否必須說明示例值
client_order_idString訂單id0KGOHL4PR2SLC0DKIND4TI0002
stop_priceString停損價11.00
limit_priceString限價11.00
quantityString數量1
orders[]order腿明細

order

參數類型是否必須說明示例值
client_order_idString單腳選擇權訂單idG2JAJPOR4KUA0F5I9LONH8J83A
quantityString數量1

響應參數

參數類型是否必須說明示例值
client_order_idString客戶端訂單id
普通訂單回傳
0KGOHL4PR2SLC0DKIND4TI0002
order_idString訂單id
普通訂單回傳
80HG7CPSFDPCAL3TP66LKBAS69

請求示例

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

client_order_id = uuid.uuid4().hex
option_modify_orders = [
{
"client_order_id": client_order_id,
"quantity": "2",
"limit_price": "11.3",
"orders": [
{
"client_order_id": client_order_id,
"quantity": "2"
}
]
}
]

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

回應示例

普通訂單

異常示例