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
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)

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
    },
    {
      "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"
    },
    {
      "id": 115,
      "createdOn": "2025-06-19 15:42:23",
      "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"
    }
  ]
}

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")

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

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)