Modify the price, quantity, order type, or trigger price of an existing open or trigger-pending order. The exchange, trading symbol, and transaction type of the original order cannot be changed.
jData=<JSON payload>&jKey=<AccessToken> — requires a valid AccessToken from Login.
Overview
Modify Order changes an order that is still resting on the exchange — Open or Trigger Pending state — without cancelling and re-placing it. Use it to reprice a stale limit order, resize a partially-adjusted position, or move a stop-loss trigger as the market moves. Always confirm current order state via Order Book before modifying — an order that has already completed, been cancelled, or been rejected cannot be modified.
Identity fields are fixedexch and tsym identify the original order and cannot be changed by a modify request. To trade a different symbol or exchange, cancel the order and place a new one.
MKT is still not supportedShoonya's Place Order only accepts LMT and SL-LMT, and that restriction carries through to Modify Order — you cannot convert an order to MKT via modification, even though some generic Noren API references elsewhere show a newprice_type='MKT' example.
Rate Limits
Shares the same 10 orders/second (OPS) per-client throttle as Place Order, enforced at the OMS layer per SEBI's algo-trading OPS threshold framework — modify and cancel calls count against the same bucket as new order placements.
Need more than 10 OPS?Submit your strategy to the exchange for approval and obtain an Algo ID. Once empanelled, higher OPS thresholds apply under the exchange's Algo ID framework.
Parameters
Field
Type
Required
Description
Allowed Values
uid
string
Required
User ID of the authenticated account.
Account-specific
norenordno
string
Required
Noren order number of the order to modify, as returned by Place Order or Order Book.
Existing open / trigger-pending order
exch
string
Required
Exchange segment of the original order. Cannot differ from the order being modified.
NSE, BSE, NFO, BFO, CDS, MCX
tsym
string
Required
Trading symbol of the original order. Cannot differ from the order being modified (use URL encoding for symbols like M&M).
Must match original order
qty
integer
Required
New order quantity. For derivatives, must be a multiple of the exchange lot size.
> 0, lot-size multiple for derivatives
prc
number
Required
New order price.
> 0, within exchange circuit band
prctyp
string
Required
New order type. MKT is not supported — see warning above.
LMT, SL-LMT
trgprc
number
Conditional
New trigger price. Mandatory when prctyp is SL-LMT, or when converting an existing order to/from SL-LMT.
> 0; omit when prctyp = LMT
ret
string
Required
Order validity.
DAY, IOC
dscqty
integer
Optional
Disclosed quantity visible to the market.
0 to qty
ordersource
string
Required
Order source identifier.
API
Request Examples
import requests
import json
payload = {
"uid": "AB1234",
"norenordno": orderNumber, # from PlaceOrder response"exch": "NSE",
"tsym": "RELIANCE-EQ",
"qty": "2",
"prc": "182.50",
"prctyp": "LMT", # LMT or SL-LMT only — MKT is rejected"ret": "DAY",
"ordersource": "API",
}
data = f"jData={json.dumps(payload)}&jKey={accessToken}"
response = requests.post(
"https://api.shoonya.com/NorenWClientAPI/ModifyOrder",
data=data,
)
result = response.json()
if result.get("stat") == "Ok":
print("Order modified:", result["result"]) # note: field is "result", not "norenordno"else:
print("Modification rejected:", result.get("emsg"))
const payload = {
uid: "AB1234",
norenordno: orderNumber, // from PlaceOrder response
exch: "NSE",
tsym: "RELIANCE-EQ",
qty: "2",
prc: "182.50",
prctyp: "LMT", // LMT or SL-LMT only — MKT is rejected
ret: "DAY",
ordersource: "API",
};
const data = `jData=${JSON.stringify(payload)}&jKey=${accessToken}`;
try {
const res = awaitfetch("https://api.shoonya.com/NorenWClientAPI/ModifyOrder", {
method: "POST",
headers: { "Content-Type": "application/x-www-form-urlencoded" },
body: data,
});
const result = await res.json();
if (result.stat === "Ok") {
console.log("Order modified:", result.result); // note: field is "result", not "norenordno"
} else {
console.error("Modification rejected:", result.emsg);
}
} catch (err) {
console.error("Network/timeout error modifying order:", err);
}
curl-X POST https://api.shoonya.com/NorenWClientAPI/ModifyOrder \
-H"Content-Type: application/x-www-form-urlencoded" \
--data-urlencode'jData={"uid":"AB1234","norenordno":"24121500001234","exch":"NSE","tsym":"RELIANCE-EQ","qty":"2","prc":"182.50","prctyp":"LMT","ret":"DAY","ordersource":"API"}' \
--data-urlencode"jKey=$ACCESS_TOKEN"
Field name differs from Place OrderOn success, the modified order number is returned in result, not norenordno — a common source of silent bugs when reusing Place Order's response-parsing code. As with Place Order, HTTP 200 is returned for both success and failure; always check stat.
Field
Description
stat
Ok or Not_Ok.
result
Noren order number of the modified order, present only on success.
request_time
Timestamp the response was generated, present only on success.
emsg
Rejection reason, present only on failure — see below.
Common Error Responses
Error
Reason
Fix
Order not found
norenordno doesn't exist, belongs to another user, or has already completed/been cancelled.
Re-check current state via Order Book before modifying.
Invalid Quantity
New qty is zero, negative, or not a lot-size multiple.
Round to nearest valid lot multiple.
Price Outside Circuit Limit
New prc outside the exchange circuit band.
Fetch current circuit band before repricing.
Symbol/Exchange Mismatch
exch or tsym doesn't match the original order.
These fields identify, not modify, the order — copy them unchanged from the original.
Order already partially/fully filled at the exchange before the modify reached it (a fill/modify race).
Inspect emsg; reconcile actual state via Order Book rather than assuming the modify applied.
Best Practices
Fetch the order's current state from Order Book immediately before modifying — a fill can race your modify request, and the OMS will reject a modify against an already-completed order.
Always send the full parameter set (qty, prc, prctyp, ret, etc.), not just the field you're changing — Modify Order replaces the order's terms rather than patching a single field.
Parse the success order number from result, not norenordno — reusing Place Order's response-parsing logic unmodified is a common bug.
Since MKT isn't supported here either, reprice LMT modifications with a small buffer beyond current LTP for reliable fills.
Respect the shared 10 OPS rate limit — modify and cancel calls draw from the same per-client bucket as Place Order.
Track the outcome via the Order Update Feed rather than assuming a stat: "Ok" response means the new terms are live at the exchange.
API Endpoint
POSThttps://api.shoonya.com/NorenWClientAPI/ModifyOrderapplication/x-www-form-urlencodedjData=<JSON payload>&jKey=<AccessToken>— requires a validAccessTokenfrom Login.Overview
Modify Order changes an order that is still resting on the exchange —
OpenorTrigger Pendingstate — without cancelling and re-placing it. Use it to reprice a stale limit order, resize a partially-adjusted position, or move a stop-loss trigger as the market moves. Always confirm current order state via Order Book before modifying — an order that has already completed, been cancelled, or been rejected cannot be modified.exchandtsymidentify the original order and cannot be changed by a modify request. To trade a different symbol or exchange, cancel the order and place a new one.LMTandSL-LMT, and that restriction carries through to Modify Order — you cannot convert an order toMKTvia modification, even though some generic Noren API references elsewhere show anewprice_type='MKT'example.Rate Limits
Shares the same 10 orders/second (OPS) per-client throttle as Place Order, enforced at the OMS layer per SEBI's algo-trading OPS threshold framework — modify and cancel calls count against the same bucket as new order placements.
Parameters
NSE,BSE,NFO,BFO,CDS,MCXM&M).MKTis not supported — see warning above.LMT,SL-LMTprctypisSL-LMT, or when converting an existing order to/fromSL-LMT.prctyp = LMTDAY,IOCqtyAPIRequest Examples
Response
result, notnorenordno— a common source of silent bugs when reusing Place Order's response-parsing code. As with Place Order,HTTP 200is returned for both success and failure; always checkstat.OkorNot_Ok.Common Error Responses
norenordnodoesn't exist, belongs to another user, or has already completed/been cancelled.qtyis zero, negative, or not a lot-size multiple.prcoutside the exchange circuit band.exchortsymdoesn't match the original order.jKey/AccessTokeninvalid or expired.emsg; reconcile actual state via Order Book rather than assuming the modify applied.Best Practices
qty,prc,prctyp,ret, etc.), not just the field you're changing — Modify Order replaces the order's terms rather than patching a single field.result, notnorenordno— reusing Place Order's response-parsing logic unmodified is a common bug.MKTisn't supported here either, repriceLMTmodifications with a small buffer beyond current LTP for reliable fills.stat: "Ok"response means the new terms are live at the exchange.