RuchiTanmay / nselib

nse data library
Apache License 2.0
50 stars 32 forks source link

option chain data for stocks #6

Open sachinbanugariya opened 1 year ago

sachinbanugariya commented 1 year ago

hello, i am trying to find the option chain data like nse for stocks, can you please let me know how can i get using nselib.

also seems like data print gives truncated columns, can you please make it like we see full columns while we print data.

thanks

amlanmishra13 commented 1 year ago

oi_data = derivatives.nse_live_option_chain(x,expiry_date=,oi_mode='full')

above is the syntax to fetch stock OI chain. x= symbol name, provide the expiry data and run the command. it will return a dataframe that is saved in oi_data.

sachinbanugariya commented 1 year ago

thanks for reply, yes it gives me oi data for options, but still it shows me ... in columns i.e only 6-7 columns from 24 columns

sachinbanugariya commented 1 year ago

its really help me if you tell me how can i see full columns and also then how can i filter only required columns, thanks

amlanmishra13 commented 1 year ago

python output truncates large dataframes by default, if you are using jupyter use "set_option" method to view all columns and rows , or you can export the output to a csv file

oi_data .to_csv('oi_data .csv')