For a deeper look into our DataScope Select SOAP API, look into:

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials

question

Upvotes
Accepted
3 0 0 1

Using Python, how can I save the content of “response_text” into a csv file?

Using Python, how can I save the content of “response_text” into a csv file? Probably a very quick one

Thanks!


pythondss-rest-apidatascope-selectdss
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.

1 Answer

Upvotes
Accepted
7.6k 15 6 9

@zoe

Do you mean the response message from the On-demand Extraction request?

There are many ways in python and you can find it on the internet.

You can just open the file and write the data from the response raw data like below sample codes where r is a response.

with open(fileName, 'wb') as fd:
   fd.write(r.raw.read())

You may also read the below article, it a good article explains how to optimize your codes to download the data. It should be able to apply to your case as well.

https://developers.refinitiv.com/article/how-optimize-trth-tick-history-file-downloads-python-and-other-languages

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