Skip to Content
API ReferencePrice AlertsEnable / Disable Price Alert

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 alertId and agent. There is no field to choose the state: the call changes the alert between enabled and disabled.
  • The success response has code 123 and says whether the alert is now enabled or disabled, so read the message to confirm the new state.
  • You can also confirm it from status in Get Price Alerts: 1 is enabled, 2 is disabled and 0 is triggered.
  • Send alertId and agent as 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

AttributeData TypeDescription
alertIdstringMandatory. Alert ID from creation
agentstringClient calling the API (e.g., "fyers-api")

Response Attributes

AttributeData TypeDescription
codeintResponse code returned by the API (e.g. 123 on success).
messagestringHuman-readable message confirming the alert was enabled or disabled.
sstringStatus of the request, e.g. "ok" for success.
Last updated on