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

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials |  Articles

question

Upvotes
Accepted
3 0 0 2

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.

Upvote
Accepted
864 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 2

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.