Kotak-Neo / kotak-neo-api

120 stars 112 forks source link

How to search for weekly options? Unable to search for 13th Jun NIFTY options strike 23000 #177

Open mavink opened 5 months ago

mavink commented 5 months ago

Always getting this error:

{'message': 'No data found with the given search information.Please try with '
            'other combinations.'}

Can you share an example code? I have tried client.search_scrip with many combinations of date formats but always getting the above error

nprejit commented 5 months ago

send me your request code

shusinghal commented 4 months ago

client_subs = client.search_scrip(exchange_segment="nse_cm", symbol="BANKNIFTY", expiry="03JUL2024", option_type="CE", strike_price="52700")

I get 'Exchange segment is not available' error. I tried nse_fo too.

sudhanshupati commented 4 months ago

There is a issue in Kotak expiry calculation , you will not get the result with the correct expiry. add +1 to the date. find sample which will give result of 3rd July expiry.

searchScrip("nse_fo","BANKNIFTY","04JUL2024","CE","50000")