question

Upvotes
Accepted
1 3 3 3

How do extract symbols that fulfil regex criteria in datastream?

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.

datastream-apiricsdsws-apiderivativesmnemonics
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Hello @kenneth.fung

Thank you for your participation in the forum. Is the reply below satisfactory in resolving your query?


If so please can you click the 'Accept' text next to the appropriate reply? This will guide all community members who have a similar question.

Thanks,


AHS

@jirapongse.phuriphanvichai

The client posted follow up questions on this thread. Could you please take a look and respond?

@kenneth.fung

Hi,

Thank you for your participation in the forum.

Are any of the replies below satisfactory in resolving your query?

If yes please click the 'Accept' text next to the most appropriate reply. This will guide all community members who have a similar question.

Otherwise please post again offering further insight into your question.

Thanks,

AHS


Upvotes
Accepted
78.8k 250 52 74

@kenneth.fung

You can DS.SYMBOLLOOKUP with the DataStream.

ds.get_data(tickers="SPXw", fields=["DS.SYMBOLLOOKUP(Count=50)"],  kind=0)

The output is:


1605759459831.png (45.4 KiB)
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

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)


Hi @chavalit.jintamalit,

It seems that the client has further questions. Could you please look into it?

Thanks

Upvotes
1 3 3 3
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
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Upvotes
1 3 3 3

Plus, DS.SYMBOLLOOKUP(Count=50) seems to return valid RICS/Mnemonic but not the dead ones.

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

@kenneth.fung

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.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.