question

Upvotes
Accepted
1 1 4 8

Can we use python to pull timeseries data from TRTH API?

pythontick-history-rest-apitime-series
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 @sreedhanya.kavunkara

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

@sreedhanya.kavunkara

Hi,

Please be informed that a reply has been verified as correct in answering the question, and has been marked as such.

Thanks,

AHS

Upvote
Accepted
13.7k 26 8 12

@sreedhanya.kavunkara, yes you can.

See this tutorial on programming without the SDK. It covers Java and Python.

See this documentation item which describes 2 Python samples we have available for download. Customers can easily modify the query inside the Intraday Bars sample to retrieve Time and Sales data. The body of a Time Series request is described in this REST tutorial, and can easily be re-created inside Python.

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 Christiaan, Thanks for the answer. I tried the way you explained, and I am able to proceed till getting the extraction and the status is 200. But I am not finding 'jobId' in the extraction and hence it is pulling me error 'jobId not found'. Can you please help me to understand why is this and how to fix it.

Upvotes
13.7k 26 8 12

Hi @sreedhanya.kavunkara,

If the response has status 200, you should find the JobId in the response body, which has this format:

{
 "@odata.context":"https://hosted.datascopeapi.reuters.com/RestApi/v1/$metadata#RawExtractionResults/$entity",
 "JobId":"0x06471f66685b3026",
 "Notes": [...],
 "IdentifierValidationErrors": ...
}

This is handled correctly in the Java sample I mentioned.

If you cannot find it, please post your code, or, as a minimum, your extraction request and the 200 response.

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.