Becomes difficult to segregate NFO-OPT from NFO-FUT in positions response unless we do string based filtering on 'tradingsymbol' like if it contains 'FUT' then segment is NFO-FUT, or if it contains 'PE' or 'CE', segment is NFO-OPT. This can be error prone.
kite.positions () API JSON response has only 'exchange' info. Any reason why 'segment' or 'instrument_type' are excluded in this API response? And similarly, kite.orders() also has 'segment' / 'instrument_type' missing in its response, only has 'exchange' which is common for both FUT / OPT
As these fields are not required while order placement on exchange. So, we don't show it in all order-related places.
Becomes difficult to segregate NFO-OPT from NFO-FUT in positions response unless we do string based filtering on 'tradingsymbol' like if it contains 'FUT' then segment is NFO-FUT, or if it contains 'PE' or 'CE', segment is NFO-OPT. This can be error prone.
@rakeshr - Can you please reply on this too? Do you have any suggestions/input on segregating FUT & OPT instruments apart from string based search.
{'placed_by': 'XI2093', 'order_id': '210621000898374', 'exchange_order_id': '1000000010640841', 'parent_order_id': None, 'status': 'COMPLETE', 'status_message': None, 'status_message_raw': None, 'order_timestamp': datetime.datetime(2021, 6, 21, 9, 35), 'exchange_update_timestamp': '2021-06-21 09:35:00', 'exchange_timestamp': datetime.datetime(2021, 6, 21, 9, 35), 'variety': 'regular', 'exchange': 'NFO', 'tradingsymbol': 'NIFTY21JUN15500PE', 'instrument_token': 11648258, 'order_type': 'MARKET', 'transaction_type': 'SELL', 'validity': 'DAY', 'product': 'MIS', 'quantity': 225, 'disclosed_quantity': 0, 'price': 0, 'trigger_price': 0, 'average_price': 85.73333333000001, 'filled_quantity': 225, 'pending_quantity': 0, 'cancelled_quantity': 0, 'market_protection': 0, 'meta': {}, 'tag': None, 'guid': '20673XCqdP9qwkhhEm'}
create map for your comfort using the instruments files, which you can download at 8:45am
Like below You can even update your JSON with segment and instrument_type now