Upgrade from Eikon -> Workspace. Learn about programming differences.

For a deeper look into our Eikon Data API, look into:

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials |  Articles

question

Upvotes
Accepted
3 0 0 3

Add more columns to a Python monitor

Hello,

This code display my watchlist monitor Instrument and Close price

equity_watchlist,err = ek.get_data('Monitor("US Stocks")', ['CF_CLOSE'])

equity_watchlist

I would like to add more columns sur as CF_NAME, CF_LAST, CF_ASK and so on:

equity_watchlist,err = ek.get_data('Monitor("US Stocks")', ['CF_CLOSE'], ['CF_NAME'], ['CF_LAST'])

equity_watchlist

But I get an error each time I run the code. Could you please help me with that request?

Thanks

eikoneikon-data-apipythonmonitoring
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 @Guillaume Lakah

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

Upvote
Accepted
884 4 2 8

Can you please share the screenshot of the error you are getting?
Also try replacing the last second line of your code with:

equity_watchlist,err = ek.get_data('Monitor("US Stocks")', ['CF_CLOSE', 'CF_NAME','CF_LAST'])

It should work, Thanks

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
3 0 0 3

Hello Shadab, it works perfectly, I made a typo with the [].

Thanks a lot!

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.