question

Upvotes
Accepted
3 0 0 5

Eikon Python API - excel 'GRLS' function for annualized growth rate for share

Hi,

is there a way to retrieve the value for the excel api's GRLS function for a time span?

Many thanks,

Steffen

eikon-data-apieikon-com-apidatastream-apidsws-api
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

Upvotes
Accepted
39.2k 75 11 27

I assume you're asking about the equivalent to the following Excel formula that uses Datastream add-in

=DSGRID("U:TRI","GRLS#(X,2Y)","Latest Value")
If this is what you're looking to replicate in Python, then you need to use Datastream Web Service API.
Here's an example Python code that implements the equivalent to the above request
import PyDSWS
import datetime as dt ds = PyDSWS.Datastream('your Datastream Child ID', 'your Datastream password') ds.get_data('U:TRI', ['GRLS#(X,2Y)'], date=dt.date.today())
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

Upvotes
3 0 0 5

Thanks Alex.

When trying to connect to DSWS, I get the following error when executing line "ds = PyDSWS("....

ConnectionError: HTTPConnectionPool(host='product.datastream.com', port=80): Max retries exceeded with url:

/DSWSClient/V1/DSService.svc/rest/Token?username=***&password=***

(Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x000000000C274C18>: Failed to establish a new connection: [WinError 10060] A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond'))
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

Upvotes
39.2k 75 11 27

@steffen.fuchs
I think it's likely due to your Internet proxy. Try explicitly specifying the proxy as suggested on this thread discussing similar issue.

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

Upvotes
3 0 0 5

works. Thanks, Alex

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

Click below to post an Idea Post Idea