Batch Modify Price
BatchModifyPrice
First, using 'MakeModifyPriceObj' create a 'ModifyPriceObj' object
Parameter | Type | Meaning |
---|---|---|
orderResult | OrderResult | The intended order result object to be modified |
price | string | The price after modification |
priceType | PriceType | 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 | ModifyPriceObj (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 |
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 price modification ( modifying orders using the content returned by batch detail )
var modified_orders = new List<ModifyPrice> {
sdk.Stock.MakeModifyPriceObj(batch_result.data[0], "41.1", null),
sdk.Stock.MakeModifyPriceObj(batch_result.data[1], "41.2", null)
};
var batch_modify_price = sdk.Stock.BatchModifyPrice(account, modified_orders);
Console.WriteLine(batch_modify_price);
// Batch price modification ( Using different individual orders )
var modified_orders = new List<ModifyPrice> {
sdk.Stock.MakeModifyPriceObj(orderResults.data[37], "41.1", null),
sdk.Stock.MakeModifyPriceObj(orderResults.data[35], "41.2", null)
};
var batch_modify_price = sdk.Stock.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)
OrderResult{
functionType = 15, // Function Type (int)
date = 2023/11/22, // Transaction Date (string)
seqNo = 00000322356, // Order Serial Number (string)
branchNo = 6460, // Branch Number (string)
account = 26, // Account (string)
orderNo = x0018, // Order Number (string)
assetType = 0, // Asset Type (int)
market = TAIEX, // Market Type (string)
marketType = Common, // Trading Session Type (MarketType)
stockNo = 1101, // Symbol (string)
buySell = Sell, // Buy/Sell Type (BsAction)
priceType = Limit, // Original Order Price Type (PriceType)
price = 41.2, // Price (double)
quantity = 5000, // 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 = Limit, // Valid Order Price Type (PriceType)
afterPrice = 41.1, // Valid Order Price (double)
unit = 1000, // Unit (int)
afterQty = 2000, // Valid Order Quantity (int)
filledQty = 0, // Filled Quantity (int)
filledMoney = 0, // Filled Value (int)
beforeQty = , // Before the Quantity Modification (int)
beforePrice = 41.3, // Before the Price Modification (double)
userDef = 12345678, // Custom Fields (string)
lastTime = 13:56:57.713, // Last Modification Time (string)
details = , // Order Process (list)
errorMessage = // Error Message (string)
},
OrderResult{
functionType = 15, // Function Type (int)
date = 2023/11/22, // Transaction Date (string)
seqNo = 00000322355, // Order Serial Number (string)
branchNo = 6460, // Branch Number (string)
account = 26, // Account (string)
orderNo = x0017, // Order Number (string)
assetType = 0, // Asset Type (int)
market = TAIEX, // Market Type (string)
marketType = Common, // Trading Session Type (MarketType)
stockNo = 1101, // Symbol (string)
buySell = Sell, // Buy/Sell Type (BsAction)
priceType = Limit, // Original Order Price Type (PriceType)
price = 41.2, // Price (double)
quantity = 5000, // 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)
...
}
]
}
Below example only extract data content
[ // Batch price modification( Using different individual orders )
OrderResult{
functionType = 15, // Function Type (int)
date = 2023/11/22, // Transaction Date (string)
seqNo = 00000322388, // Order Serial Number (string)
branchNo = 6460, // Branch Number (string)
account = 26, // Account (string)
orderNo = x0033, // Order Number (string)
assetType = 0, // Asset Type (int)
market = TAIEX, // Market Type (string)
marketType = Common, // Trading Session Type (MarketType)
stockNo = 1101, // Symbol (string)
buySell = Sell, // Buy/Sell Type (BsAction)
priceType = Limit, // Original Order Price Type (PriceType)
price = 41.2, // Price (double)
quantity = 5000, // 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 = Limit, // Valid Order Price Type (PriceType)
afterPrice = 41.1, // Valid Order Price (double)
unit = 1000, // Unit (int)
afterQty = 2000, // Valid Order Quantity (int)
filledQty = 0, // Filled Quantity (int)
filledMoney = 0, // Filled Value (int)
beforeQty = , // Before the Quantity Modification (int)
beforePrice = 41.3, // Before the Price Modification (double)
userDef = 12345678, // Custom Fields (string)
lastTime = 10:56:57.713, // Last Modification Time (string)
details = , // Order Process (list)
errorMessage = // Error Message (string)
},
OrderResult{
functionType = 15, // Function Type (int)
date = 2023/11/22, // Transaction Date (string)
seqNo = 00000322386, // Order Serial Number (string)
branchNo = 6460, // Branch Number (string)
account = "26", // Account (string)
orderNo = x0031, // Order Number (string)
assetType = 0, // Asset Type (int)
market = TAIEX, // Market Type (string)
marketType = Common, // Trading Session Type (MarketType)
stockNo = 1101, // Symbol (string)
buySell = Sell, // Buy/Sell Type (BsAction)
priceType = Limit, // Original Order Price Type (PriceType)
price = 41.2, // Price (double)
quantity = 5000, // 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)
...
}
]