question

Upvotes
Accepted
3 1 2 4

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
#technology#contentdatastream-api
1721193159574.png (7.3 KiB)
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Upvotes
Accepted
84.6k 287 53 77

@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>"
}



1721202959049.png (8.6 KiB)
1721203044071.png (34.0 KiB)
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Upvotes
3 1 2 4

Thanks, that helps

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.