Skip to main content

參數對照表

類別

Class

OrderObject

ParameterTypeMeaning
buy_sellBSAction買賣別 可選用參數Buy 買 、 Sell
symbolstring商品代號
buy_sell2 (optional)BSAction買賣別 - 複式第二隻腳
symbol2 (optional)string商品代號 - 複式第二隻腳
pricestring委託價格
lotint委託口數
market_typeFutOptMarketType盤別 可選用參數Future 期貨日盤、Option選擇權日盤、FutureNight 期貨夜盤、OptionNight 選擇權夜盤
price_typeFutOptPriceType價格旗標 可選用參數為 Limit 限價 、 Market 市價 、 RangeMarket 範圍市價、Reference 參考價
time_in_forceTimeInForce委託條件 可選用參數為 RODFOKIOC
order_typeFutOptOrderType委託類別 可選用參數為 New 新倉、Close平倉、Auto自動、FdayTrade當沖
user_def (optional)string用戶自定義 (最長10個字元,不支援特殊字元)
caution

priceType 爲 FutOptPriceType.Limit 時,需填入 price 欄位,其餘時候 price 欄位為空值或為None。

FutOptOrderResult

委託列表,透過 get_order_result(accounts) 取得。

參數類別說明
function_typeint功能別 : 0 新單 、10 新單執行、 15 改價、 20 改量、30刪單 、90失敗
datestring交易日期
seq_nostring委託單流水序號
branch_nostring分公司代號
accountstring帳號
order_nostring委託書號
asset_typeint資產類別 : 1 期貨 、2 選擇權
marketstring市場類型 : TAIMEX 期貨、選擇權
market_typeFutOptMarketType盤別種類 : Future 期貨日盤 、 Option 選擇權日盤 、 FutureNight 期貨夜盤 、 OptionNight 選擇權夜盤
unitint單位數
currencystring幣別
symbolstring商品代號
expiry_datestring到期日
strike_pricefloat履約價
call_putstring買賣權 : Call 買權、 Put 賣權
buy_sellBSAction買賣別 : Buy 買 、 Sell
symbol_leg2string商品代號 - 複式第二隻腳
expiry_date_leg2string到期日 - 複式第二隻腳
strike_price_leg2float履約價 - 複式第二隻腳
call_put_leg2string買賣權 - 複式第二隻腳 : Call 買權、 Put 賣權
buy_sell_leg2BSAction買賣別 - 複式第二隻腳: Buy 買 、 Sell
price_typeFutOptPriceType原始委託價格別 : Limit 限價 、 LimitUp 漲停 、 LimitDown 跌停 、 Market 市價 、 Reference 參考價
pricefloat價格
lotint原始委託股口數
time_in_forceTimeInforce委託條件別 : ROD ROD 、 FOK FOK 、 IOC IOC
order_typeFutOptOrderType委託單類型 : New 新倉 、 Close 平倉 、 Auto 自動 、 FdayTrade 當沖
is_pre_orderbool是否為預約單
statusint委託單狀態 : 0 預約單 、 4 中台收到委託 、9 後台連線逾時 、10 委託成功 、 30刪單成功 、 50 完全成交 、 90 失敗
after_price_typeFutOptPriceType有效委託價格別 : Limit限價 、 Market市價 、RangeMarket 範圍市價 、 Reference參考價
after_pricefloat有效委託價格
after_lotint有效委託口數
filled_lotint成交口數
filled_moneyfloat成交價金
before_lotint改單前有效口數
before_pricefloat改單前有效價
user_defstring自訂欄位
last_timestring最後異動時間
error_messagestring錯誤訊息
detaillist委託歷程 (查詢order_result_detail or order_history才有值)
>> function_typeint功能別 : 10 新單、 15 改價、 20 改量、30刪單、50成交
>> modified_timestring修改時間
>> before_lotint原始委託口數
>> after_lotint有效委託口數
>> before_pricefloat原始委託價
>> after_pricefloat有效委託價
>> filled_moneyfloat成交價金
>> error_messagestring錯誤訊息

BatchResult

批次委託列表,透過 batch_order_lists(accounts) 取得。

ParameterTypeMeaning
function_typeint功能別 : 0 新單 、10 新單執行、 15 改價、 20 改量、30刪單 、90失敗
datestring交易日期
branch_nostring分公司代號
accountstring帳號
batch_seq_nostring批次單流水序號

FutoptModifyPrice

改價物件

ParameterTypeMeaning
order_resultObject委託列表
pricestring改單後的價格
price_typeFutOptPriceType改單後的價格類型 : Limit限價 、 Market市價 、RangeMarket 範圍市價 、 Reference參考價

FutOptModifyLot

改量物件

ParameterTypeMeaning
order_resultObject委託列表
lotint改單後的委託量

FutOptFilledData

成交回報物件

參數類別說明
datestring日期
branch_nostring分公司代號
accountstring帳號
seqNostring委託單流水序號 (只有主動回報才回傳此欄位)
order_nostring委託書號
symbolstring商品代號
expiry_datestring到期日
strike_pricefloat履約價
call_putCallPut買賣權 : Call 買權、 Put 賣權
buy_sellBSAction[買賣別] (#bsaction) : Buy 買 、 Sell
symbol_leg2string商品代號 - 複式第二隻腳
expiry_date_leg2string到期日 - 複式第二隻腳
strike_price_leg2float履約價 - 複式第二隻腳
call_put_leg2CallPut買賣權 - 複式第二隻腳 : Call 買權、 Put 賣權
buy_sell_leg2BSAction買賣別 - 複式第二隻腳: Buy 買 、 Sell
order_typeFutOptOrderType委託單類型 : New 新倉 、 Close 平倉 、 Auto 自動 、 FdayTrade 當沖
filled_nostring成交流水號
filled_avg_pricefloat成交均價
filled_lotint成交股數
filled_pricefloat成交單價
filled_timestring成交時間
user_defstring用戶自定義 (只有主動回報才回傳此欄位)

Account

帳號資訊

ParameterTypeMeaning
namestring客戶姓名
accountstring帳號
branch_nostring分公司代號
account_typestring帳號類型 ,回傳 stock證券 、futopt期貨

Constants ( 欄位對應數值 )

BSAction

買賣別 (buySell)

NameMeaning
Buy
Sell

CallPut

買賣別 (buySell)

NameMeaning
CallCall
PutPut

FutOptMarketType

盤別

NameMeaning
Future期貨日盤
FutureNight期貨夜盤
Option選擇權日盤
OptionNight選擇權夜盤

FutOptPriceType

價格類型 (priceType)

NameMeaning
Limit限價
Market市價
RangeMarket範圍市價
Reference參考價

TimeInForce

委託條件 (TimeInForce)

NameMeaning
ROD當日有效(Rest of Day)
FOK全部成交否則取消(Fill-or-Kill)
IOC立即成交否則取消(Immediate-or-Cancel)

FutOptOrderType

委託類別 (orderType)

NameMeaning
New新倉
Close平倉
Auto自動
FdayTrade當沖

function_type

功能類別

NameValue
新單0
新單執行10
改價15
改量20
刪單30
失敗90

market

市場

NameValue
期貨交易所TAIMEX

status

委託單狀態

NameValue
預約單0
中台收到委託4 ( 請用GetOrderResult查詢狀態 )
後台連線逾時9 ( 請稍後再使用GetOrderResult查詢狀態 or 聯絡您的營業員 )
委託成功10
刪單成功30
完全成交50
改價失敗19
改量失敗29
刪單失敗39
失敗90

Month

月份代號

期貨

一月二月三月四月五月六月
ABCDEF
七月八月九月十月十一月十二月
GHIJKL

選擇權

Call

一月二月三月四月五月六月
ABCDEF
七月八月九月十月十一月十二月
GHIJKL

Put

一月二月三月四月五月六月
MNOPQR
七月八月九月十月十一月十二月
STUVWX