This article will show you how to access to the saved list on Eikon Desktop programmatically using Eikon Data API(Python).

This will allow you to access and re-use the saved instrument lists from Eikon Desktop on Eikon Data API(Python).

So you can use Eikon Desktop to modify the list according to your requirements then use the saved instrument list on Eikon Desktop as such as Monitor.

And you can also use the saved instrument list on Eikon Data API(Python).

 

Create a list on Eikon Desktop.

1. You can launch the "Portfolios And Lists" application on Eikon Desktop by typing in "Port" to the Eikon search bar and press enter or click on the app name in the pop-up list.

2. Click on the "Create" button on the top left of the window.

Select "Type" as "List" and follow the on-screen instructions and save the list.

Alternatively, you can use SCREENER app or GOVSRCH app(Bond searching app) to search for instrument specifics to your filters.

Then add the result into a list, name the list and save it.

Now, we should have a list saved into our Eikon Desktop.

In this example, there are 2 lists, "test-list1" and "test-from-govsrch-app".

Accessing the instruments in the saved list.

You can use this code to access to the saved list.

df,e = ek.get_data('list("test-list1")',['TR.RIC'])

ric_lists = df['Instrument'].tolist()
#ric_lists now contains all the instrument from 'test-list1' list

Output:

['IBM.N', '0700.HK', '6501.T']

Now you can use ric_lists list with any other API call:

#get data
df2,e = ek.get_data(ric_lists,['DSPLY_NAME','CF_LAST','TR.CompanyMarketCap'])
df2

Output:

  Instrument DSPLY_NAME CF_LAST Company Market Cap
0 IBM.N INTL BUS MACHINE 105.48 93,709,278,266.04
1 0700.HK TENCENT/d 375.00 3,487,112,999,805.59
2 6501.T HITACHI 3,148.00 2,726,525,193,491.44