Reference for DSService.svc - GetData

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

HTTP METHOD

POST

FORMATS

Xml or Json

URL

GetData

REQUEST PARAMETERS

The operation takes in a parameter of type DSGetDataRequest which has the following members.

Name Type Description Example Value
Token String The token retrieved through GetToken operation n9IcXCXIq+ApBEe0zLBeTrU11D65F6BB2ED74E3467EA0EBE
DataRequest DSDataRequest Defines the 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 DSGetDataResponse which has the following members.

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.

<DSGetDataRequest xmlns="http://dsws.datastream.com/client/V1/" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
  <DataRequest>
    <DataTypes>
      <DSDataType>
        <Properties i:nil="true"/>
        <Value>PH</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"/>
  </DataRequest>
  <Properties i:nil="true"/>
  <TokenValue>TNLxBuBOVWUAMC7C73B4A31CE</TokenValue>
</DSGetDataRequest>

The following is a sample response.

<DSGetDataResponse xmlns="http://dsws.datastream.com/client/V1/" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
  <DataResponse>
    <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"/>
  </DataResponse>
  <Properties i:nil="true"/>
</DSGetDataResponse>

JSON

{
    "DataRequest": {
        "DataTypes": [
            {
                "Properties": null,
                "Value": "PH"
            }
        ],
        "Date": {
            "End": "-0D",
            "Frequency": "D",
            "Kind": 1,
            "Start": "-3D"
        },
        "Instrument": {
            "Properties": null,
            "Value": "VOD"
        },
        "Tag": null
    },
    "Properties": null,
    "TokenValue": "TNLxC73B4A31CE" 
}

The following is a sample response.

{
    "DataResponse": {
        "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
    },
    "Properties": null 
}