How do extract symbols that fulfil regex criteria in datastream?
For instance, when I type SPXw, I can see a list of options RIC/ Mnemonic in DFO Navigator.
I want this to an output from a python function.
New posts are disabled while we improve the user experience.
You can browse the site, or for urgent issues, raise a query at MyAccount.
How do extract symbols that fulfil regex criteria in datastream?
For instance, when I type SPXw, I can see a list of options RIC/ Mnemonic in DFO Navigator.
I want this to an output from a python function.
You can DS.SYMBOLLOOKUP with the DataStream.
ds.get_data(tickers="SPXw", fields=["DS.SYMBOLLOOKUP(Count=50)"], kind=0)
The output is:
To retrieve RICs instead of mnemonics, you need to send another request.
df1 = ds.get_data(tickers="SPXw", fields=["DS.SYMBOLLOOKUP(Count=50)"], kind=0) ds.get_data(','.join(df1['Instrument']),fields=["RIC"], kind=0)
DS.SYMBOLLOOKUP(Count=50) // I try to set it as 1000, in anticipation of a result of similar size (1000); but it returns only 25 rows
Plus, DS.SYMBOLLOOKUP(Count=50) seems to return valid RICS/Mnemonic but not the dead ones.
Navigator is the tool that DSWS clients are advised to use.
The symbol lookup was created for quick search, has limited search functionality, and doesn’t cover all content sets.