We placed SL orders for some FINNIFTY and NIFTY instruments and Zerodha Kite accepted those orders. But at the time of SL execution, the order was cancelled with below error:
"The order was cancelled by the exchange because the price is outside the current allowed limit price protection range. [Read more.](https://zrd.sh/lpp-range-rejection)"
If the price was outside the current allowed limit, Zerodha Kite shouldn't have accepted the orders in the first place.
We had placed similar order for some other instrument and that order got executed. Orders with similar logic are getting executed perfectly fine for BANKNIFTY. So we're not able to understand the logic behind the execution. Also, this issue was there only for FINNIFTY few weeks back. But from last 2-3 weeks, it’s happening in NIFTY as well. Now it’s occurring almost everyday.
In the reference document provided by Zerodha, it is mentioned that if the trading price is higher than 50 then the SL order range should be +/- 40% and if the trading price is less than 50 then the SL order range should be +/- 20. The +/- 40% should be calculated based on the trading price available at the time of placing SL order or it should be checked continuously and should be updated accordingly. We’re not able to figure this out.
We've also attached some screenshots for your reference. Wherein, some orders are rejected and some orders are accepted. Request you to please check the issue and let us know what is wrong here and how it should be corrected.
This validation occurs during order matching. If the order is within the range at that time, it will execute; otherwise, it will be cancelled. Since this validation occurs during matching, it is not feasible to block it at the time of order placement. Here are a few points from the circular.
1. During trading hours it shall be the simple average of trade prices of that contract in the last 30 seconds. For contracts that have traded in last 30 seconds, the reference price shall be revised throughout the day at 30 seconds interval.
2. LPP limit shall be flexed automatically when a minimum of 10 orders are rejected on account of LPP validation, between two LPP revision events; AND when such orders involves minimum 5 unique UCCs. LPP range shall be flexed in the corresponding direction in which the criteria are met.
If the order is rejected with this message, the trader can validate the current trading range and place the order again.
Arockiya_r ji, kindly help me to understand statement. "This validation occurs during order matching. If the order is within the range at that time" does it means when simple average of 30second price reaches near limit price (of our order) then exchange will check lpp from this average price (not limit price of our order). in this case if sudden jump of avarage price happend (out side of 40% or 20Rs range) then only exchange will cancel the limit order. it means limit order or SL order needs to keep checking if rejected state has come up. kindly correct or guide.
1. During trading hours it shall be the simple average of trade prices of that contract in the last
30 seconds. For contracts that have traded in last 30 seconds, the reference price shall be
revised throughout the day at 30 seconds interval.
2. LPP limit shall be flexed automatically when a minimum of 10 orders are rejected on account of LPP
validation, between two LPP revision events; AND when such orders involves minimum 5 unique UCCs.
LPP range shall be flexed in the corresponding direction in which the criteria are met.
If the order is rejected with this message, the trader can validate the current trading range and place the order again.
You can refer the circular here.
This is not related to API. For order validation-related queries, you may create a ticket in the support portal.
I've one question though. You've mentioned in the first point that:
"1. During trading hours it shall be the simple average of trade prices of that contract in the last 30 seconds."
So how do we get the average? Is there any API available for this?
"This validation occurs during order matching. If the order is within the range at that time"
does it means when simple average of 30second price reaches near limit price (of our order) then exchange will check lpp from this average price (not limit price of our order).
in this case if sudden jump of avarage price happend (out side of 40% or 20Rs range) then only exchange will cancel the limit order.
it means limit order or SL order needs to keep checking if rejected state has come up.
kindly correct or guide.