跳至主要内容

期權交易

期權 API 使用與股票相同的統一訂單端點。通過設置 instrument_type: OPTION 並提供包含期權特定參數的 legs 陣列來區分。

支援的訂單類型

期權支援以下訂單類型:

訂單類型說明
LIMIT以指定價格或更優價格執行
STOP_LOSS當觸及止損價時觸發市價單
STOP_LOSS_LIMIT當觸及止損價時觸發限價單
警告

期權不支援 MARKET 訂單類型。僅支援 BUYSELL 方向(不支援 SHORT)。

賣方訂單的有效期限制

期權賣方訂單(SELL)的 time_in_force 僅支援 DAYGTC 僅適用於買方訂單。

有效期

說明
DAY僅當日有效
GTC撤銷前有效

關鍵參數

參數必填說明
option_strategySINGLE 表示單腿訂單
legs腿定義陣列
legs[].symbol標的代碼(如 AAPL
legs[].strike_price期權行權價
legs[].option_expire_date到期日,格式 YYYY-MM-DD
legs[].instrument_typeOPTION
legs[].option_typeCALLPUT
legs[].marketUS
legs[].sideBUYSELL
legs[].quantity合約數量

API 端點

期權使用與股票訂單相同的端點。完整列表請參閱API 端點

請求範例

以 $11.25 的限價買入 1 張 AAPL 看漲期權,行權價 $220,到期日 2025-11-19。

{
"account_id": "<your_account_id>",
"new_orders": [
{
"client_order_id": "<unique_id>",
"combo_type": "NORMAL",
"order_type": "LIMIT",
"limit_price": "11.25",
"quantity": "1",
"option_strategy": "SINGLE",
"side": "BUY",
"time_in_force": "DAY",
"entrust_type": "QTY",
"instrument_type": "OPTION",
"market": "US",
"symbol": "AAPL",
"legs": [
{
"side": "BUY",
"quantity": "1",
"symbol": "AAPL",
"strike_price": "220.00",
"option_expire_date": "2025-11-19",
"instrument_type": "OPTION",
"option_type": "CALL",
"market": "US"
}
]
}
]
}

下一步