Skip to main content

Get Historical Order

OrderHistory

Request Parameter

ParameterTypeMeaning
accountAccountAccount
startDatestringQuery start date
endDatestringQuery end date
marketTypeFutOptMarketType (Optional : If not specified, it includes all)Trading session type : FutureOptionFutureNight After-Hour Future 、 OptionNight After-Hour Option
info

Support historical data for the past two days

Result Reponse

ParameterTypeMeaning
isSuccessboolInterface result
dataListFutOptOrderResult list is returned
messagestringisSuccess = False error description is returned

FutOptOrderResult Parameter

Return type : Object

ParameterTypeMeaning
functionTypeint (optional)Function Type : 0 New 、10 Execute New、 15 Amend Price 、 20 Amend Lot 、 30 Cancel
datestringTransaction date
seqNostringOrder serial number
branchNostringBranch number
accountstringAccount
orderNostringOrder number
assetTypeintAsset type : 1 Future 、2 Option
marketstringMarket type : TAIMEX Future、Option
marketTypeFutOptMarketTypeTrading session type : FutureOptionFutureNight After-Hour Future 、 OptionNight After-Hour Option
unitintTrading Unit
currencystringTrading Currency
symbolstringSymbol
expiryDatestringExpiry Date
strikePricedoubleStrike Price
callPutCallPutCall / Put Type : Call Call 、Put Put
buySellBsActionBuy/Sell Type : BuySell
symbolLeg2stringSymbol - Spread Order
expiryDateLeg2stringExpiry Date - Spread Order
strikePriceLeg2doubleStrike Price - Spread Order
callPutLeg2CallPutCall / Put Type : Call Call 、Put Put
buySellLeg2BsActionBuy/Sell Type : BuySell
priceTypeFutOptPriceTypeOriginal order price type : LimitMarketRangeMarket Market with Protection Orders 、 Reference
pricedoubleOrder Price
lotintOriginal order lot
timeInForceTimeInForceTime In Force RodFokIoc
orderTypeFutOptOrderTypeOrder Type : NewCloseAutoFdayTrade
isPreOrderboolReservation Flag
statusintOrder Status : 0 Reservation 、 4 In queue 、 8 Processing by system backend 、 9 TimeOut 、 10 Active Order 、 30 Cancel Order 、 50 Fully Filled 、 90 Order Failed
afterPriceTypeFutOptPriceTypeValid order price type : LimitMarketRangeMarket Market with Protection Orders 、 Reference
afterPricedoubleValid order price
afterLotintValid Order Lot
filledLotintFilled Lot
filledMoneydoubleFilled Value
beforeLotintBefore the Lot Modification
beforePricedoubleBefore the Price Modification
userDefstringCustom Fields
lastTimestringLast Modification Time
detailslistOrder Process
>> functionTypeintFunction Type : 10 Execute New、 15 Amend Price 、 20 Amend Quantity 、 30 Cancel 、50 Fully Filled、90 Failed
>> modifiedTimestringOrder Modified Time
>> beforeQtyintOriginal Order Quantity
>> afterQtyintValid Order Quantity (filled quantity included)
>> beforePricedoubleOriginal Order Price
>> afterPricedoubleValid Order Price
>> filledMoneydoubleFilled Value
>> errorMessagestringError Message
errorMessagestringError Message

Request Example

Console.WriteLine(sdk.FutOpt.OrderHistory(account, FutOptMarketType.Option, "20230921", "20230922"));

Response Example

{
isSuccess = True,
message = ,
data =[
FutOptOrderResult{
function_type = 0, // Function Type (int): `0` New, `15` Amend Price, `20` Amend Lot, `30` Cancel
date = 2024/04/11, // Transaction Date (string)
seq_no = 00230177314, // Order Serial Number (string)
branch_no = 15000, // Branch Number (string)
account = 9974825, // Account (string)
order_no = C0020, // Order Number (string)
asset_type = 2, // Asset Type (int): `1` Future, `2` Option
market = TAIMEX, // Market Type (string)
market_type = Option, // Trading Session Type (FutOptMarketType): `Future`, `Option`, `FutureNight` After-Hour Future, `OptionNight` After-Hour Option
unit = , // Unit (int)
currency = , // Trading Currency (string)
symbol = TXO, // Symbol (string)
expiry_date = 202404, // Expiry Date (string)
strike_price = 18600, // Strike Price ( double)
call_put = Call, // Call / Put (CallPut): `Call`, `Put`
buy_sell = Buy, // Buy/Sell Type (BsAction): `Buy`, `Sell`
symbol_leg2 = , // Spread Symbol (string)
expiry_date_leg2 = , // Expiry Date - Spread Order (string)
strike_price_leg2 = , // Strike Price - Spread Order ( double)
call_put_leg2 = , // Call / Put - Spread Order (CallPut)
buy_sell_leg2 = , // Buy/Sell Type - Spread Order (BsAction)
price_type = Limit, // Original Order Price Type (FutOptPriceType): `Limit`, `Market`, `RangeMarket` Market with Protection Orders, `Reference`
price = 2100, // Order Price ( double)
lot = 1, // Original Order Lot (int)
time_in_force = ROD, // Time In Force (TimeInForce): `ROD`, `FOK`, `IOC`
order_type = New, // Order Type (FutOptOrderType): `New`, `Close`, `Auto`, `FdayTrade` DayTrade
is_pre_order = false, // Reservation Order Flag (bool)
status = 50, // Order Status (int): `0` Reservation, `4` InQueue, `9` TimeOut, `10` New Order, `30` Cancel Order, `50` Fully Filled, `90` Order Failed
after_price_type = , // Valid Order Price Type (FutOptPriceType): `Limit`, `Market`, `RangeMarket` Market with Protection Orders, `Reference`
after_price = 2100, // Valid Order Price ( double)
after_lot = 1, // Valid Order Lot (int)
filled_lot = 1, // Filled Lot (int)
filled_money = 2100, // Filled Value ( double)
before_lot = , // Before the Lot Modification (int)
before_price = , // Before the Price Modification ( double)
user_def = , // Custom Fields (string)
last_time = 10:41:46.760, // Last Modification Time (string)
error_message = // Error Message (string)
},
...
]
}