question

Upvotes
Accepted
27 1 0 3

Searching by RIC code datastream python api

Hi everyone.

I'm trying to use the python Datastream API (with the DatastreamPy package) to search for market data for derivatives. I'm doing this using the ds.get_data() function. I have the RIC code of a futures contract i want to get information on. I would like to get price and volume time series info on this contract.


Here is the query I have currently :

ds.get_data(tickers='AAPF3M4', fields="P", start='2024-01-01', end='2024-04-29', freq='W')

(AAPF3M4 is the RIC code of the future i'm interested in)

However when i run this is get a return table with the value :

$$ER: E100,INVALID CODE OR EXPRESSION ENTERED

in the "Value" column.


This method works when passing a equity ticker or ISIN in the tickers= field, but can I use this method the access market data for derivatives using only RIC code ?


Thanks for your help.


EDIT #1:


I tried using "<>" with my RIC code (i.e. tickers='<AAPF3M4>' but i still get the same error

#product#contentpython apidatastream-apiricsderivatives
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.

1 Answer

· Write an Answer
Upvotes
Accepted
80k 257 52 75

@adam.leroux

Thank you for reaching out to us.

I can't find this RIC in the Datastream Navigator.

It could be a content issue. Please contact the Datastream Webservice support team directly via MyRefinitiv to verify what the problem is.

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.

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.