question

Upvotes
Accepted
1 0 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 5.0 MiB each and 10.0 MiB total.

1 Answer

Upvotes
Accepted
38.1k 69 35 53

@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 5.0 MiB each and 10.0 MiB total.

Click below to post an Idea Post Idea