Skip to main content

PlaceOrder

PlaceOrder

Request Parameter

ParameterTypeMeaning
accountAccountaccount
orderObjectOrderObjectOrder Object
unblockbool (optional) (default = false)unblock

Result Reponse

ParameterTypeMeaning
isSuccessboolInterface result
dataFutOptOrderResultFutOptOrderResult is returned
messagestringisSuccess = False error description is returned

FutOptOrderResult Parameter

Return type : Object

ParameterTypeMeaning
functionTypeintFunction Type : 0 New 、 10 Execute New、15 Amend Price 、 20 Amend Lot 、 30 Cancel 、90 Failed
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 (Return value when query OrderResultDetail or OrderHistory )
errorMessagestringError Message

Request Example

// Single 
var order = new FutOptOrder(
BsAction.Buy,
"TXO20000E4",
null,
null,
"500",
1,
FutOptMarketType.Option,
FutOptPriceType.Limit,
TimeInForce.Rod,
FutOptOrderType.Auto,
"From csharp" // optional field
)

sdk.FutOpt.PlaceOrder(account, order)

// Spread
var order = new FutOptOrder(
BsAction.Sell,
"TXO20000E4",
BsAction.Buy, // optional field
"TXO19900E4", // optional field
"90",
1,
FutOptMarketType.Option,
FutOptPriceType.Limit,
TimeInForce.Ioc,
FutOptOrderType.Auto,
"From csharp" // optional field
)


sdk.FutOpt.PlaceOrder(account, order)

Response Example

{
isSuccess = True,
message = ,
data = FutOptOrderResult{
functionType = 0, // Function Type (int): `0` New, `15` Amend Price, `20` Amend Lot, `30` Cancel
date = 2024/03/25, // Transaction Date (string)
seqNo = 00230177010, // Order Serial Number (string)
branchNo = 15901, // Branch Number (string)
account = 1234567, // Account (string)
orderNo = C0002, // Order Number (string)
assetType = 2, // Asset Type (int): `1` Future, `2` Option
market = TAIMEX, // Market Type (string)
marketType = Option, // Trading Session Type (FutOptMarketType): `Future`, `Option`, `FutureNight` After-Hour Future, `OptionNight` After-Hour Option
unit = 1, // Unit (int)
currency = TWD, // Trading Currency (string)
symbol = TXO, // Symbol (string)
expiryDate = 202404, // Expiry Date (string)
strikePrice = 20000, // Strike Price (double)
callPut = Call, // Call / Put (CallPut): `Call`, `Put`
buySell = Buy, // Buy/Sell Type (BsAction): `Buy`, `Sell`
symbolLeg2 = , // Spread Symbol (string)
expiryDateLeg2 = , // Expiry Date - Spread Order (string)
strikePriceLeg2 = , // Strike Price - Spread Order (double)
callPutLeg2 = , // Call / Put - Spread Order (CallPut)
buySellLeg2 = , // Buy/Sell Type - Spread Order (BsAction)
priceType = Limit, // Original Order Price Type (FutOptPriceType): `Limit`, `Market`, `RangeMarket` Market with Protection Orders, `Reference`
price = 530, // Order Price (double)
lots = 1, // Original Order Lot (int)
timeInForce = Rod, // Time In Force (TimeInforce): `ROD`, `FOK`, `IOC`
orderType = Auto, // Order Type (FutOptOrderType): `New`, `Close`, `Auto`, `FdayTrade` DayTrade
isPreOrder = false, // Reservation Order Flag (bool)
status = 10, // Order Status (int): `0` Reservation, `4` InQueue, `9` TimeOut, `10` New Order, `30` Cancel Order, `50` Fully Filled, `90` Order Failed
afterPriceType = Limit, // Valid Order Price Type (FutOptPriceType): `Limit`, `Market`, `RangeMarket` Market with Protection Orders, `Reference`
afterPrice = 530, // Valid Order Price (double)
afterLot = 1, // Valid Order Lot (int)
filledLot = 0, // Filled Lot (int)
filledMoney = 0, // Filled Value (int)
beforeLot = 0, // Before the Lot Modification (int)
beforePrice = 530, // Before the Price Modification (double)
userDef = From CS, // Custom Fields (string)
lastTime = 11:50:08, // Last Modification Time (string)
details = , // Order Process (list)
errorMessage = // Error Message (string)
}
}