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

Best Answer

  • 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

Answers