question

Upvotes
Accepted
5 2 2 6

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.

Hello @YD

Thank you for your participation in the forum. Is the reply below satisfactory in resolving your query?


If so please can you click the 'Accept' text next to the appropriate reply? This will guide all community members who have a similar question.

Thanks,


AHS

Please be informed that a reply has been verified as correct in answering the question, and has been marked as such.

Thanks,


AHS


Upvotes
Accepted
22k 58 14 21

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
22k 58 14 21

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 2 2 6

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 2 2 6

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 2 2 6

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.


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.