datastream api stream fields retieval

Hi,

i'm trying to build jison to retrive data from datastream, with list of fields.

didnt find any information on the documantation via getdata or getdatabundle.

does anyone have an example for jison?


thanks,

Y.D

Tagged:

Welcome!

It looks like you're new here. Sign in or register to get started.

Best Answer

  • Gurpreet
    Gurpreet admin
    Answer ✓

    You can check the REST API documentation here.

    The JSON request message for above get_data request will be:

    POST https://product.datastream.com/DSWSClient/V1/DSService.svc/rest/GetData

    {
    "DataRequest": {
    "Instrument": {
    "Properties": null,
    "Value": "<VOWG_p.DE>"
    },
    "DataTypes": [{
    "Properties": null,
    "Value": "VO"
    }, {
    "Properties": null,
    "Value": "P"
    }
    ],
    "Date": {
    "End": "",
    "Frequency": "",
    "Kind": 1,
    "Start": "2017-01-01"
    },
    "Tag": null
    },
    "Properties": {
    "Key": "Source",
    "Value": null
    },
    "TokenValue": "**** TOKEN VALUE *****"
    }

Answers

  • Hi @YD,

    If you are using Python, I would recommend to use the DSWS library for requests, and invoke the API like:

    df = ds.get_data(tickers='<VOWG_p.DE>', fields=['VO','P'], start='2017-01-01', kind=1)

    which returns a dataframe with all the values.

    To get the list of all the fields, please use the Datastream Navigator.

  • YD
    YD Newcomer

    Hi Gurpreet,

    Thanks for your fast reply.

    Do you have an example using json? i want to check it via postman.


    Thanks,

    Y.D

  • YD
    YD Newcomer

    this is my issue,

    i dont see in this retrieval how can i get fields like

    NAME

    ASSET_TYPE

    OPERATING PROFIT MARGIN

    PCHV#(X)RI YTD)

    X(WC03255)/X(WC02999)

    REC BUY %

    ACCRUED INTEREST

  • https://community.developers.refinitiv.com/discussion/comment/87055#Comment_87055
    For content help, I would recommend that you see the Datastream Navigator linked earlier, or contact Refinitiv support at my.refinitiv.com, where you can directly talk to a content expert.
  • YD
    YD Newcomer

    Hi,

    i understood there are initial names to these fields so i'm moving forward on this but i have a question regarding expression api, i'm trying to get respose from this request(got example from the test simulator) but i'm keep getting error , so what is the issue here?

    {

    "DataRequest": {

    "DataTypes": [

    {

    "Properties": null,

    "Value": "MAX#(X,52W)"

    },

    ],

    "Date": {

    "End": "",

    "Frequency": "",

    "Kind": 0,

    "Start": "2021-11-01"

    },

    "Instrument": {

    "Properties": [

    {

    "Key": "IsExpression",

    "Value": True

    }

    "Value": "<mgx.ax>"

    },

    "Tag": null

    },

    "Properties": null,

    "TokenValue":"some token"

    }



  • What is the error?


    Your request is not a valid JSON message.

Welcome!

It looks like you're new here. Sign in or register to get started.

Welcome!

It looks like you're new here. Sign in or register to get started.