參數對照表
類別
Class
Condition Object
Parameter | Type | Meaning |
---|---|---|
marketType | TradingType | 監控類型 可選用參數 : Reference 自動參考委託物件、Scheduled 時間 |
symbol | string | 股票代號 |
trigger | TriggerContent | 觸發條件 可選用參數 : BidPrice 買進價、AskPrice 賣出價、MatchedPrice 成交價、TotalQuantity 總量、Time 時間 |
triggerValue | string | 監控條件數值 (若為時間則填入HHMMSS) |
comparison | Operator | 比對值 可選用參數GreaterThanOrEqual 大於等於、LessThanOrEqual 小於等於 、 GreaterThan 大於 、 LessThan 小於 |
info
- 選擇
Reference
時, trigger 可搭配BidPrice
、AskPrice
、MatchedPrice
、TotalQuantity
、Time
,若 trigger 使用 Time,則時間條件達成,且時間範圍內商品有交易產生才觸發 - 選擇
Scheduled
時,symbol需填入空值"",trigger需帶入Time
,則會使用系統時間判斷,當時間條件達成即觸發
ConditionOrder Object
Parameter | Type | Meaning |
---|---|---|
buySell | BsAction | 買賣別 |
symbol | string | 股票代號 |
price | string | 委託價格 |
quantity | int | 委託數量 |
marketType | ConditionMarketType | 盤別 可選用參數Common 整股、Fixing 定盤、IntradayOdd 盤中零股、Odd 盤後零股 |
priceType | ConditionPriceType | 價格別 : 可選參數 :BidPrice 買進價、 AskPrice 賣出價、MatchedPrice 成交價、Limit 限價、LimitUp 漲停、LimitDown 跌停、Market 市價、Reference 參考價(平盤價) |
timeInForce | TimeInForce | 委託條件 可 選用參數為 Rod 、Fok 、Ioc |
orderType | ConditionOrderType | 委託類別 : 可選參數 :Stock 現貨、Margin 融資、Short 融券 |
TpslOrder Object
Parameter | Type | Meaning |
---|---|---|
timeInForce | TimeInforce | 委託條件 : 可選參數 :ROD 、IOC 、FOK |
priceType | ConditionPriceType | 價格別 : 可選參數 :BidPrice 買進價、 AskPrice 賣出價、MatchedPrice 成交價、Limit 限價、LimitUp 漲停、LimitDown 跌停、Market 市價、Reference 參考價(平盤價) |
orderType | ConditionOrderType | 委託類別 : 可選參數 :Stock 現貨、Margin 融資、Short 融券 |
targetPrice | string | 停損/停利觸發價 |
price | string | 停損/停利委託價 |
trigger | TriggerContent | 停損/停利觸發條件 (詳見表末說明) |
info
priceType
若為limit
時,price
需填入價格;其餘price填入空字串
停損/停利觸發條件
2.2.0 以後版本新增(2.1.1及以前版本無此欄位),可設定停損/停利觸發價格別為 1. 成交價(MatchedPrice);2. 最佳買價(BidPrice);3. 最佳賣價(AskPrice)
若未設定則此欄位填入 null, 預設使用 成交價(MatchedPrice)
TpslWrapper Object
Parameter | Type | Meaning |
---|---|---|
stopSign | StopSign | 停止條件 : 可選用 Full 全部成交為止、Partial 部分成交為止、UntilEnd 效期結束為止 |
tp | TpslOrder Object (Optional) | 停利條件內容 |
sl | TpslOrder Object (Optional) | 停損條件內容 |
endDate | string (Optional : 空值同母單StartDate) | 條件停止日期 |
intraday | bool (Optional) | 全部成交後日內當沖 |
TrailOrder
Parameter | Type | Meaning |
---|---|---|
symbol | string | 股票代號 |
price | string | 基準價 (Note. 只可輸入至多小數點後兩位,若超出將造成系統洗價失敗) |
direction | Direction | 方向 : 可選用 Up 上漲、Down 下跌 |
percentage | int | 上漲 / 下跌 % 數 |
buysell | BsAction | 買賣別 : 可選用 Buy 買進 、Sell 賣出 |
quantity | int | 委託股數 |
PriceType | ConditionPriceType | 價格類別 : 可選用 BidPrice 買進價、AskPrice 賣出價、MatchedPrice 成交價、Market 市價、LimitUp 漲停價、LimitDown 跌停價、Reference 參考價(平盤價) |
diff | int | 買賣價格檔數 (根據 priceType 加減檔數) ,正值為向上加檔數、負值為向下加檔數 |
timeInForce | TimeInForce | 委託條件 可選用參數為 ROD 、FOK 、IOC |
orderType | ConditionOrderType | 委託類別 可選用參數為 Stock 現股、Margin 融資、Short 融券 |
SplitDescription
Parameter | Type | Meaning |
---|---|---|
method | SliceType | Slice Condition : 可選用 : Type1 從 startTime 開始,每隔幾秒送一筆,總共totalQuantity ,每筆送 singleQuantity Type2 從 startTime 開始到 endTime 結束,每隔 interval 秒送一筆,總共 totalQuantity ,剩餘張數加總至最後一筆 Type3 從 startTime 開始到 endTime 結束,每隔 interval 秒送一筆,總共 totalQuantity ,剩餘張數從最後一筆往前分配. |
interval | int | 下單間隔時間 (秒) |
singleQuantity | int | 單筆下單量 (股數) |
totalQuantity | int (Optional) | 總共下單量 (股數) |
startTime | string | 開始時間 |
endTime | string (Optional) | 結束時間 |
caution
請注意,總共下單量需大於單筆下單量。
ConditionOrderResult
Parameter | Type | Meaning |
---|---|---|
guid | string | 條件單號 |
Constants ( 欄位對應數值 )
BsAction
買賣別
Name | Meaning |
---|---|
Buy | 買 |
Sell | 賣 |
ConditionMarketType
盤別
Name | Meaning |
---|---|
Common | 一般盤 |
Fixing | 定盤 |
IntradayOdd | 盤中零股 |
Odd | 盤後零股 |
TradingType
監控類型
Name | Meaning |
---|---|
Reference | 自動參考委託物件 |
Scheduled | 時間 |
TriggerContent
觸發條件
Name | Meaning |
---|---|
BidPrice | 買進價 |
AskPrice | 賣出價 |
MatchedPrice | 成交價 |
TotalQuantity | 總量 |
Time | 時間 |
Operator
Name | Meaning |
---|---|
GreaterThanOrEqual | 大於等於 |
LessThanOrEqual | 小於等於 |
GreaterThan | 大於 |
LessThan | 小於 |
StopSign
Name | Meaning |
---|---|
Full | 全部成交為止 |
Partial | 部分成交為止 |
UntilEnd | 效期結束為止 |
TimeInForce
委託條件 (TimeInForce)
Name | Meaning |
---|---|
ROD | 當日有效(Rest of Day) |
FOK | 全部成交否則取消(Fill-or-Kill) |
IOC | 立即成交否則取消(Immediate-or-Cancel) |
ConditionPriceType
價格類型 (ConditionPriceType)
Name | Meaning |
---|---|
Limit | 限價 |
BidPrice | 買進價 |
AskPrice | 賣出價 |
Market | 市價 |
MatchedPrice | 成交價 |
LimitUp | 漲停價 |
LimitDown | 跌停價 |
Reference | 參考價(平盤價) |
ConditionOrderType
委託類型 (orderType)
Name | Meaning |
---|---|
Stock | 現貨 |
Margin | 融資 |
Short | 融券 |
Direction
移動鎖利上漲/下跌追蹤 (direction)
Name | Meaning |
---|---|
Up | 上漲 |
Down | 下跌 |
SliceType
分單型態 (SliceType)
Name | Meaning |
---|---|
Type1 | 從開始時間,每隔幾秒送一筆,總共送N筆,每筆送M張 |
Type2 | 從開始到結束,每隔X秒送一筆,總共N張,剩餘張數加總至最後一筆 |
Type3 | 從開始到結束,每隔X秒送一筆,總共N張,剩餘張數從最後一筆往前分配 |
ConditionStatus
條件單狀態 (ConditionStatus)
Name | Meaning |
---|---|
Type1 | 今日相關查詢 |
Type2 | 尚有效單 |
Type3 | 條件比對中 |
Type4 | 委託處理中 |
Type5 | 委託成功 |
Type6 | 已通知 |
Type7 | 委託失敗 |
Type8 | 已有成交 |
Type9 | 刪除成功 |
Type10 | 異常 |
Type11 | 失效 |
HistoryStatus
歷史條件單狀態 (HistoryStatus)
Name | Meaning |
---|---|
Type1 | 所有條件單 ( 不包含已刪除、失效) |
Type2 | 選擇期間內全部成交單 |
Type3 | 選擇期間內部分成交單 |
Type4 | 選擇期間刪除單 |
Type5 | 選擇期間失效單 |
Type6 | 選擇期間內已觸發記錄 |