For a deeper look into our Elektron API, look into:

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials |  Articles

question

Upvotes
Accepted
3 0 2 2

save on_message data

I am working on the websocket python example:

https://github.com/Refinitiv/websocket-api/tree/master/Applications/Examples/EDP/python

I am running the websocket app. I am able to successfully get the response back and close the socket.

I need to collect all the responses while the socket is running and pass the data to another application after the socket is closed.

what would be a good way to do that?


elektron-sdktreprdp-apiwebsocketsrrto
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
Accepted
32.2k 41 11 20

Hello @kshishir,

Elektron Websocket API offers complete flexibility in implementation, what you get is a json-formatted strings, and from the point of the response being received, any paradigm that works with json can be used.

For example,

You can put json in a message and send via any messaging that you prefer, this way is the most time-sensitive.

You can put it in a database, this way requires designing a database structure, but is readily categorize-able and searchable.

The simplest is probably writing it to a file and reading from a file:

Read And Write JSON To A File

Where you should be careful is if your app will re-distribute the streaming content to other users, real time data is exchange-fee-liable, any redistribution must be designed to be exchange-compliant.

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
3 0 0 1

Hi @kshishir were you able to get this resolved?

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.