Zerodha self-trade prevention STPC wash trade cover order NSE order cancellation

Self-trade prevention and its effect on cover orders

From WebNotes, a public knowledge base. Last updated . Reading time ~11 min.

NSE’s self-trade prevention check (STPC) is an exchange-level control that cancels one of two orders entered under the same PAN when they would otherwise match against each other in the same scrip. Because a buy and a sell from the same beneficial owner crossing in the order book produce no change in ownership, the trade would be a self-trade, also called a wash trade. The exchange blocks it by cancelling either the incoming order or the resting one. A cover order (CO) is affected like any other order: if its entry leg or its mandatory stop-loss leg would match another of your own pending orders in that instrument, one of the two is cancelled, which can quietly remove the stop you were relying on.

The mechanism is run by the National Stock Exchange across the cash, futures and options, and currency derivatives segments. It was introduced in 2015 and strengthened to a PAN and CP-code basis with effect from 8 April 2019, so it now catches self-trades even when the two orders are routed through different members. This article sets out what the check does, exactly which order it cancels, why a cover order can be hit, and how to recover a position whose stop-loss leg was removed.

Conflict-of-interest disclosure. This guide is published by the WebNotes Editorial Team for informational purposes and is written independently. WebNotes operates a Zerodha account-opening referral programme, disclosed on pages that carry a referral link; this guide does not carry it and earns no referral commission on the exchange mechanism described here.

What a self-trade is and why it is prevented

A self-trade occurs when the same beneficial owner is on both sides of an executed trade. You hold a resting sell order at Rs 500, then place a buy that lifts your own offer; the exchange would record a trade, yet your net holding is unchanged. The transaction is economically empty but it adds to reported volume and last-traded price, which can mislead other participants on genuine activity in the scrip. SEBI’s framework against fraudulent and unfair trade practices treats deliberate self-trading used to create misleading volume as a manipulative device. To stop both the accidental and the intentional case at source, NSE cancels the matching order before it executes rather than booking the trade and policing it afterwards.

The check applies to all Day and IOC order types: limit, market, stop-loss limit, and stop-loss market. It is not specific to any product; the same control governs CNC delivery orders, MIS intraday orders, and cover orders alike.

How the cancellation decision is made

When an incoming order (the active order) is about to match a resting unmatched order (the passive order) from the same client, the exchange cancels one of the two. Which one depends on the option carried on the active order.

ElementBehaviour
TriggerActive order would match own passive order in the same scrip under the same PAN or CP code
Default option (NSE front-end)Cancel the passive order
Available optionsCancel passive order, or cancel active order, set per order
Partial matchOnly the overlapping quantity is cancelled, fully or partially, per the active order’s option
Auction sessionsIn pre-open, special pre-open and call-auction, the active order is cancelled by default, irrespective of the option
Rejection reportedThe cancelled order reports that it could have resulted in a self-trade

The decision rule is that the condition set on the active order governs the outcome. If the active order says cancel passive, the resting order is pulled; if it says cancel active, the incoming order is dropped. Members trading through an API or algorithm set the STP bit in the order structure to control this; on the exchange front-end it is a radio button defaulting to “cancel passive order”. For retail traders on Kite , the broker sets the behaviour; the trader sees only the cancellation and its reason.

PAN and CP-code matching across members

The 2019 enhancement moved detection from a per-terminal basis to a PAN and CP-code basis. Two orders carrying the same PAN match the check even if they were entered through different members or different terminals. For clients exempt from PAN, the member sends a “PAN_EXEMPT” flag, and the check still applies between two such clients whose orders are likely to match in the same book. The practical effect for an individual trader is that you cannot escape the check by splitting orders across logins or platforms; the exchange keys on the beneficial owner, not the entry point.

How self-trade prevention affects a cover order

A cover order is two orders placed together: an entry leg and a compulsory SL-M (stop-loss market) leg that rests in the exchange’s contingent pool. Both legs are ordinary exchange orders for the purposes of STPC, so either can be cancelled if it would cross another of your own orders in the same instrument.

The realistic ways a cover order meets the check:

  • You hold a resting sell order in a scrip, then place a buy cover order whose entry leg lifts your own offer. The exchange cancels one of the two to avoid the self-trade.
  • You run a long position with a separate sell limit acting as a target, then the cover order’s stop-loss sell leg triggers at a price that would match your own resting buy elsewhere in the book.
  • You place a fresh cover order in the same scrip and direction while an earlier cover order’s stop leg sits in the contingent pool at an overlapping price.

The consequence that catches traders out is the second-order effect on protection. A cover order’s value is that the stop-loss is guaranteed to rest alongside the entry. If self-trade prevention cancels that stop-loss leg, the entry can remain filled while the stop is gone, leaving a leveraged position without the cap on loss that the product is designed to provide. The cancellation reason will say the order could have resulted in a self-trade, but it does not re-create the missing leg.

What to do when a cover-order leg is cancelled

Treat a self-trade cancellation on a cover order as an open, unprotected position until you confirm otherwise. Check the order book and positions panel: if the entry leg is filled and the stop leg is absent, the position is exposed. Because a cover order’s stop cannot be re-attached after the fact, the cleanest recovery is to exit the position through the CO exit control and re-enter cleanly, or place a fresh independent stop using a standard SL or SL-M order under the NRML or MIS product, ensuring its price does not cross any other order of yours in that scrip. Cancel the conflicting resting order first so the new stop is not itself cancelled by the same check.

Avoiding accidental self-trades

Most retail self-trade cancellations are accidental, caused by holding two orders in the same scrip on opposite sides at overlapping prices. A few habits remove the friction:

  • Before placing a cover order, clear any resting limit order of your own in the same scrip that sits on the opposite side near the market, since that is what the new leg will match.
  • Do not run a manual target sell and a cover order on the same long position; the cover order already carries its stop, and a stray target can collide with it. If you want a target as well, use a GTT one-cancels-other (OCO) on a delivery or carryforward position instead.
  • When modifying a stop, cancel the old leg fully before placing the new one rather than stacking two stops that can cross.
  • Remember that the check spans your whole PAN, so orders placed on Kite web and the Kite app are matched together, not treated as separate.

Relationship to algorithmic trading

For members deploying algorithms, NSE’s consolidated algo framework requires order-level risk checks including trade-price protection, and bars the release of orders that breach bad-order checks. Self-trade prevention sits in this family of pre-trade controls. NSE’s retail algo circular of 2025 requires registration of any algorithm placing orders above the threshold of 10 orders per second, with an exchange-assigned algorithm ID and re-approval on logic changes. A retail trader on Kite is well below these thresholds, but the same self-trade control that governs registered algos governs manual orders; the difference is only in how the STP option is configured, not in whether the check applies.

See also

External references

References

  1. NSE, FAQs on PAN-based Self Trade Prevention Check (STPC) Mechanisms (as on 21 June 2026).
  2. NSE circulars 04/2019 and 17/2019, PAN-based STPC, effective 8 April 2019.
  3. NSE originating self-trade prevention circular, capital markets segment, effective 12 October 2015.
  4. Zerodha support, What is NSE’s self-trade prevention mechanism? (as on 21 June 2026).
  5. SEBI (Prohibition of Fraudulent and Unfair Trade Practices Relating to Securities Market) Regulations, 2003.

Frequently asked questions

What is NSE's self-trade prevention check?
It is an exchange mechanism, live since 2015 and PAN-based since 8 April 2019, that stops a single client’s two orders in the same scrip from matching against each other. When an incoming (active) order would match a resting (passive) order under the same PAN, the exchange cancels one of them rather than book a self-trade.
Why did my cover order get cancelled to avoid a self-trade?
Your cover order’s entry or stop-loss leg would have matched another of your own pending orders in the same instrument under your PAN. The exchange cancels one of the two to prevent a wash trade, so a leg of your cover order is removed.
Which order does the exchange cancel, the active or the passive one?
It follows the option set on the active (incoming) order: either the active or the passive order is cancelled, fully or partially. In pre-open, special pre-open and call-auction sessions, the active order is cancelled by default regardless of the option.
Can a self-trade cancellation leave my position unprotected?
Yes. If the cancelled leg is the stop-loss side of a cover order or a separate stop you were relying on, the position can be left without its intended stop. Re-place the cancelled leg and confirm it rests in the order book.
Does this happen across two different Zerodha logins or family accounts?
It triggers on the same PAN or CP code. Two orders under the same PAN match the check even across different members. Distinct PANs in a family do not trigger it, since they are different beneficial owners.
Is a self-trade illegal?
A self-trade creates no change in beneficial ownership and can mislead the market on volume, which is why exchanges prevent it. The STPC is a preventive control, not a penalty; the order is simply cancelled before it matches.

Reviewed and published by

The WebNotes Editorial Team covers Indian capital markets, payments infrastructure and retail investor procedures. Every article is fact-checked against primary sources, principally SEBI circulars and master directions, NPCI specifications and the official support documentation published by the intermediary in question. Drafts go through a second-pair-of-eyes review and a separate compliance read before publication, and revisions are tracked against the SEBI and NPCI rule changes referenced in the methodology section.

Last reviewed
Conflicts of interest
WebNotes is independent. No relationship with any broker, registrar or bank named in this article.