The expiry format provided for search_scrip needs to be in YYYYMMDD and not YYYYMM.
Steps to reproduce
>>> client.search_scrip(exchange_segment = "nse_fo", symbol = "NIFTY", expiry = "202312", option_type = "CE", strike_price = "20100")
{'Error': DateParseError('month must be in 1..12: 202312, at position 0'), 'message': 'Exchange Segment is not available'}
>>>
Summary
The expiry format provided for search_scrip needs to be in
YYYYMMDD
and notYYYYMM
.Steps to reproduce
Correct format
https://github.com/Kotak-Neo/kotak-neo-api/blob/5360eb7019b5a90aee53fd8c09d93e6130e79efb/neo_api_client/neo_api.py#L517