Skip to main content

Get Historical Filled

filled_history

Request Parameter

ParameterTypeMeaning
accountAccountAccount
start_datestringQuery start date
end_datestring (optional) ( None or empty will equals start_date)Query end date
info

Since v2.1.1, this supports longer term historical data inquiry. The day range is limited maximum 30 days per request. For older SDK versions (until v2.1.0), it supports historical data for the past two days.

Result Response

ParameterTypeMeaning
is_successboolInterface result
dataListFilledData list is returned
messagestringis_success = False error description is returned

FilledData Parameter

Return type : Object

ParameterTypeMeaning
datestringFilled Date
branch_nostringBranch number
accountstringAccount
seq_nostringOrder Serial Number (only display on filled callback)
order_nostringOrder number
stock_nostringSymbol
buy_sellBSActionBuy/Sell Type : BuySell
filled_nostringFilled Transaction number
filled_avg_pricefloatFilled Average Price
filled_qtyintFilled Share
filled_pricefloatFilled Price
order_typeOrderTypeOrder Type : StockMarginShortDayTradeSBL
filled_timestringFilled Time
user_defstringCustom Fields (only display on filled callback)

Request Example

sdk.stock.filled_history(account,"20230921","20230922")

回傳範例

Result {
is_success: True,
message: None,
data :[
FilledData{
date: "2023/09/15", # Filled Date (string)
branch_no: "6460", # Branch number (string)
account: "26", # Account (string)
seq_no: None, # Order Serial Number (string)
order_no: "bA422", # Order number (string)
stock_no: "1101", # Symbol (string)
buy_sell: 2, # Buy/Sell Type (int)
filled_no: "00000000001", # Filled Transaction number (string)
filled_avg_price: 35.2, # Filled Average Price (float)
filled_qty: 1000, # Filled Share (int)
filled_price: 35.2, # Filled Price (float)
order_type: "Stock", # Order Type (string)
filled_time: "10:31:00.931" # Filled Time (string)
user_def: None # Custom Fields (string)
},
...
]
}