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
1 0 0 2

User is using API Python to retrieve EOD data but received an error

ek.set_app_key('4e49391e9c524b9081b97cdbc046113aa317f957')
screener_exp ='SCREEN(U(IN(Equity(active,public,primary))), IN(TR.ExchangeCountryCode,TH))'

field2 = ['TR.TickerSymbol','TR.PriceCloseDate','TR.PriceOpen','TR.PriceHigh','TR.PriceLow','TR.CLOSEPRICE','TR.Volume','TR.TSVWAP','TR.CompanyMarketCap']

parameter={'SDate':0, 'EDate':0, 'Frq' : 'D' }

df = pd.DataFrame()
df, e = ek.get_data(screener_exp,fields=field2, parameters=parameter)


The error that client received

Instrument HTECH.BK
Ticker Symbol HTECH
Date 2022-12-21T00:00:00Z
Price Open 3.94
Price High 3.98
Price Low 3.92
Close Price NaN
Volume 124100
VWAP NaN
Company Market Cap 1.188e+09
----------------------------------------------------------------------------------

no vwap and close_price , and retrieve only 8-10 stocks .

eikon-data-api#technologyapiscreener
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
166 2 0 3

Try '0' as string value of 'SDate' and 'EDate' in parameter instead of numeric 0.

api.png


api.png (42.2 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
166 2 0 3

Hi Ladaporn,


Your code got no big problem at my end. I replaced 'TR.CLOSEPRICE', with 'TR.PriceClose'. It returns 887 stocks as shown below.

api.png



api.png (43.0 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 2

@frank.ling1 but you also facing the same with "TR.TSVWAP " : <NA> , could you pls help check

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 2

Thank you @frank.ling1 , client is able to retrieve data now

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.