Batch Cancel Order
BatchCancelOrder
Request Parameter
Parameter | Type | Meaning |
---|---|---|
account | Account | Account |
orderResult | FutOptOrderResult (list of object) | The object list for cancel |
Result Reponse
參數 | 類別 | 說明 |
---|---|---|
isSuccess | bool | Interface result |
data | List | Modified content is returned |
message | string | isSuccess = False error description is returned |
FutOptOrderResult Parameter
Return type : Object
Parameter | Type | Meaning |
---|---|---|
functionType | int | Function Type : 0 New 、 10 Execute New、15 Amend Price 、 20 Amend Lot 、 30 Cancel 、90 Failed |
date | string | Transaction date |
seqNo | string | Order serial number |
branchNo | string | Branch number |
account | string | Account |
orderNo | string | Order number |
assetType | int | Asset type : 1 Future 、2 Option |
market | string | Market type : TAIMEX Future、Option |
marketType | FutOptMarketType | Trading session type : Future 、 Option 、 FutureNight After-Hour Future 、 OptionNight After-Hour Option |
unit | int | Trading Unit |
currency | string | Trading Currency |
symbol | string | Symbol |
expiryDate | string | Expiry Date |
strikePrice | double | Strike Price |
callPut | CallPut | Call / Put Type : Call Call 、Put Put |
buySell | BsAction | Buy/Sell Type : Buy 、 Sell |
symbolLeg2 | string | Symbol - Spread Order |
expiryDateLeg2 | string | Expiry Date - Spread Order |
strikePriceLeg2 | double | Strike Price - Spread Order |
callPutLeg2 | CallPut | Call / Put Type : Call Call 、Put Put |
buySellLeg2 | BsAction | Buy/Sell Type : Buy 、 Sell |
priceType | FutOptPriceType | Original order price type : Limit 、 Market 、 RangeMarket Market with Protection Orders 、 Reference |
price | double | Order Price |
lot | int | Original order lot |
timeInForce | TimeInForce | Time In Force Rod 、 Fok 、 Ioc |
orderType | FutOptOrderType | Order Type : New 、 Close 、 Auto 、 FdayTrade |
isPreOrder | bool | Reservation Flag |
status | int | Order 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 |
afterPriceType | FutOptPriceType | Valid order price type : Limit 、 Market 、 RangeMarket Market with Protection Orders 、 Reference |
afterPrice | double | Valid order price |
afterLot | int | Valid Order Lot |
filledLot | int | Filled Lot |
filledMoney | double | Filled Value |
beforeLot | int | Before the Lot Modification |
beforePrice | double | Before the Price Modification |
userDef | string | Custom Fields |
lastTime | string | Last Modification Time |
details | list | Order Process (Return value when query OrderResultDetail or OrderHistory ) |
errorMessage | string | Error Message |
Request Example
// Batch cancel ( modifying orders using the content returned by batch detail )
var cancel_object = new List<FutOptOrderResult>{
batch_detail.data[0],
batch_detail.data[1],
};
sdk.FutOpt.BatchCancelOrder(account, cancel_object);
// Batch cancel ( Using different individual orders )
var cancel_object = new List<FutOptOrderResult>{
order_res.data[0],
order_res.data[1],
};
sdk.FutOpt.BatchCancelOrder(account, cancel_object);
Response Example
{
isSuccess = True,
message = ,
data =[
FutOptOrderResult {
functionType = 30, // Function type (int)
date = 2024/03/25, // Transaction date (string)
seqNo = 00110212617, // Order sequence number (string)
branchNo = 15901, // Branch number (string)
account = 1234567, // Account (string)
orderNo = C0001, // Order number (string)
assetType = 1, // Asset type (int)
market = TAIMEX, // Market type (string)
marketType = Future, // Market type category (FutOptMarketType)
unit = 1, // Unit (int)
currency = TWD, // Currency (string)
symbol = FITF, // Symbol (string)
expiryDate = 202404, // Expiry date (string)
strikePrice = , // Strike price (double)
callPut = , // Call or put (CallPut)
buySell = Buy, // Buy or sell (BsAction)
symbolLeg2 = , // Spread Symbol (string)
expiryDateLeg2 = , // Expiry date - Spread Order (string)
strikePriceLeg2 = , // Strike price - Spread Order (double)
callPutLeg2 = , // Call or put - Spread Order (CallPut)
buySellLeg2 = , // Buy or sell - Spread Order (BsAction)
priceType = Limit, // Original order price type (FutOptPriceType)
price = 1822.6, // Price (double)
lot = 2, // Original order lot (int)
timeInForce = ROD, // Time in force (TimeInforce)
orderType = Auto, // Order type (FutOptOrderType)
isPreOrder = false, // Is pre-order (bool)
status = 30, // Order status (int)
afterPriceType = , // Valid order price type (FutOptPriceType)
afterPrice = 1822.6, // Valid order price (double)
afterLot = 0, // Valid order lot (int)
filledLot = 0, // Filled lot (int)
filledMoney = 0, // Filled amount (int)
beforeLot = , // Lot before amendment (int)
beforePrice = , // Price before amendment (double)
userDef = , // User-defined field (string)
lastTime = 13:21:34, // Last modification time (string)
errorMessage = // Error message (string)
},
FutOptOrderResult {
functionType = 30, // Function type (int)
date = 2024/03/25, // Transaction date (string)
seqNo = 00110212618, // Order sequence number (string)
branchNo = 15901, // Branch number (string)
account = 1234567, // Account (string)
orderNo = C0002, // Order number (string)
assetType = 1, // Asset type (int)
market = TAIMEX, // Market type (string)
marketType = Future, // Market type category (FutOptMarketType)
unit = 1, // Unit (int)
currency = TWD, // Currency (string)
symbol = FITF, // Symbol (string)
expiryDate = 202404, // Expiry date (string)
strikePrice = , // Strike price (double)
callPut = , // Call or put (CallPut)
buySell = Buy, // Buy or sell (BsAction)
symbolLeg2 = , // Spread Symbol (string)
expiryDateLeg2 = , // Expiry date - Spread Order (string)
strikePriceLeg2 = , // Strike price - Spread Order (double)
callPutLeg2 = , // Call or put - Spread Order (CallPut)
buySellLeg2 = , // Buy or sell - Spread Order (BsAction)
priceType = Limit, // Original order price type (FutOptPriceType)
price = 1822.6, // Price (double)
lot = 2, // Original order lot (int)
timeInForce = ROD, // Time in force (TimeInforce)
orderType = Auto, // Order type (FutOptOrderType)
isPreOrder = false, // Is pre-order (bool)
status = 30, // Order status (int)
...
}
]
}