Hi,
is there a way to retrieve the value for the excel api's GRLS function for a time span?
Many thanks,
Steffen
Hi,
is there a way to retrieve the value for the excel api's GRLS function for a time span?
Many thanks,
Steffen
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.
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())
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'))@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.