Modify Order Price

Change the price of an order you already placed, from any client language.

POST https://apix.stocksdeveloper.in/trading/modifyOrderPrice
WriteReturns true on success3 languagesBroker independent
In short

The Modify Order Price call changes the price of an order you already placed. You pass the account, the order id returned by placeOrder, and the new price. It works the same way across the AmiBroker, Excel and MetaTrader APIs and returns true on successful submission.

This call modifies the price of an open order. It is available in AmiBroker, Excel, and MetaTrader. To change more than just the price, see Modify Order.

Code samples

Samples

Excel

Signature

Public Function ModifyOrderPrice(PseudoAccount As String, _
    OrderId As String, _
    Price As Double) As Boolean

Example

orderId = PlaceOrder("ACC_NAME", 
    "<exchange>", "SBIN", "BUY", 
    "LIMIT", "INTRADAY", 10, 
    100.5, 0, True)
  
' Somewhere later in your code, 
' when you want to modify this order
  
' Modify the order
Call ModifyOrderPrice("ACC_NAME", orderId, 101.6)

AmiBroker

Signature

function modifyOrderPrice(account, orderId, price)

Example

orderId = placeOrder(AT_ACCOUNT, 
    AT_EXCHANGE, AT_SYMBOL, "BUY", 
    "LIMIT", AT_PRODUCT_TYPE, 10, 
    100.5, defaultTriggerPrice(), True);
  
// You can save this orderId in a static variable
saveStaticVariableText(AT_ACCOUNT, "ORDER_ID", orderId);
  
// Somewhere later in your code, 
// when you want to modify this order
  
// Read orderId from static variable
orderId = readStaticVariableText(AT_ACCOUNT, "ORDER_ID");
  
// Modify the order
modifyOrderPrice(AT_ACCOUNT, orderId, 101.6);

MetaTrader

Signature

bool modifyOrderPrice(string account, 
	string orderId, double price)

Example

string orderId = placeOrder(AT_ACCOUNT, 
    AT_EXCHANGE, AT_SYMBOL, BUY, 
    LIMIT, INTRADAY, 10, 
    100.5, defaultTriggerPrice(), true);
   
// You can save this orderId in a static variable
   
// Somewhere later in your code, 
// when you want to modify this order
   
// Modify the order
modifyOrderPrice(AT_ACCOUNT, orderId, 101.6);

In each example above, the price is changed from 100.5 to 101.6.

Parameters

ParameterDescription
accountnickname of the broker account (also known as pseudo account)
orderIdpublisherId — the orderId returned by the placeOrder*() function
priceorder price (pass zero if you don’t want to change it)

Return value

DirectJava · C# · Python · HTTP

The call returns the order id given by your trading platform.

BridgeExcel · AmiBroker · MetaTrader

The call returns the library order id. The Desktop Client passes the request on to your broker.

Notes

This call sends the modify order price request to the AutoTrader Desktop Client. It returns true on successful submission, otherwise false.

See also Modify Order Quantity, Modify Order, and Cancel Order.

Was this page helpful?

Last updated 21 June 2026