Trigger already met when placing sample GTT_OCO

sensexboy
Hi Team,

I am using the below code for sending GTT_OCO trades


ORDER= [
{
"exchange":"NFO",
"tradingsymbol": "NIFTY22JUL16300CE",
"transaction_type": kite.TRANSACTION_TYPE_SELL,
"quantity": 1,
"order_type": "LIMIT",
"product": "NRML",
"price": 150
},
{
"exchange":"NFO",
"tradingsymbol": "NIFTY22JUL16300CE",
"transaction_type": kite.TRANSACTION_TYPE_SELL,
"quantity": 1,
"order_type": "LIMIT",
"product": "NRML",
"price": 200
}]
trigger_id = kite.place_gtt(trigger_type=kite.GTT_TYPE_OCO, tradingsymbol='NIFTY22JUL16200CE',
exchange='NFO', trigger_values=[150,200], last_price=180,orders=ORDER)


I get a message saying trigger already met.
Is this because I dont have any open positions for the same instrument which it identifies and says the message ?
  • SRIJAN
    SRIJAN edited July 2022
    Your orders are for 16300CE.
    But you are passing 16200CE as the tradingsymbol in the place_gtt function.

    :p :p
  • sensexboy
    OMG thats too much reliance on the support guys!! my apologies
  • sensexboy
    but still getting the same error even after correcting the trading symbol
  • SRIJAN
    SRIJAN edited July 2022
    First of all,we are not support guys.
    This is a community driven forum.


    We are all developers who work on our projects and take out some time to help out fellow developers on this forum .


    Second,I used your code,replaced 16200 with 16300 in the place_gtt function. And my order went through.

    You must have changed something else in your code.
  • sensexboy
    Thanks, i meant by support as "Members who are taking out time to support other developers" . I will try it again, though didnt change anything in my code but thanks for checking
Sign In or Register to comment.