Datastream API - how to get all codes under main code, Example - ITDM

For main code(chain ITDM) on data stream, i need to get the list of all codes under this. how can i check . i dont see options on https://product.datastream.com/DswsClient/Docs/TestRestV1.aspx

ITDM has below codes and i need to retrieve via data stream API for automation

1721193159574.png

3INAA4AAADVAAEVAAIFAAMAASAASCAATGAAVCABDACICADIGAEETAEFSAEIAERSAEWUAFMCAGITAGITo

Best Answer

  • Jirapongse
    Answer ✓

    @raghava.belagola

    Thank you for reaching out to us.

    The Python code with the DatastreamPy library looks like this:

    df = ds.get_data(tickers="ITDM|L",
                fields=["NAME","MNEM"],
                kind=0)
    df.pivot(index='Instrument', columns='Datatype')['Value']

    1721202959049.png

    The TEST REST page should be set like this:

    1721203044071.png

    The request message is:

    Url:https://product.datastream.com/dswsclient/V1/DSService.svc/rest/GetData

    {
    "DataRequest": {
    "DataTypes": [
    {
    "Properties": null,
    "Value": "MNEM"
    }
    ],
    "Date": {
    "End": "",
    "Frequency": "",
    "Kind": 0,
    "Start": ""
    },
    "Instrument": {
    "Properties": [
    {
    "Key": "IsList",
    "Value": True
    }
    ],
    "Value": "ITDM"
    },
    "Tag": null
    },
    "Properties": null,
    "TokenValue": "<token>"
    }


Answers