question

Upvotes
Accepted
1 2 2 2

How to get the category of an asset?

screen-shot-2021-09-06-at-142734.png

When searching an asset using datastream, there is a category column on the left to narrow down the search result. My question is: given a specific asset, how can I get its category? In other words, is there a datastream datatype for "category"? I know there is a "TYPE" datatype but they are still a little bit different.

datastream-apidsws-apidatastreamdata-type
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 @wangh9 ,

Hello @andrej.krneta ,

Thank you for your participation in the forum.

Is the reply below satisfactory in resolving your query?

If yes, please click the 'Accept' text next to the appropriate reply. This will guide all community members who have a similar question. Otherwise please post again offering further insight into your 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

1 Answer

· Write an Answer
Upvotes
Accepted
5.7k 21 2 6

Hi @wangh9 ,


Have you had a look at the Data Type search? There you can find fields for any asset type.

E.g.:


df  = ds.get_data(tickers='613XGU',
                  kind=0,
                  fields=["TYPE"])

Returns 'BD '


df = ds.get_data(tickers = "RMCPANNL", # be careful not to put spaces in between elements here, or else these spaces will be included in column names.
                 fields = ["TYPE"],
                 kind=0)


Returns 'EC '


These are described in the 'TYPE' data definition:


1630951497905.png



Is this satisfactory? It's not exactly like the Datastream Navigator Categories...


1630951497905.png (78.1 KiB)
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.