Skip to main content

Modify Order Price

modify_price

First use make_modify_price_obj to create ModifyPriceObj

ParameterTypeDescription
orderResult[OrderResult(/docs/trading/library/cpp/EnumMatrix/#orderresult)]Target order to modify
pricestringNew price
priceTypePriceTypeNew price type
caution

If price is provided, priceType must be std::nullopt; if priceType is provided, price must be std::nullopt.

Input Parameters

ParameterTypeDescription
accountAccountAccount
modifiedPriceObjModifyPriceObjObject for price modification
unblockbool (optional)Non-blocking (default = false)

Result Response

ParameterTypeDescription
is_successboolWhether successful
dataOrderResultReturned modified order info
messagestringError message when is_success = False

OrderResult Fields

Return type: Object

ParameterTypeDescription
function_typeintFunction type: 0 New, 10 Execute new, 15 Modify price, 20 Modify quantity, 30 Cancel, 90 Failed
datestringTrade date
seq_nostringOrder sequence number
branch_nostringBranch code
accountstringAccount
order_nostringOrder number
asset_typeintAsset type: 0 Securities
marketstringMarket: TAIEX listed, TAISDAQ OTC, TAIEMG emerging
market_typeMarketTypeMarket type: COMMON, FIXING, INTRADAY_ODD, ODD, EMG, EMG_ODD
stock_nostringStock code
buy_sellBSActionBuy/sell: BUY, SELL
pric_typePriceTypeEffective price type: LIMIT, LIMIT_UP, LIMIT_DOWN, MARKET, REFERENCE
pricedoublePrice
quantityintOriginal order quantity
time_in_forceTimeInForceTime in force: ROD, FOK, IOC
order_typeOrderTypeOrder type: STOCK, MARGIN, SHORT, DAY_TRADE, SBL
is_pre_orderboolWhether this is a pre-order
statusintOrder status
after_price_typePriceTypeEffective price type
after_pricedoubleEffective price
unitintUnit count
after_qtyintEffective quantity, including filled quantity
filled_qtyintFilled quantity
filled_moneyintFilled amount
before_qtyintEffective quantity before modification
before_pricedoubleEffective price before modification
user_defstringCustom field
last_timestringLast update time
detailslistOrder history; available when querying order_result_detail or order_history
error_messagestringError message

Request Example

auto modify_price_obj = sdk->stock->make_modify_price_obj(target_order, "41.1", std::nullopt);
auto modify_price_response = sdk->stock->modify_price(target_account, modify_price_obj, std::nullopt);

Response Example

{
isSuccess = True,
message = ,
data = OrderResult{functionType = 15, afterPrice = 41.1, ...}
}