Get Name of Instrument and get name DataType ??

Hello


I'm using the Python API (DatastreamPy), but I can't find how to request the Instrument name and the DataType name.


This is my code


import pandas as pd

import DatastreamPy as dsweb

ds = dsweb.DataClient(None, '', '')



history = ds.get_data(tickers = 'TOTMKDV', fields = ['DWNM'], kind = 1, start = '-1Y', req = 'M', )


values = history.reset_index().melt(id_vars='Dates', value_name='value')


I need to know that the instrument TOTMKDV corresponds to "DEVELOPED MKTS.-DS Market" and that the DataType DWNM corresponds to "Net (Profit) Margin".



And another query, is there any documentation where it is specified that returns the parameter "kind" ? Apparently it can take values of 0 and 1

Best Answer

  • Gurpreet
    Answer ✓

    HI @Sebastian Catalan,

    You can find information from the DSWS documents in the developers portal and from the Datastream Navigator which shows various fields you can use.

    The kind parameter specifies weather to get static data (kind=0) or get timeseries (kind=1).

    Examples:

    >>> ds.get_data(tickers='TOTMKDV', fields=['NAME', 'DWNM'], kind=0)
    Instrument Datatype Value Currency Dates
    0 TOTMKDV NAME DEVELOPED MKTS.-DS Market U$ 2024-05-15
    1 TOTMKDV DWNM 8.29 U$ 2024-05-15