Within Datastream Web Service (DSWS), I want to use Datastream Functions (link) for time series, as they exist within the TR Datastream Excel plugin.
For example 'PCH#(X(P), 3M)'
When I do a static request for a single day, I get a result.
However, when I try a time serie, I got the error
"Error - please check instruments and parameters (time series or static)"
Are Datastream function not supported for time series in DSWS?
Unfortunately this symbol substitution function is not available in time series request in Python. We will be working on new version of Python add-in during 2019 and we will make sure this option is included.
For now what I would suggest is creating the request with PCH# function for separate instruments, like this:
ds.get_data(tickers='PCH#(VOD(P), -3M)’, 'PCH#(U:FB(P), -3M)’, fileds=’X’, start='20180731', freq='M')
DSWS supports functions however it is difficult to say what is causing the error message based on above description. Please paste this time series request, which will help replicate what you are seeing and help advise.
Thank you for your reply.
I'll make it easyier: can you provide me an example (any API or Web Service, doesn't really matter) with a function (e.g. PCH#).
I ll try to find out where I went wrong myself.
I looked around in the documentations, and I found mutliple examples but none including a Datastream function.
EDIT: I add my example anyway. But would still love to have a working example from your part.
For example in python, with ds is the pyDSWS.DataStream object and ids an identifier.
The static request
ds.get_data(ids, fields=['PCH#(X(P), 3M)'], date='20180731')
returns me the value for 2018-07-31
However the time series request
df = ds.get_data(ids, fields=['PCH#(X(P), 3M)'], start='20180731', freq='M')
returns an error:
Error - please check instruments and parameters (time series or static)