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
@steffen.fuchs, thank you for your participation in the forum. Are any of the replies below satisfactory in resolving your query? If yes please click the 'Accept' text beneath the most appropriate reply. This will guide all community members who have a similar question. Otherwise please post again offering further insight into your question. Thanks, AHS
@steffen.fuchs, please be informed that a reply has been verified as correct in answering the question, and has been marked as such. Thanks, AHS
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.