Skip to main content

Batch Modify Price

BatchModifyPrice

First, using 'MakeModifyPriceObj' create a 'ModifyPriceObj' object​

ParameterTypeMeaning
orderResultOrderResultThe intended order result object to be modified
pricestringThe price after modification
priceTypePriceTypeThe price type after modification (Note.: The Co-lo version has enabled the use of PriceType.)
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​

ParameterTypeMeaning
accountAccountAccount
ModifyPriceObjModifyPriceObj (list of object)The object list for price modification

Result Response​

參數類別說明
isSuccessboolInterface result
dataListModified content list is returned
messagestringisSuccess = False error description is returned

OrderResult Parameter​

Return type : Object

ParameterTypeMeaning
functionTypeintFunction Type : 0 New Order 、 10 New Order Executed 、 15 Change Price 、 20 Change Quantity 、 30 Cancel 、 90 Failed
datestringTransaction Date
seqNostringOrder Serial Number
branchNostringBranch Number
accountstringAccount
orderNostringOrder Number
assetTypeintAsset Type : 0 Stock
marketstringMarket Type : TAIEX Listed 、 TAISDAQ OTC 、 TAIEMG Emg
marketTypeMarketTypeTrading Session Type : Common 、 Fixing 、 IntradayOdd 、 Odd 、 Emg 、 EmgOdd
stockNostringSymbol
buySellBsActionBuy/Sell Type : Buy 、 Sell
priceTypePriceTypeOriginal OPrder Price Type : Limit 、 LimitUp 、 LimitDown 、 Market 、 Reference
pricedoubleOrder Price
quantityintOriginal Order Quantity
timeInForceTimeInForceTime In Force : Rod 、 Fok 、 Ioc
orderTypeOrderTypeOrder Type : Stock 、 Margin 、 Short Short sale 、 DayTrade 、 SBL
isPreOrderboolReservation Order Flag
statusintOrder Status, for details please refer to STATUS
afterPriceTypePriceTypeValid Order Price Type : Limit 、 LimitUp 、 LimitDown 、 Market 、 Reference
afterPricedoubleValid Order Price
unitintTrading Unit
afterQtyintValid Order Quantity (filled quantity included)
filledQtyintFilled Quantity
filledMoneyintFilled Value
beforeQtyintBefore the Quantity Modification
beforePricedoubleBefore the Price Modification
userDefstringCustom Fields
lastTimestringLast Modification Time
detailslistOrder Process (Return value when query OrderResultDetail or OrderHistory )
errorMessagestringError 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)
...
}
]