question

Upvotes
Accepted
1 0 0 0

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

#productpython apidatastream-apidatastream
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.

1 Answer

· Write an Answer
Upvotes
Accepted
23.7k 61 15 21

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
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.

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.