Skip to content

Alerts

The Alerts API enables the creation, retrieval, and management of market alerts based on predefined conditions such as price movements, technical indicators, or fundamental changes. It helps users stay updated on significant events related to their tracked securities.

Type API Details
POST alert/create Create a new price alert
POST alerts/update Update an existing alert
Delete alert/delete/3 Delete an alert by its ID
POST alert/ATO Create a new Alert triggered order
GET alert/getalert/ Fetch the list of all created alerts
GET messages/exch/status Get current market status of all exchanges
GET messages/exch/message Get all exchange messages

Create Alert

This API is used to update an existing alert using its id. The updated Parameter can include the price value, exchange, condition type, or alert name.

Request Structure

 {
  "alertName": "XXXX",
  "alertType": "ltp",
  "exch": "MCX",
  "operator": "greater",
  "scripName": "IDEA",
  "token": "14366",
  "value": 5326.00
}

input Parameter

Field Type Description
alertName String User-defined name for the alert.
alertType String Type of alert, e.g., "ltp" for Last Traded Price.
exch String Exchange code where the scrip is listed, e.g., "MCX", "NSE", "BSE".
operator String Comparison operator, e.g., "greater", "less", "equal".
scripName String Name of the stock or instrument being tracked.
token String Unique identifier or token representing the scrip in the system.
value Float Threshold value for the alert to trigger (e.g., target price like 5326.00).

RespRonse Structure

 {
    "status": "Ok",
    "message": "Success",
    "result": null,
    "infoMessage": null
}

Response Parameter

Field Type Description
status String Status of the API Response (e.g., "Ok")
message String General message (e.g., "Success")
result Array List of messages related to deletion
infoMessage String Additional info (null if none)

Update Alert

This API is used to update an existing alert using its id. The updated Parameter can include the price value, exchange, condition type, or alert name.

Request Structure

 {
  "id": 33,
  "alertName": "XXXX",
  "alertType": "ltp",
  "exch": "MCX",
  "operator": "greater",
  "scripName": "IDEA",
  "token": "14366",
  "value": 5326.00
}

input Parameter

Field Type Description
id Integer Unique identifier for the alert.
alertName String User-defined name for the alert.
alertType String Type of alert, e.g., "ltp" for Last Traded Price.
exch String Exchange code where the scrip is listed, e.g., "MCX", "NSE", "BSE".
operator String Comparison operator, e.g., "greater", "less", "equal".
scripName String Name of the stock or instrument being tracked.
token String Unique identifier or token representing the scrip in the system.
value Float Threshold value for the alert to trigger (e.g., target price like 5326.00).

RespRonse Structure

 {
    "status": "Ok",
    "message": "Success",
    "result": null,
    "infoMessage": null
}

Response Parameter

Field Type Description
status String Status of the API Response (e.g., "Ok")
message String General message (e.g., "Success")
result Array List of messages related to deletion
infoMessage String Additional info (null if none)

Delete Alert

This API allows you to delete a specific alert that was previously created by the user.

Response Structure

{
  "id": 114
}

Response Parameter

Field Type Description
status String Status of the API Response (e.g., "Ok")
message String General message (e.g., "Success")
result Array List of messages related to deletion
infoMessage String Additional info (null if none)

Alert Trigerred Order

Creates an order that is automatically placed when a predefined alert condition is met. This ensures trades are executed instantly once the market price or indicator reaches the specified threshold

Request Structure

{
    "alertName": "XXXX",
    "alertType": "ltp",
    "exch": "MCX",
    "operator": "greater",
    "scripName": "IDEA",
    "token": "14366",
    "value": 5326.00
    "order": [
        {
            "exchange": "NSE",
            "qty": "1",
            "price": "7.45",
            "product": "MIS",
            "transType": "B",
            "priceType": "L",
            "triggerPrice": "0",
            "ret": "DAY",
            "disclosedQty": "0",
            "mktProtection": "",
            "target": "0",
            "stopLoss": "0",
            "orderType": "Regular",
            "token": "14366",
            "source": "WEB",
            "tradingSymbol": "IDEA_EQ"
        }
    ]
}

input Parameter

Field Type Description Required Status
alertName String User-defined name for the alert. Required
alertType String Type of alert, e.g., "ltp" for Last Traded Price. Required
exch String Exchange code where the scrip is listed, e.g., "MCX", "NSE", "BSE". Required
operator String Comparison operator, e.g., "greater", "less", "equal". Required
scripName String Name of the stock or instrument being tracked. Required
token String Unique identifier or token representing the scrip in the system. Required
value Float Threshold value for the alert to trigger (e.g., target price like 5326.00). Required
exchange String Exchange code (e.g., NCX, NSE, MCX) Required
qty String Quantity to trade Required
price String Price per unit (ignored if market order) Conditionally Required
(Required for L & SL, ignored for MKT)
product String Product type (MIS, CNC, NRML) Required
transType String Transaction type: B = Buy, S = Sell Required
priceType String Order type: L = Limit, MKT = Market, SL = Stop Loss, etc. Required
triggerPrice String Trigger price (for SL or SL-M orders) Conditionally Required
(Only for SL, SL-M)
ret String Order validity: DAY, IOC, etc. Required
disclosedQty String Quantity disclosed to market Optional
mktProtection String For protection in market orders Optional
target String Target price (used in bracket orders) Conditionally Required
stopLoss String Stop loss value (used in bracket orders) Conditionally Required
orderType String Order type: Regular, Cover, Bracket, etc. Required
token String Token ID for the instrument Required
source String Source of order (e.g., WEB, MOBILE) Required
tradingSymbol String Trading symbol of the instrument Required

RespRonse Structure

 {
    "status": "Ok",
    "message": "Success",
    "result": null,
    "infoMessage": null
}

Response Parameter

Field Type Description
status String Status of the API Response (e.g., "Ok")
message String General message (e.g., "Success")
result Array List of messages related to deletion
infoMessage String Additional info (null if none)

Fetch Alert

This API retrieves a list of all alerts set by the user, including details such as symbol, condition, value, and whether the alert has been triggered.

Response Structure

{
  "status": "Ok",
  "message": "Success",
  "result": [
    {
      "id": 33,
      "createdOn": "2025-05-20 15:39:53",
      "alertName": "ALERT dscsd 29",
      "scripName": "SBIN",
      "exch": "BSE",
      "token": "500112",
      "alertType": "ltp",
      "operator": "greater",
      "value": 5326.0,
      "triggerStatus": null,
      "expiry": null,
      "triggeredTime": null,
      "exchSeg": null,
      "type":"Regular" 
    },
    {
      "id": 114,
      "createdOn": "2025-06-19 15:28:44",
      "alertName": "ALERT dscsd 29",
      "scripName": "SBIN",
      "exch": "BSE",
      "token": "500112",
      "alertType": "ltp",
      "operator": "GREATER",
      "value": 790.0,
      "triggerStatus": null,
      "expiry": null,
      "triggeredTime": null,
      "exchSeg": "NSE"
      "type":"ATO" 
    }
  ]
}

Response Parameter

Field Type Description
id Integer Unique alert ID
createdOn String Timestamp of when the alert was created
alertName String Custom label for the alert
scripName String Name of the stock/script
exch String Exchange where the stock is listed
token String Unique token ID for the instrument
alertType String Type of alert (e.g., "ltp")
operator String Condition like "GREATER" or "LESS"
value Float Threshold value to trigger alert
triggerStatus String Status if alert was triggered (null if not)
expiry String Expiry date for options/futures (if applicable)
triggeredTime String Time when alert was triggered (if any)
exchSeg String Exchange segment (e.g., "NSE", "MCX")
type String Regular and ATO (For Alert Trigger Orders)

Fetch Exchange Status

This API fetches the current operational status of various exchanges (e.g., BSE, NSE, BFO). It includes details like whether the exchange is open, closed, or in a special session.

Response Structure

{
    "status": "Ok",
    "message": "Success",
    "result": [
        {
            "exchange": "BSE",
            "status": "PREOPEN_ST",
            "type": "NORMAL"
        },
        {
            "exchange": "BFO",
            "status": "OPEN",
            "type": "NORMAL"
        },
        {
            "exchange": "NSE",
            "status": "CLOSED",
            "type": "CALL_AUCTION2"
        },
        {
            "exchange": "NSE",
            "status": "OPEN",
            "type": "NORMAL"
        },
        {
            "exchange": "NSLB",
            "status": "OPEN",
            "type": "NORMAL"
        }
    ]
}

Response Parameter

Field Type Description
exchange String Name of the exchange (e.g., "NSE", "BSE", "BFO", "NSLB")
status String Current status of the exchange (OPEN, CLOSED, PREOPEN_ST, etc.)
type String Session type (e.g., "NORMAL", "CALL_AUCTION2")

Fetch Exchange Message

This API provides real-time updates or notifications related to the exchange, such as market session changes, IPO announcements, trading availability, and important regulatory alerts.

Response Structure

{
    "status": "Ok",
    "message": "Success",
    "result": [
        {
            "exchange": "NSE",
            "exchangemsg": "The Call Auction 2 Market has closed for 19 JUN 2025.",
            "exchangeTime": "19-06-2025 15:31:08"
        },
        {
            "exchange": "NSE",
            "exchangemsg": "Attn Members:  IPSMLES251 - ST (IPSMLES250 TEST LTD) will be available for trading today in Rolling settlement from 10:00 hrs with base price as Rs. 309.00 with 10% price band.",
            "exchangeTime": "19-06-2025 15:30:02"
        }
    ]
}

Response Parameter

Field Type Description
exchange String Name of the exchange generating the message (e.g., "NSE")
exchangemsg String Message or alert sent by the exchange
exchangeTime String Timestamp of the message in dd-MM-yyyy HH🇲🇲ss format