question

Upvotes
Accepted
1 1 3 7

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 5.0 MiB each and 10.0 MiB total.

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 5.0 MiB each and 10.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 5.0 MiB each and 10.0 MiB total.

Click below to post an Idea Post Idea