取得批次委託明細
batch_order_detail
輸入參數
參數 | 類別 | 說明 |
---|---|---|
account | Account | 帳號 |
batch_order_list | BatchResult | 批次委託列表 |
Result 回傳
參數 | 類別 | 說明 |
---|---|---|
is_success | bool | 是否成功 |
data | List | 回傳委託資訊 |
message | string | 當is_success = false 回傳錯誤訊息 |
委託資訊 OrderResult 欄位
Return type : Object
參數 | 類別 | 說明 |
---|---|---|
function_type | int (Optional) | 功能別 : 0 新單 、 10 新單執行 、 15 改價 、 20 改量 、 30 刪單 、 90 失敗 |
date | string | 交易日期 |
seq_no | string | 委託單流水序號 |
branch_no | string | 分公司代號 |
account | string | 帳號 |
order_no | string | 委託書號 |
asset_type | int | 資產類別 : 0 證券 |
market | string | 市場類型 : TAIEX 上市股票 、 TAISDAQ 上櫃股票 、 TAIEMG 興櫃股票 |
market_type | MarketType | 盤別種類 : Common 整股 、 Fixing 定盤 、 IntradayOdd 盤中零股 、 Odd 盤後零股 、 Emg 興櫃 、 EmgOdd 興櫃零股 |
stock_no | string | 股票代號 |
buy_sell | int | 買賣別 : Buy 買 、 Sell 賣 |
price_type | PriceType | 原始委託價格別 : Limit 限價 、 LimitUp 漲停 、 LimitDown 跌停 、 Market 市價 、 Reference 參考價 |
price | float | 價格 |
quantity | int | 原始委託股數 |
time_in_force | TimeInforce | 委託條件別 : ROD ROD 、 FOK FOK 、 IOC IOC |
order_type | OrderType | 委託單類型 : Stock 現股 、 Margin 融資 、 Short 融券 、 DayTrade 現股當沖 、 SBL 借券 |
is_pre_order | bool | 是否為預約單 |
status | int | 委託單狀態 : 0 預約單 、 4 系統將委託送往後台 、 9 連線逾時 、10 委託成功 、 30 未成交刪單成功 、 40 部分成交,剩餘取消 、 50 完全成交 、 90 失敗 |
after_price_type | PriceType | 有效委託價格別 : Limit 限價 、 LimitUp 漲停 、 LimitDown 跌停 、 Market 市價 、 Reference 參考價 |
after_price | float | 有效 委託價格 |
unit | int | 單位數 |
after_qty | int | 有效委託股數(包含已成交部分) |
filled_qty | int | 成交股數 |
filled_money | int | 成交價金 |
before_qty | int | 改單前有效量 |
before_price | float | 改單前有效價 |
user_def | string | 自訂欄位 |
last_time | string | 最後異動時間 |
details | list | 委託歷程 (查詢order_result_detail or order_history才有值) |
error_message | string | 錯誤訊息 |
caution
此功能僅供查詢批次送單執行結果,欲取得委託單最新狀態請使用單筆委託單查詢功能
請求範例
batch_results = sdk.stock.batch_order_lists(account)
sdk.stock.batch_order_detail(account, batch_results.data[0])
回 傳範例
Result {
is_success: True,
message: None,
data : [OrderResult{
function_type: None, # 功能別 (int)
date: "2023/10/16", # 交易日期 (string)
seq_no: "00000000005", # 委託單流水序號 (string)
branch_no: "6460", # 分公司代號 (string)
account: "26", # 帳號 (string)
order_no: "bA632", # 委託書號 (string)
asset_type: 0, # 資產類別 (int)
market: "TAIEX", # 市場類型 (string)
market_type: Common, # 盤別種類 (MarketType)
stock_no: "2888", # 股票代號 (string)
buy_sell: Buy, # 買賣別 (BSAction)
price_type: Limit, # 原始委託價格別 (PriceType)
price: 8.9, # 價格 (float)
quantity: 2000, # 原始委託股數 (int)
time_in_force: ROD, # 委託條件別 (TimeInForce)
order_type: Stock, # 委託單類型 (OrderType)
is_pre_order: false, # 是否為預約單 (bool)
status: 10, # 委託單狀態 (int)
after_price_type: Limit, # 有效委託價格別 (PriceType)
after_price: 8.9, # 有效委託價格 (float)
unit: 1000, # 單位數 (int)
after_qty: 2000, # 有效委託股數 (int)
filled_qty: 0, # 成交股數 (int)
filled_money: 0, # 成交價金 (int)
before_qty: 0, # 改單前有效量 (int)
before_price: 8.9, # 改單前有效價 (float)
user_def: , # 自訂欄位 (string)
last_time: "09:31:25.174", # 最後異動時間 (string)
details: None, # 委託歷程 (list)
error_message: None # 錯誤訊息 (string)
},
OrderResult{
function_type: None, # 功能別 (int)
date: "2023/10/16", # 交易日期 (string)
seq_no: "00000000005", # 委託單流水序號 (string)
branch_no: "6460", # 分公司代號 (string)
account: "26", # 帳號 (string)
order_no: "bA631", # 委託書號 (string)
asset_type: 0, # 資產類別 (int)
market: "TAIEX", # 市場類型 (string)
market_type: Common, # 盤別種類 (MarketType)
stock_no: "2888", # 股票代號 (string)
buy_sell: Buy, # 買賣別 (BSAction)
price_type: Limit, # 原始委託價格別 (PriceType)
price: 8.9, # 價格 (float)
quantity: 2000, # 原始委託股數 (int)
time_in_force: ROD, # 委託條件別 (TimeInForce)
order_type: Stock, # 委託單類型 (OrderType)
is_pre_order: false, # 是否為預約單 (bool)
status: 10, # 委託單狀態 (int)
after_price_type: Limit, # 有效委託價格別 (PriceType)
after_price: 8.9, # 有效委託價格 (float)
unit: 1000, # 單位數 (int)
after_qty: 2000, # 有效委託股數 (int)
filled_qty: 0, # 成交股數 (int)
filled_money: 0, # 成交價金 (int)
before_qty: 0, # 改單前有效量 (int)
before_price: 8.9, # 改單前有效價 (float)
user_def: None, # 自訂欄位 (string)
last_time: "09:31:25.101", # 最後異動時間 (string)
details: None, # 委託歷程 (list)
error_message: None # 錯誤訊息 (string)
}]}