Batch Modify Quantity
BatchModifyPrice
First, using 'MakeModifyQuantityObj' create a 'ModifyQuantityObj' object
Parameter | Type | Meaning |
---|---|---|
orderResult | OrderResult | The intended order result object to be modified |
quantity | int | The quantity after modification ( The modified quantity includes the partially filled portion of this order ) |
Request Parameter
Parameter | Type | Meaning |
---|---|---|
account | Account | Account |
ModifyQuantityObj | ModifyQuantityObj (list of object) | The object list for quantity modification |
Result Reponse
Parameter | Type | Meaning |
---|---|---|
isSuccess | bool | Interface result |
data | List | Modified content list is returned |
message | string | isSuccess = False error description is returned |
OrderResult Parameter
Return type : Object
Parameter | Type | Meaning |
---|---|---|
functionType | int | Function Type : 0 New Order 、 10 New Order Executed 、 15 Change Price 、 20 Change Quantity 、 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 : 0 Stock |
market | string | Market Type : TAIEX Listed 、 TAISDAQ OTC 、 TAIEMG Emg |
marketType | MarketType | Trading Session Type : Common 、 Fixing 、 IntradayOdd 、 Odd 、 Emg 、 EmgOdd |
stockNo | string | Symbol |
buySell | BsAction | Buy/Sell Type : Buy 、 Sell |
priceType | PriceType | Original OPrder Price Type : Limit 、 LimitUp 、 LimitDown 、 Market 、 Reference |
price | double | Order Price |
quantity | int | Original Order Quantity |
timeInForce | TimeInForce | Time In Force : Rod 、 Fok 、 Ioc |
orderType | OrderType | Order Type : Stock 、 Margin 、 Short Short sale 、 DayTrade 、 SBL |
isPreOrder | bool | Reservation Order Flag |
status | int | Order Status : 0 Reservation 、 4 Sending to the system backend 、 9 Timeout 、 10 Active order 、 30 Canceled 、 40 Partially filled, others canceled 、 50 Fully filled 、 90 Failed |
afterPriceType | PriceType | Valid Order Price Type : Limit 、 LimitUp 、 LimitDown 、 Market 、 Reference |
afterPrice | double | Valid Order Price |
unit | int | Trading Unit |
afterQty | int | Valid Order Quantity (filled quantity included) |
filledQty | int | Filled Quantity |
filledMoney | int | Filled Value |
beforeQty | int | Before the Quantity 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 quantity modification ( modifying orders using the content returned by batch detail )
var modified_orders = new List<ModifyQuantity> {
sdk.Stock.MakeModifyQuantityObj(batch_result.data[0], 1000),
sdk.Stock.MakeModifyQuantityObj(batch_result.data[1], 1000)
};
var batch_modify_qty = sdk.Stock.BatchModifyQuantity(account, modified_orders);
Console.WriteLine(batch_modify_qty);
// Batch quantity modification ( Using different individual orders )
var modified_orders = new List<ModifyQuantity> {
sdk.Stock.MakeModifyQuantityObj(orderResults.data[0], 1000),
sdk.Stock.MakeModifyQuantityObj(orderResults.data[1], 1000)
};
var batch_modify_qty = sdk.Stock.BatchModifyQuantity(account, modified_orders);
Console.WriteLine(batch_modify_qty);
Response Example
{
isSuccess = True,
message = ,
data =[ // Batch quantity modification ( modifying orders using the content returned by batch detail )
OrderResult{
functionType = 20, // Function Type (int)
date = 2024/03/08, // Transaction Date (string)
seqNo = 00000000042, // Order Serial Number (string)
branchNo = 20112, // Branch Number (string)
account = 26, // Account (string)
orderNo = x0026, // Order Number (string)
assetType = 0, // Asset Type (int)
market = TAIEX, // Market Type (string)
marketType = Common, // Trading Session Type (MarketType)
stockNo = 2881, // Symbol (string)
buySell = Buy, // Buy/Sell Type (BsAction)
priceType = Limit, // Original Order Price Type (PriceType)
price = 66, // Order Price (double)
quantity = 2000, // Original Order Quantity (int)
timeInForce = Rod, // Time In Force (TimeInforce)
orderType = Stock, // Order Type (string)
isPreOrder = False, // Reservation Order Flag (bool)
status = 10, // Order Status (int)
afterPriceType = , // Valid Order Price Type (PriceType)
afterPrice = 66, // Valid Order Price (double)
unit = 1000, // Trading Unit (int)
afterQty = 1000, // Valid Order Quantity (int)
filledQty = 0, // Filled Quantity (int)
filledMoney = 0, // Filled Value (int)
beforeQty = 2000, // Before the Quantity Modification (int)
beforePrice = , // Before the Price Modification (string)
userDef = batch 2, // Custom Fields (string)
lastTime = 12:21:51.023, // Last Modification Time (string)
details = , // Order Process (list)
errorMessage = // Error Message (string)
},
OrderResult{
functionType = 20, // Function Type (int)
date = 2024/03/08, // Transaction Date (string)
seqNo = 00000000041, // Order Serial Number (string)
branchNo = 20112, // Branch Number (string)
account = 26, // Account (string)
orderNo = x0025, // Order Number (string)
assetType = 0, // Asset Type (int)
market = TAIEX, // Market Type (string)
marketType = Common, // Trading Session Type (MarketType)
stockNo = 2881, // Symbol (string)
buySell = Buy, // Buy/Sell Type (BsAction)
priceType = Limit, // Original Order Price Type (PriceType)
price = 66, // Order Price (double)
quantity = 2000, // Original Order Quantity (int)
timeInForce = Rod, // Time In Force (TimeInforce)
orderType = Stock, // Order Type (string)
isPreOrder = False, // Reservation Order Flag (bool)
status = 10, // Order Status (int)
afterPriceType = , // Valid Order Price Type (PriceType)
afterPrice = 66, // Valid Order Price (double)
unit = 1000, // Trading Unit (int)
afterQty = 1000, // Valid Order Quantity (int)
filledQty = 0, // Filled Quantity (int)
filledMoney = 0, // Filled Value (int)
beforeQty = 2000, // Before the Quantity Modification (int)
beforePrice = , // Before the Price Modification (string)
userDef = batch 1, // Custom Fields (string)
lastTime = 12:21:51.023, // Last Modification Time (string)
details = , // Order Process (list)
errorMessage = // Error Message (string)
}
]
}
Below example only extract data content
[ // Batch quantity modification ( Using different individual orders )
{
functionType = 20, // Function Type (int)
date = 2024/03/08, // Transaction Date (string)
seqNo = 00000000043, // Order Serial Number (string)
branchNo = 20112, // Branch Number (string)
account = "26", // Account (string)
orderNo = x0027, // Order Number (string)
assetType = 0, // Asset Type (int)
market = TAIEX, // Market Type (string)
marketType = Common, // Trading Session Type (MaeketType)
stockNo = 2881, // Symbol (string)
buySell = Buy, // Buy/Sell Type (BsAction)
priceType = Limit, // Original Order Price Type (PriceType)
price = 66, // Price (double)
quantity = 2000, // Original Order Quantity (int)
timeInForce = Rod, // Time In Force (TimeInForce)
orderType = Stock, // Order Type (OrderType)
isPreOrder = False, // Reservation Order Flag (bool)
status = 10, // Order Status (int)
afterPriceType = , // Valid Order Price Type (PriceType)
afterPrice = 66, // Valid Order Price (double)
unit = 1000, // Unit (int)
afterQty = 1000, // Valid Order Quantity (int)
filledQty = 0, // Filled Quantity (int)
filledMoney = 0, // Filled Value (int)
beforeQty = 2000, // Before the Quantity Modification (int)
beforePrice = , // Before the Price Modification (int)
userDef = Test, // Custom Fields (string)
lastTime = 12:21:53.023, // Last Modification Time (string)
errorMessage = // Error Message (string)
},
{
functionType = 20, // Function Type (int)
date = 2024/03/08, // Transaction Date (string)
seqNo = 00000000044, // Order Serial Number (string)
branchNo = 20112, // Branch Number (string)
account = 26, // Account (string)
orderNo = x0028, // Order Number (string)
assetType = 0, // Asset Type (int)
market = TAIEX, // Market Type (string)
marketType = Common, // Trading Session Type (MarketType)
stockNo = 2881, // Symbol (string)
buySell = Buy, // Buy/Sell Type (BsAction)
priceType = Limit, // Original Order Price Type (PriceType)
price = 66, // Price (double)
quantity = 2000, // Original Order Quantity (int)
timeInForce = Rod, // Time In Force (TimeInForce)
orderType = Stock, // Order Type (OrderType)
isPreOrder = False, // Reservation Order Flag (bool)
status = 10, // Order Status (int)
afterPriceType = , // Valid Order Price Type (PriceType)
afterPrice = 66, // Valid Order Price (double)
unit = 1000, // Unit (int)
afterQty = 1000, // Valid Order Quantity (int)
filledQty = 0, // Filled Quantity (int)
filledMoney = 0, // Filled Value (int)
beforeQty = 2000, // Before the Quantity Modification (int)
beforePrice = , // Before the Price Modification (string)
userDef = Test, // Custom Fields (string)
lastTime = 12:21:53.023, // Last Modification Time (string)
errorMessage = // Error Message (string)
}
]