Skip to Main Content
POST/NorenWClientAPI/ModifyAlert

Modify Alert

Update the trigger value, validity, or remarks on an existing alert. The alert type itself cannot be changed.

API Endpoint

MethodPOST
URLhttps://api.shoonya.com/NorenWClientAPI/ModifyAlert
Content-Typeapplication/x-www-form-urlencoded
PayloadjData=<JSON payload>&jKey=<AccessToken>

Parameters

FieldTypeRequiredDescriptionAllowed Values
uidstringRequiredUser ID of the logged-in user.Account-specific
al_idstringRequiredAlert ID of the alert to modify.From Set Alert
tsymstringRequiredTrading symbol.Must exist in Symbol Master
exchstringRequiredExchange segment.See Exchange Segment Codes
ai_tstringRequiredOriginal alert type. Immutable — must match the value the alert was created with.Cannot be changed
validitystringRequiredValidity of the alert.DAY, GTT
dstringOptionalNew value to compare against LTP.Numeric string
remarksstringRequiredFree-text message.Free text
Alert type is fixedai_t must be resent unchanged with every modify call — there is no way to convert an LTP alert into an ATP alert in place. Cancel and re-create instead.

Request Examples

import requests, json
 
payload = {
    "uid": "AB1234",
    "al_id": "210408000000004",
    "tsym": "RELIANCE-EQ",
    "exch": "NSE",
    "ai_t": "LTP",       # must match the original alert's type
    "validity": "DAY",
    "d": "2550",
    "remarks": "breakout-watch-revised",
}
data = f"jData={json.dumps(payload)}&jKey={accessToken}"
 
response = requests.post(
    "https://api.shoonya.com/NorenWClientAPI/ModifyAlert",
    data=data,
)
print(response.json())
const payload = {
  uid: "AB1234",
  al_id: "210408000000004",
  tsym: "RELIANCE-EQ",
  exch: "NSE",
  ai_t: "LTP",
  validity: "DAY",
  d: "2550",
  remarks: "breakout-watch-revised",
};
const data = `jData=${JSON.stringify(payload)}&jKey=${accessToken}`;
 
const res = await fetch("https://api.shoonya.com/NorenWClientAPI/ModifyAlert", {
  method: "POST",
  headers: { "Content-Type": "application/x-www-form-urlencoded" },
  body: data,
});
console.log(await res.json());
curl -X POST https://api.shoonya.com/NorenWClientAPI/ModifyAlert \
  -H "Content-Type: application/x-www-form-urlencoded" \
  --data-urlencode 'jData={"uid":"AB1234","al_id":"210408000000004","tsym":"RELIANCE-EQ","exch":"NSE","ai_t":"LTP","validity":"DAY","d":"2550","remarks":"breakout-watch-revised"}' \
  --data-urlencode "jKey=$ACCESS_TOKEN"

Response

json
// Success
{
  "request_time": "16:36:42 08-04-2021",
  "stat": "Oi Replaced",
  "al_id": "210408000000013"
}
 
// Failure
{
  "stat": "Not_Ok",
  "emsg": "Session Expired : Invalid Session Key"
}
FieldDescription
statSuccess/failure indication (status string on success).
al_idThe modified Alert ID, echoed back on success.
emsgPresent only on failure.

Best Practices

  • Always resend the full set of required fields (tsym, exch, ai_t, validity, remarks), not just the field you're changing — this looks like a full replace of the alert, not a partial patch.
  • Fetch the alert's current values before modifying if you don't have them cached locally, so you don't accidentally overwrite remarks or validity with stale data.
  • To change the alert type itself, cancel and re-create via Set Alert instead of trying to force it through here.