Reference for DSService.svc - GetDataBundle
Given a token and details for multiple requests, retrieves data for all the requests.
HTTP METHOD
POST
FORMATS
Xml or Json
URL
GetDataBundle
REQUEST PARAMETERS
The operation takes in a parameter of type DSGetDataBundleRequest which has the following members.
Name | Type | Description | Example Value |
---|---|---|---|
Token | String | The token retrieved through GetToken operation | n9IcXCXIq+ApBEe0zLBeTrU11D65F6BB2ED74E3467EA0EBE |
DataRequests | DSDataRequest[] | Defines the array of request details for which data must be retrieved | Refer DSDataRequest for details. |
Properties | DSStringObjectKVPair[] | Properties to customize behavior | null |
The operation returns a parameter of type DSGetDataBundleResponse which has the following members.
Name | Type | Description | Example Value |
---|---|---|---|
DataResponses | DSDataResponse[] | The array of responses corresponding to each request. | Refer DSDataResponse for more details |
Properties | DSStringObjectKVPair[] | Properties describing behavior | null |
XML
The following is a sample request.
<DSGetDataBundleRequest xmlns="http://dsws.datastream.com/client/V1/" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"> <DataRequests> <DSDataRequest> <DataTypes> <DSDataType> <Properties i:nil="true"/> <Value>PL</Value> </DSDataType> </DataTypes> <Date> <End>-0D</End> <Frequency>D</Frequency> <Kind>TimeSeries</Kind> <Start>-3D</Start> </Date> <Instrument> <Properties i:nil="true"/> <Value>VOD</Value> </Instrument> <Tag i:nil="true"/> </DSDataRequest> <DSDataRequest> <DataTypes> <DSDataType> <Properties i:nil="true"/> <Value>NAME</Value> </DSDataType> </DataTypes> <Date> <End/> <Frequency/> <Kind>Snapshot</Kind> <Start>-0D</Start> </Date> <Instrument> <Properties i:nil="true"/> <Value>BARC</Value> </Instrument> <Tag i:nil="true"/> </DSDataRequest> </DataRequests> <Properties i:nil="true"/> <TokenValue>TNLxBuBOVWUAMbQ1EVS1u60vfUygFF17C7C73B4A31CE</TokenValue> </DSGetDataBundleRequest>
The following is a sample response.
<DSGetDataBundleResponse xmlns="http://dsws.datastream.com/client/V1/" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"> <DataResponses> <DSDataResponse> <AdditionalResponses i:nil="true"/> <DataTypeNames i:nil="true"/> <DataTypeValues> <DSDataTypeResponseValue> <DataType>PL</DataType> <SymbolValues> <DSSymbolResponseValue> <Currency>£</Currency> <Symbol>VOD</Symbol> <Type>DoubleArray</Type> <Value i:type="a:ArrayOfdouble" xmlns:a="http://schemas.microsoft.com/2003/10/Serialization/Arrays"> <a:double>218.12</a:double> <a:double>223.02</a:double> <a:double>223.1</a:double> <a:double>223.8</a:double> </Value> </DSSymbolResponseValue> </SymbolValues> </DSDataTypeResponseValue> </DataTypeValues> <Dates xmlns:a="http://schemas.microsoft.com/2003/10/Serialization/Arrays"> <a:dateTime>2014-11-12T00:00:00</a:dateTime> <a:dateTime>2014-11-13T00:00:00</a:dateTime> <a:dateTime>2014-11-14T00:00:00</a:dateTime> <a:dateTime>2014-11-17T00:00:00</a:dateTime> </Dates> <SymbolNames i:nil="true"/> <Tag i:nil="true"/> </DSDataResponse> <DSDataResponse> <AdditionalResponses i:nil="true"/> <DataTypeNames i:nil="true"/> <DataTypeValues> <DSDataTypeResponseValue> <DataType>NAME</DataType> <SymbolValues> <DSSymbolResponseValue> <Currency>£ </Currency> <Symbol>BARC</Symbol> <Type>String</Type> <Value i:type="a:string" xmlns:a="http://www.w3.org/2001/XMLSchema">BARCLAYS</Value> </DSSymbolResponseValue> </SymbolValues> </DSDataTypeResponseValue> </DataTypeValues> <Dates xmlns:a="http://schemas.microsoft.com/2003/10/Serialization/Arrays"> <a:dateTime>2014-11-17T00:00:00</a:dateTime> </Dates> <SymbolNames i:nil="true"/> <Tag i:nil="true"/> </DSDataResponse> </DataResponses> <Properties i:nil="true"/> </DSGetDataBundleResponse>
JSON
{ "DataRequests": [ { "DataTypes": [ { "Properties": null, "Value": "PL" } ], "Date": { "End": "-0D", "Frequency": "D", "Kind": 1, "Start": "-3D" }, "Instrument": { "Properties": null, "Value": "VOD" }, "Tag": null }, { "DataTypes": [ { "Properties": null, "Value": "NAME" } ], "Date": { "End": "", "Frequency": "", "Kind": 0, "Start": "-0D" }, "Instrument": { "Properties": null, "Value": "BARC" }, "Tag": null } ], "Properties": null, "TokenValue": "TNLxBu73B4A31CE" }
The following is a sample response.
{ "DataResponses": [ { "AdditionalResponses": null, "DataTypeNames": null, "DataTypeValues": [ { "DataType": "PL", "SymbolValues": [ { "Currency": "£", "Symbol": "VOD", "Type": 10, "Value": [ 218.12, 223.02, 223.1, 223.8 ] } ] } ], "Dates": [ "\/Date(1415750400000+0000)\/", "\/Date(1415836800000+0000)\/", "\/Date(1415923200000+0000)\/", "\/Date(1416182400000+0000)\/" ], "SymbolNames": null, "Tag": null }, { "AdditionalResponses": null, "DataTypeNames": null, "DataTypeValues": [ { "DataType": "NAME", "SymbolValues": [ { "Currency": "£ ", "Symbol": "BARC", "Type": 6, "Value": "BARCLAYS" } ] } ], "Dates": [ "\/Date(1416182400000+0000)\/" ], "SymbolNames": null, "Tag": null } ], "Properties": null }