question

Upvotes
Accepted
1 0 0 0

How can I add multiple instruments/RICs simultaneously to the CodeCreator?

Greetings, I am using the CodeCreator to access price and volume data for all the instruments in a particular exchange. I have the list of individual RICs/instruments, but cannot seem to enter them into the CodeCreator all at one time. I have tried several different delimiters, but the instrument search only seems to accept one search term at a time. Is it possible to paste multiple RICs into the instrument search field using a particular format?

#productcodecreator
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
14.1k 30 5 10

Hi @rpm5495 ,

As far as I know, pasting a list of instruments into the CodeCreator isn't supported yet. However, I'd like to suggest a workaround by clicking on the button at the bottom right of the CodeCreator, either 'Copy to Clipboard' or 'Open in CodeBook' and then add the list of instruments into the code as a Python list, for example

In the CodeCreator, I click on the 'Copy to Clipboard'

1674806338773.png

And I paste the code in the CodeBook app or Jupyter Notebook with the Python environment that contains Eikon Data API Python library. Then I add the instrument list as below ('MSFT.O', 'META.O')

df, err = ek.get_data(
    instruments = ['AAPL.O', 'MSFT.O', 'META.O'],
    fields = [
        'TR.CLOSEPRICE',
        'TR.Volume',
        'TR.LOWPRICE'
    ]
)

display(df)

The output is

1674806982457.pngHope this helps and please let me know in case you have any further questions.


1674806338773.png (73.1 KiB)
1674806982457.png (14.9 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.

Upvotes
1 0 0 0

Thanks so much for this solution. I think this will work well. I appreciate the quick assistance!

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.