question

Upvotes
Accepted
5 1 1 5

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

datastream-api
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
15.2k 40 12 19

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 *****"
}
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
15.2k 40 12 19

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.

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
5 1 1 5

Hi Gurpreet,

Thanks for your fast reply.

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


Thanks,

Y.D

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
5 1 1 5

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

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.

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.
Upvotes
5 1 1 5

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"

}



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.

What is the error?


Your request is not a valid JSON message.