Create an alert (dry run by default)
create_alertCreate price alerts to monitor instrument prices and trigger notifications or automatic basket orders when conditions are met.
Instructions
Create a price alert. DRY RUN BY DEFAULT: with dry_run=true (the default) nothing is sent; the answer shows the exact request, every safety check and, when live trading is enabled and the checks pass, a confirmation_token. To create it, repeat the identical call with dry_run=false and that token. Kite allows at most 500 active alerts per user.
The alert watches lhs_attribute (LastTradedPrice) of lhs_exchange:lhs_tradingsymbol and triggers when "value operator right-hand side" becomes true (operators: <=, >=, <, >, ==). The right-hand side is a constant (rhs_type=constant with rhs_constant, in INR for prices) or another instrument's attribute (rhs_type=instrument with rhs_exchange and rhs_tradingsymbol). Indices live on the exchange INDICES (INDICES:NIFTY 50).
type=simple only notifies. type=ato (alert triggers order) also places the basket orders by itself when the
condition becomes true, with no confirmation at that moment: the confirmation you give now covers them. Each
basket order is checked like place_order (per-order cap, allow-lists, tick and lot size) and counts toward the
daily order count and value caps; MARKET orders are valued at the live price plus a buffer (paid market data
needed), MCX/CDS/BCD orders cannot be valued and so cannot be sent live. A simple alert has no orders and no
caps. Returns the created alert (with its uuid) when sent.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"name": "<name>",
"type": "<type>",
"lhs_exchange": "<lhs_exchange>",
"lhs_tradingsymbol": "<lhs_tradingsymbol>",
"operator": "<operator>",
"rhs_type": "<rhs_type>"
},
"name": "create_alert"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | a label for the alert | |
| type | Yes | simple: only notify. ato: also place the basket `orders` by itself when the condition is true | |
| orders | No | the basket of orders: required for type=ato (up to 20), not allowed for simple | |
| dry_run | No | true (default): validate and preview only, nothing is sent. false: send it live, which needs live trading enabled on the server and the confirmation_token from a dry run | |
| operator | Yes | comparison of the monitored value with the right-hand side | |
| rhs_type | Yes | constant: compare with rhs_constant. instrument: compare with another instrument (rhs_*) | |
| lhs_exchange | Yes | exchange of the monitored instrument: NSE, BSE, NFO, CDS, BCD, MCX, or INDICES for indices | |
| rhs_constant | No | the number to compare with (INR for prices); only for rhs_type=constant | |
| rhs_exchange | No | only for rhs_type=instrument | |
| lhs_attribute | No | what to monitor; LastTradedPrice is the only attribute Kite documents | LastTradedPrice |
| rhs_attribute | No | only for rhs_type=instrument; defaults to LastTradedPrice | |
| lhs_tradingsymbol | Yes | tradingsymbol of the monitored instrument: INFY, 'NIFTY 50' | |
| rhs_tradingsymbol | No | only for rhs_type=instrument | |
| confirmation_token | No | the confirmation_token returned by a dry run of this exact call (single use) |