question

Upvotes
Accepted
1 1 1 1

fields and tickers with Datastream/Python

Cant get the tickers/fields to work when downloading with Python.. See below. Using DatastreamDSWS v1.0.10. Let me know! is there a simple guide to which tickers/RIC/fields anywhere? basically trying to download historical closing prices for variuos assets.. //Eirik

df = ds.get_data( tickers = ",".join([ 'EURSEK=', 'XLE', 'CLc1', 'ESc1', 'RXc1:RTS', 'TSLA.O' ]), fields = ['TR.CLOSEPRICE'] ) display(df) Instrument Datatype Value \ 0 EURSEK= TR.CLOSEPRICE $$ER: E100,INVALID CODE OR EXPRESSION ENTERED 1 XLE TR.CLOSEPRICE $$ER: E100,INVALID CODE OR EXPRESSION ENTERED 2 CLc1 TR.CLOSEPRICE $$ER: E100,INVALID CODE OR EXPRESSION ENTERED 3 ESc1 TR.CLOSEPRICE $$ER: E100,INVALID CODE OR EXPRESSION ENTERED 4 RXc1:RTS TR.CLOSEPRICE $$ER: E100,INVALID CODE OR EXPRESSION ENTERED 5 TSLA.O TR.CLOSEPRICE $$ER: E100,INVALID CODE OR EXPRESSION ENTERED

Currency 0 NA 1 NA 2 NA 3 NA 4 NA 5 NA

datastream-apipython api
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.

Hi @eirik10,

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

Please be informed that a reply has been verified as correct in answering the question, and has been marked as such.

Thanks,


AHS

Upvotes
Accepted
24.6k 54 17 14

Hello @eirik10

I am not the DataStream and content expert, but the DataStream symbol and field names are not the same as on the Eikon/Workspace.

The Close Price field should be "P".

price.png

You need to encapsulate the RIC code with "<>" to request data from Datastream (like "<TSLA.O>").

I highly recommend you find the Datastream symbol/Mnemonic and fields from the Datastream website (you can log in with your Datastream credentials). I found some of your requested symbols in the Datastream website.

  • XLE -> U:XLE
  • CLc1 -> NCLC.01 (or <CLc1>)
  • ESc1 -> ISMC.01 (or <ESc1>)
  • TSLA.O -> <TSLA.O>
df = ds.get_data( tickers = ",".join([ 'U:XLE', 'NCLC.01','ISMC.01',  '<TSLA.O>' ]), fields = ['P'] ) 

result.png



price.png (107.4 KiB)
result.png (51.7 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.

Upvotes
24.6k 54 17 14

Hello @eirik10

Additionally, you can contact the Datastream support team directly to get the list of symbols and fields that you want. You can contact them via https://my.refinitiv.com/content/mytr/en/productsupport.html website.

datastream-support.png


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.