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.

1 Answer

· Write an Answer
Upvotes
Accepted
78.1k 246 52 72

@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.