Can you please help to find out the API end points I can use to extract prices via DataStream ? The

Can you please help to find out the API end points I can use to extract prices via DataStream ? The data type or attribute name is X(RI)~GBP

Best Answer

  • Jirapongse
    Jirapongse admin
    Answer ✓

    @prasad.kambrath

    You can try the DatastreamWS Test REST Service.

    First, use the "Get Token" service method to get a token, and then use the "Get Data" service method with the retrieved token to get the data.

    1679371592743.png

    The request message looks like this:

    1679371723008.png

    Otherwise, you can use the provided DSWS libraries to retrieve the data. The Python sample code looks like this:

    df = ds.get_data(tickers='VOD, U:IBM',fields=['X(RI)~GBP'],kind=1,start='-10D')

Answers

  • Hi @prasad.kambrath,

    Please check out the DSWS landing page on the developers portal. You can start by using the quickstart and move on the tutorials of your choice.

    The DSWS is a Restful API, but you can also use the DSWS python package, which takes care of the token management and API endpoint for you.

  • I tried the suggested and I get following. Is there anyway we could get currency ISO codes than symbols?



    {"DataResponse": {"AdditionalResponses": [{

    "Key": "Frequency",
    "Value": "D"

    }

    ],

    "DataTypeNames": null,

    "DataTypeValues": [{"DataType": "X(RI)~GBP",

    "SymbolValues": [{"Currency": "£",

    "Symbol": "U:URTH",

    "Type": 10,

    "Value": [

    240.71

    ]

    }

    ]

    }

    ],

    "Dates": [

    "2023-06-09T00:00:00"

    ],

    "SymbolNames": null,

    "Tag": null

    },

    "Properties": null

    }