Kite Connect API: SELL OCO GTT rejected with "Invalid trigger data" when using MARKET stop-loss

rajatShah56
Hello Zerodha Team,

We are creating GTTs through the Kite Connect API using Python (`pykiteconnect` 5.x).

Our BUY single-leg GTTs are being created successfully. However, all seven SELL two-leg (OCO) GTT requests were rejected with:

`InputException: Invalid trigger data`

This occurred on 18 November 2026 at approximately 16:55 IST.

Example request for DHANUKA (NSE):

**GTT type:** two-leg

**Trigger values:**
- Stop-loss trigger: 828.45
- Target trigger: 969.85

**Orders:**

1. SELL, quantity 9, CNC, MARKET, price 828.45 (stop-loss)
2. SELL, quantity 9, CNC, LIMIT, price 969.85 (target)

The exact `last_price` submitted was not captured in our logs.

At the time of creation, the shares were not yet in holdings because their BUY GTTs had not triggered.

Could you please clarify:

1. Does Kite Connect API support MARKET orders in two-leg OCO GTTs?
2. Does the API support `market_protection` for GTT orders? If yes, what is the correct request field and accepted value?
3. Must the shares already be present in holdings before creating a SELL OCO GTT?
4. What are the possible causes of `Invalid trigger data` in this situation?
5. Is there any minimum required distance between `last_price` and the two trigger values?

The Kite web interface appears to support Market with Market Price Protection for GTTs. We would like to understand whether the same functionality is available through the API.

Thank you.
Sign In or Register to comment.