Skip to main content

Modify Order Quantity

ModifyQuantity

First, using 'MakeModifyQuantityObj' create a 'ModifyQuantityObj' object​

ParameterTypeMeaning
orderResultOrderResultThe intended order result object to be modified
quantityintThe quantity after modification ( The modified quantity includes the partially filled portion of this order )

Put the returned object into the 'ModifyQuantity' function

Request Parameter​

ParameterTypeMeaning
accountAccountAccount
ModifyQuantutyObjModifyQuantutyObjThe object for Quantity modification
unblockbool (optional) (default = false)unblock

Result Reponse​

ParameterTypeMeaning
isSuccessboolInterface result
dataOrderResultModified content 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​

var modify_qty_obj = sdk.Stock.MakeModifyQuantityObj(order_result, 1000);
var modify_qty = sdk.Stock.ModifyQuantity(account, modify_qty_obj);
Console.WriteLine(modify_qty);

Response Example​

{
isSuccess = True,
message = ,
data = OrderResult{
functionType = 20, // Function Type (int)
date = 2024/03/08, // Transaction Date (string)
seqNo = 00000308866, // Order Serial Number (string)
branchNo = 6460, // Branch Number (string)
account = 26, // Account (string)
orderNo = x0011, // 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 (string)
priceType = Limit, // Original Order Price Type (string)
price = 41.2, // Order 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.3, // 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 = 3000, // Before the Quantity Modification (int)
beforePrice = 41.2, // Before the Price Modification (double)
userDef = 12345678, // Custom Fields (string)
lastTime = 12:56:28.966, // Last Modification Time (string)
details = , // Order Process (list)
errorMessage = // Error Message (string)
}
}