Hi, is it possible to use Datastream aggregation functions in DSWS? E.g. sth like F:VIE(SUM#(X(UDD),2023-01-09,2025-05-02))? Thx PS: Sorry if the question was already asked, the gateway was down so I couldnt perform a search…
@AlexK
Thank you for reaching out to us.
Is it this one?
df = ds.get_data(tickers="F:VIE|E", fields = [ "SUM#(X(UDD),2023-01-09,2025-05-02)"], kind=1) df
I am using the Datastream Web Service.
Hi Jirapongse, thank you very much. I have just realised that I wasn't precise with my question. I realised I am using DSS REST, making a request using the HTTPS Post method and XML… The response I am getting from the server is $$"ER","E21B","INVALID CODE F:VIE(SUM#(UDD,2023-01-13,2025-05-09)) ",
Please share the HTTPS Post message that you are using.
This is the message I am using: (I replaced the TokenValue with XXX) <DSGetDataRequest xmlns="http://dsws.datastream.com/client/V1/" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><DataRequest><DataTypes/><Date><End></End><Frequency>Y</Frequency><Kind>Snapshot</Kind><Start></Start></Date><Instrument><Properties><DSStringObjectKVPair xmlns="http://dsws.datastream.com/client/V1/" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><Key>IsExpression</Key><Value i:nil="true"/></DSStringObjectKVPair></Properties><Value>F:VIE(SUM#(UDD,2023-01-13,2025-05-09))</Value></Instrument><Tag i:nil="true"/></DataRequest><TokenValue>XXX</TokenValue></DSGetDataRequest>
It could be the DSWS SOAP API.
You can check the request message from this website (https://product.datastream.com/DswsClient/Docs/TestSoapV1.aspx).
The request message is:
<GetData xmlns="http://dsws.datastream.com/client/V1/"> <request xmlns:i="http://www.w3.org/2001/XMLSchema-instance"> <DataRequest> <DataTypes> <DSDataType> <Properties i:nil="true"/> <Value>(SUM#(UDD,2023-01-13,2025-05-09))</Value> </DSDataType> </DataTypes> <Date> <End/> <Frequency/> <Kind>TimeSeries</Kind> <Start/> </Date> <Instrument> <Properties> <DSStringObjectKVPair> <Key>IsExpression</Key> <Value i:type="d9p1:boolean" xmlns:d9p1="http://www.w3.org/2001/XMLSchema">true </Value> </DSStringObjectKVPair> </Properties> <Value>F:VIE</Value> </Instrument> <Tag i:nil="true"/> </DataRequest> <Properties i:nil="true"/> <TokenValue><token></TokenValue> </request> </GetData>
Hi, unfortunately, this does not produce the intended result. Instead of delivering the sum of unadjusted dividends for F:VIE over the time period from 13-jan-2023 to 9-May-2025 (a snapshot), it returns the price of the security. Any idea why the calculation is not performing?
Do you have a working formula used in Excel?
Otherwise, please contact the Datastream support team directly via MyAccount.