I want historical option data for NSE/BSE related Index options

Hi I have been able to navigate a bit using a lot of your articles but reconstructing the expired rics is tricky without examples

Below was my attempt which was sucessful for recent expiry dates but not historical.

index_ric = '.NSEI'

options_contracts = rd.discovery.search(view = rd.discovery.Views.EQUITY_QUOTES,top = 10000,filter = f"( SearchAllCategoryv2 eq 'Options' and ((UnderlyingQuoteRIC eq '{index_ric}') and (StrikePrice ge 2 and StrikePrice le 85000)))",select = "DTSubjectName,AssetState,BusinessEntity,PI,SearchAllCategoryv3,SearchAllCategoryv2,SearchAllCategory,ExchangeName,CallPutOption,StrikePrice,ExpiryDate,RIC,UnderlyingQuoteRIC,UnderlyingIssuerName,UnderlyingRCSAssetCategoryLeaf")options_contracts

RIC = options_contracts.loc[0,'RIC']start =(pd.to_datetime(options_contracts.loc[0,'ExpiryDate']) - pd.DateOffset(months =3)).strftime(format='%Y-%m-%d')end = options_contracts.loc[0,'ExpiryDate'].strftime(format='%Y-%d-%m')print(start,end)vals = rdp.get_historical_price_summaries(RIC, start = start, end = end, interval = rdp.Intervals.DAILY)# fields = ['BID','ASK','TRDPRC_1', 'IMP_VOLT', 'OPINT_1','OPEN_PRC',])vals

Answers

  • Jirapongse
    Jirapongse ✭✭✭✭✭
  • As i mentioned , there isnt a methodology for expired RIC for NSE , I have already gone through it and failed to retrieve it .

  • Jirapongse
    Jirapongse ✭✭✭✭✭

    @SahilSPrabhu

    Thank you for reaching out to us.

    This forum is dedicated to software developers using LSEG APIs. The moderators on this forum do not have deep expertise in every bit of content available through LSEG products, which is required to answer content questions such as this one.

    The best resource for content questions is the Helpdesk support team, which can be reached by submitting queries through LSEG Support. The support team will either have the required content expertise ready available or can reach out to relevant content experts to get the answer for you.

    You need to ask for the Excel formula, such as =RDP.Data, that can be used to retrieve the required data.

    Then, we can help you converting that formula to Python code.

    Please include the URL of this discussion in your raised question to prevent it from being redirected back to this Q&A forum.