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

python apidatastream-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.

Upvotes
Accepted
25.7k 58 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
25.7k 58 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.