Hi - my program uses the instrument token as the KEY and entire program logic is dependent on matching the correct instrument token. However, for one particular (MIS, LIMIT, AMO) order that was pending, the instrument token retrieved came back as just the number '2'. I was using the instrument: 12181762/NIFTY18JAN10800CE. Please note, I was able to correctly place the AMO order. This happened on retrieving pending orders
I have two queries: - Is this erroneous behaviour for Kite.Orders() or is this the expected behaviour for AMO orders? - What is more reliable & consistent to be used as a logical KEY to track when trading multiple instruments - instrument_token or trading_symbol?
Yes, it is a bug from OMS end because of which instrument token is returning the wrong value. We are following up with them to get a fix. This is observed only in AMOs only.
You can use either tradingsymbol with exchange or instrument token as the logical key.
The instrument token can change. The instrument token can be assigned to some other contract once a contract expires. We use a combination of exchange and tradingsymbol like NSE:INFY.
Thanks Sujith. I understand instrument is re-cycled on contract expiry, my program logic takes care of that. But within an expiry cycle, will instrument token be a valid logical KEY. From your answer, it appears that this will hold true (except for AMO orders, which is being fixed).
You can use either tradingsymbol with exchange or instrument token as the logical key.
This is helpful.
We are following up with OMS team to get it fixed.