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

(Same as OrderHistory)

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, ...}
}