Enable / Disable Price Alert
This API allows you to switch a price alert between enabled and disabled.
USE CASE
Pause an alert and switch it on again later without losing its condition or target price.
Details
- This API allows you to change the alert state between enabled and disabled.
- Only active alerts are allowed to change state; expired or triggered alert states cannot be changed.
- The request has only
alertIdandagent. There is no field to choose the state: the call changes the alert between enabled and disabled. - The success response has code
123and says whether the alert is now enabled or disabled, so read the message to confirm the new state. - You can also confirm it from
statusin Get Price Alerts:1is enabled,2is disabled and0is triggered. - Send
alertIdandagentas a JSON body with the PUT request. The endpoint is/api/v3/toggle-alert, not the price-alert endpoint. - Rate limits differ between the Standard and Prime plans. See Plans & rate limits.
Request Attributes
| Attribute | Data Type | Description |
|---|---|---|
alertId | string | Mandatory. Alert ID from creation |
agent | string | Client calling the API (e.g., "fyers-api") |
Response Attributes
| Attribute | Data Type | Description |
|---|---|---|
code | int | Response code returned by the API (e.g. 123 on success). |
message | string | Human-readable message confirming the alert was enabled or disabled. |
s | string | Status of the request, e.g. "ok" for success. |
Last updated on