Reference for DSService.svc - Data

Given a token and details for a single request, retrieves data.

HTTP METHOD

GET

FORMATS

Xml or Json

URL

Data?token={TOKEN}&instrument={INSTRUMENT}&datatypes={DATATYPES}&datekind={DATEKIND}&start={START}&end={END}&freq={FREQ}&props={PROPS}&format={FORMAT}

REQUEST PARAMETERS

The operation takes in a following parameters: (Note that the query string values must be URL encoded)

Name Type Description Example Value
token String The token retrieved using the Token method. n9IcXCXIq+ApBEe0zLBeTrU11D65F6BB2ED74E3467EA0EBE
instrument String The instrument. Ex: VOD (or) LFTSE100 (or) VOD,BARC.
datatypes String The datatype. Ex: PL (or) NAME (or) PL,PH.
datekind String Defines whether the date is a snapshot (static) or a time series date. It is enough to specify only start date for a snapshot date. Ex: TimeSeries, Snapshot.
start String The start date. The dates can be relative dates or absolute dates or string literals. Refer DSDateNames for string literals. Ex: -30D (or) 2011-12-31 (or) BDATE.
end String The end date. The dates can be relative dates or absolute dates or string literals. Refer DSDateNames for string literals. Ex: -30D (or) 2011-12-31 (or) BDATE.
freq String The frequency.Refer DSDateFrequencyNames for allowed frequencies. Ex: D (or) W (or) M (or) Q (or) Y.
props DSStringObjectKVPair[] Optional properties to customize behavior for the instruments. Ex: Empty string value (or) IsSymbolSet
format String Optional format for xml or json Empty string value

The operation returns the following parameter:

Name Type Description Example Value
DataResponse DSDataResponse The response corresponding to the request. Refer DSDataResponse for more details

XML

The following is a sample request.

Data?token=TNLxBuBOVWUA6Ni73B4A31CE&instrument=VOD&datatypes=PH&datekind=TimeSeries&start=-3D&end=-0D&freq=D&props=

The following is a sample response.

<DSDataResponse xmlns="http://dsws.datastream.com/client/V1/" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
  <AdditionalResponses i:nil="true"/>
  <DataTypeNames i:nil="true"/>
  <DataTypeValues>
    <DSDataTypeResponseValue>
      <DataType>PH</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>222</a:double>
            <a:double>225.8</a:double>
            <a:double>226.6</a:double>
            <a:double>229.9</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>

JSON

Data?token=TNLxBuBOVWUA6Ni73B4A31CE&instrument=VOD&datatypes=PH&datekind=TimeSeries&start=-3D&end=-0D&freq=D&props=

The following is a sample response.

{
    "AdditionalResponses":null,
    "DataTypeNames":null,
    "DataTypeValues":[
    {
        "DataType":"PH",
        "SymbolValues":[
        {
            "Currency":"£",
            "Symbol":"VOD",
            "Type":10,
            "Value":[222,225.8,226.6,229.9]
        }]
    }],
    "Dates":["\/Date(1415750400000+0000)\/","\/Date(1415836800000+0000)\/","\/Date(1415923200000+0000)\/","\/Date(1416182400000+0000)\/"],
    "SymbolNames":null,
    "Tag":null
}