question

Upvotes
Accepted
1 1 1 0

can you pass a list to datastreamDSWS using ds.get_data?

I'd liuke to pass a list of tickers:


stocks = ds.get_data(tickers= list, fields=['P'], start = '-1Y', end = '-0d', freq = 'D')


It sthat possible?


Thanks

eikon-data-apipythonapidatastream-apidsws-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.

Hello @tikhon.savrasov

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

1 Answer

· Write an Answer
Upvotes
Accepted
78.8k 250 52 74

@tikhon.savrasov

Refer to the DataStream GETTING STARTED WITH PYTHON guide, it accepts a comma-separated string.

If you need to use a list, you need to convert it to a comma-separated string.

stocks = ds.get_data(tickers= ','.join(list), fields=['P'], start = '-1Y', end = '-0d', freq = 'D')

1587709213342.png (31.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.

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.