Batch Modify Price
BatchModifyPrice
First, using 'MakeModifyPriceObj' create a 'FutOptModifyPrice' object
Parameter | Type | Meaning |
---|---|---|
orderResult | FutOptOrderResult | The intended order result object to be modified |
price | string | The price after modification |
priceType | FutOptPriceType | The price type after modification |
caution
When 'price' is filled, priceType should be empty or null ; otherwise, the 'price' field should be empty or null
Put the returned object into the 'BatchModifyPrice' function
Request Parameter
Parameter | Type | Meaning |
---|---|---|
account | Account | Account |
ModifyPriceObj | FutOptModifyPrice (list of object) | The object list for price modification |
Result Reponse
參數 | 類別 | 說明 |
---|---|---|
isSuccess | bool | Interface result |
data | List | Modified content list 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 price modification ( modifying orders using the content returned by batch detail )
var modified_orders = new List<FutOptModifyPrice> {
sdk.FutOpt.MakeModifyPriceObj(batch_result.data[0], "19900", null),
sdk.FutOpt.MakeModifyPriceObj(batch_result.data[1], "19900", null)
};
var batch_modify_price = sdk.FutOpt.BatchModifyPrice(account, modified_orders);
Console.WriteLine(batch_modify_price);
// Batch price modification ( Using different individual orders )
var modified_orders = new List<FutOptModifyPrice> {
sdk.FutOpt.MakeModifyPriceObj(orderResults.data[37], "19900", null),
sdk.FutOpt.MakeModifyPriceObj(orderResults.data[35], "19900", null)
};
var batch_modify_price = sdk.FutOpt.BatchModifyPrice(account, modified_orders);
Console.WriteLine(batch_modify_price);
Response Example
{
isSuccess = True,
message = ,
data =[ // Batch price modification (modifying orders using the content returned by batch detail)
FutOptOrderResult{
functionType = 15, // Function Type (int)
date = 2024/03/25, // Transaction Date (string)
seqNo = 00310212663, // Order Serial Number (string)
branchNo = 15901, // Branch Number (string)
account = 1234567, // Account (string)
orderNo = Q0005, // Order Number (string)
assetType = 1, // Asset Type (int): `1` Future, `2` Option
market = TAIMEX, // Market Type (string)
marketType = Future, // Trading Session Type (FutOptMarketType): `Future`, `Option`, `FutureNight` After-Hour Future, `OptionNight` After-Hour Option
unit = , // Unit (int)
currency = TWD, // Trading Currency (string)
symbol = FITX, // Symbol (string)
expiryDate = 202404, // Expiry Date (string)
strikePrice = 0, // Strike Price (float)
callPut = , // Call / Put (CallPut)
buySell = Buy, // Buy/Sell Type (BsAction): `Buy`, `Sell`
symbolLeg2 = , // Spread Symbol (string)
expiryDateLeg2 = , // Expiry Date - Spread Order (string)
strikePriceLeg2 = , // Strike Price - Spread Order (float)
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 = 20000, // Order Price (float)
lot = 1, // Original Order Lot (int)
timeInForce = Rod, // Time In Force (TimeInForce): `Rod`, `Fok`, `Ioc`
orderType = New, // 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 = 19900, // Valid Order Price (float)
afterLot = 1, // Valid Order Lot (int)
filledLot = 0, // Filled Lot (int)
filledMoney = 0, // Filled Value (int)
beforeLot = 0, // Before the Lot Modification (int)
beforePrice = 20000, // Before the Price Modification (float)
userDef = , // Custom Fields (string)
lastTime = 13:39:05, // Last Modification Time (string)
errorMessage = // Error Message (string)
},
FutOptOrderResult{
functionType = 15, // Function Type (int)
date = 2024/03/25, // Transaction Date (string)
seqNo = 00310212664, // Order Serial Number (string)
branchNo = 15901, // Branch Number (string)
account = 1234567, // Account (string)
orderNo = Q0006, // Order Number (string)
assetType = 1, // Asset Type (int): `1` Future, `2` Option
market = TAIMEX, // Market Type (string)
marketType = Future, // Trading Session Type (FutOptMarketType): `Future`, `Option`, `FutureNight` After-Hour Future, `OptionNight` After-Hour Option
unit = , // Unit (int)
currency = TWD, // Trading Currency (string)
symbol = FITX, // Symbol (string)
expiryDate = 202404, // Expiry Date (string)
strikePrice = 0, // Strike Price (float)
callPut = , // Call / Put (CallPut)
buySell = Buy, // Buy/Sell Type (BsAction): `Buy`, `Sell`
symbolLeg2 = , // Spread Symbol (string)
expiryDateLeg2 = , // Expiry Date - Spread Order (string)
strikePriceLeg2 = , // Strike Price - Spread Order (float)
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 = 20000, // Order Price (float)
lot = 1, // Original Order Lot (int)
timeInForce = Rod, // Time In Force (TimeInForce): `Rod`, `Fok`, `Ioc`
orderType = New, // 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
...
}
]
}
Below example only extract data content
[ // Batch price modification( Using different individual orders )
FutOptOrderResult{
functionType = 15, // Function Type (int)
date = 2024/03/25, // Transaction Date (string)
seqNo = 00110212763, // Order Serial Number (string)
branchNo = 15901, // Branch Number (string)
account = 1234567, // Account (string)
orderNo = CA004, // Order Number (string)
assetType = 1, // Asset Type (int): `1` Future, `2` Option
market = TAIMEX, // Market Type (string)
marketType = Future, // Trading Session Type (FutOptMarketType): `Future`, `Option`, `FutureNight` After-Hour Future, `OptionNight` After-Hour Option
unit = , // Unit (int)
currency = TWD, // Trading Currency (string)
symbol = FITX, // Symbol (string)
expiryDate = 202404, // Expiry Date (string)
strikePrice = 0, // Strike Price (float)
callPut = , // Call / Put (CallPut)
buySell = Buy, // Buy/Sell Type (BsAction): `Buy`, `Sell`
symbolLeg2 = , // Spread Symbol (string)
expiryDateLeg2 = , // Expiry Date - Spread Order (string)
strikePriceLeg2 = , // Strike Price - Spread Order (float)
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 = 20000, // Order Price (float)
lot = 1, // Original Order Lot (int)
timeInForce = Rod, // Time In Force (TimeInForce): `Rod`, `Fok`, `Ioc`
orderType = New, // 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 = 19900, // Valid Order Price (float)
afterLot = 1, // Valid Order Lot (int)
filledLot = 0, // Filled Lot (int)
filledMoney = 0, // Filled Value (int)
beforeLot = 0, // Before the Lot Modification (int)
beforePrice = 20000, // Before the Price Modification (float)
userDef = , // Custom Fields (string)
lastTime = 13:39:05, // Last Modification Time (string)
errorMessage = // Error Message (string)
},
FutOptOrderResult{
functionType = 15, // Function Type (int)
date = 2024/03/25, // Transaction Date (string)
seqNo = 00110212762, // Order Serial Number (string)
branchNo = 15901, // Branch Number (string)
account = 1234567, // Account (string)
orderNo = CA005, // Order Number (string)
assetType = 1, // Asset Type (int): `1` Future, `2` Option
market = TAIMEX, // Market Type (string)
marketType = Future, // Trading Session Type (FutOptMarketType): `Future`, `Option`, `FutureNight` After-Hour Future, `OptionNight` After-Hour Option
unit = , // Unit (int)
currency = TWD, // Trading Currency (string)
symbol = FITX, // Symbol (string)
expiryDate = 202404, // Expiry Date (string)
strikePrice = 0, // Strike Price (float)
callPut = , // Call / Put (CallPut)
buySell = Buy, // Buy/Sell Type (BSAction): `Buy`, `Sell`
symbolLeg2 = , // Spread Symbol (string)
expiryDateLeg2 = , // Expiry Date - Spread Order (string)
strikePriceLeg2 = , // Strike Price - Spread Order (float)
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 = 20000, // Order Price (float)
lot = 1, // Original Order Lot (int)
timeInForce = Rod, // Time In Force (TimeInForce): `Rod`, `Fok`, `Ioc`
orderType = New, // 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
...
}
]