question

Upvotes
Accepted
0 0 0 1

Unable to extract data from API

API.zip

Hello Everyone,

I am new to this organization (3 months old) but i have a pretty decent understanding of python. So i was testing how to extract the data from an API from API Playground but when i put in the APP key and download the data, I get a 404 error message. Can someone please assist me on this? Attached the zip file with the .ipynb file.


python#technologyrdp-api
api.zip (1.4 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.

Hi @subhashis.bose

This RDP API question has been moved to the RDP forum.

Hi @subhashis.bose ,

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
24.7k 54 17 14

Hello @subhashis.bose

I checked the given source code. I found that the code just receives the machine id, password, and app key without sending them to authenticate with the RDP Auth service.

I highly recommend you check the following resources about the RDP authentication process:

### RDP Endpoint URL ###

The valid RDP API endpoint for the intraday-summaries is as follows:

https://api.refinitiv.com/data/historical-pricing/v1/views/intraday-summaries/

Your code "https://api.refinitiv.com/data/historical-pricing/v1/intraday-summaries/" endpoint is missing the "/views".

result.png



result.png (112.2 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.

Thank you so much
Upvotes
78.9k 250 52 74

@subhashis.bose

Thanks for reaching out to us.

First, you need to get an access token from the RDP Authentication service and then use the access token to connect to other RDP services.

You can refer to the answer in this discussion.

I hope that this information is of help.

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 Jirapongse.. I already have the app key from eikon as well as the machine ID and Machine password. I have set the code in such a way that i need to manually input them upon running the code and then it will extract the data. But its still not happening.
Upvotes
78.9k 250 52 74

@subhashis.bose

You need the application key when you are using Eikon Data API or Refinitiv Data Libraries to retrieve data from the Desktop session.

To retrieve data directly from RDP (https://api.refinitiv.com/data/historical-pricing/v1/intraday-summaries), you need the machine ID, password, and client_id.

Use the machine ID, password, and client_id to get an access token. Then use the access token to get the data. Please refer to the Quick Start of Refinitiv Data Platform APIs.

Otherwise, you can use Refinitiv Data Library for Python to retrieve data from RDP. The Refinitiv Data Library for Python provides a set of ease-of-use interfaces offering coders uniform access to the breadth and depth of financial data and services available on the Refinitiv Data Platform.

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.

thank you so much... I will start studying on it and will improve my code on the basis of the same
Upvotes
0 0 0 1

@Jirapongse Kindly find attached my updated code. Please remember that i am not a coder by profession and I am still learning. Kindly take a look at it and please help me correct it.API_upd.zip


api-upd.zip (1.5 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.