Upgrade from Eikon -> Workspace. Learn about programming differences.

For a deeper look into our Eikon Data API, look into:

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials |  Articles

question

Upvotes
Accepted
37 7 10 13

issues with the values returned by the function get_data()

I use the function get_data() in the following way:

index_id = ['US0378331005', 'CH0244767585', 'IT0003796171', 'JP3246400000', 'CH0038863350', 'HK0267001375', 'AU000000ORG5', 'BE0974258874', 'PTEDP0AM0009']
data, err   = ek.get_data(index_id,['TR.isPrimaryInstrument']) 

and the return is a serie of string "True".

Now if I use this function with another set of index_id, it will return 1 and 0. Why is that behavior and how to avoid it?


eikoneikon-data-apipythonrefinitiv-dataplatform-eikonworkspaceworkspace-data-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.

@Tulkkas, can you share the other instruments that deliver 0 / 1 instead of false / vtrue ?

Hello @Tulkkas

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
18.2k 21 13 21

Hi @Tulkkas

Please share the other instruments which you got 0 or 1.

I would like to try to retrieve the information on API and on Excel.


For the provided instrument codes in your question, I got True.

Thanks.


ahs.png (27.8 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.

Upvotes
37 7 10 13

it was a very large universe and I don't know which exact ISIN was trigerring the 1/0 instead of true/false. I can't even copy/past the full list here as there are more than 4000 ISIN.

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.