Working with Public Streams
You can send various Requests to Streams. From Streams, you can receive Replies to your Requests and various Stream Events that you have subscribed to.
Request → Receipt Confirmation → Stream (continuous feed)
The following data can be sent through the web-socket instance. Examples can be seen below.
All Replies and Stream Events has two required fields:
eventType
- needed to determine the type of event on the client side, in accordance with it, you can process it correctly
eventTime
- the time when the message was sent to the stream, with it you can process messages based not only on the actual time of acceptance, excluding network delays
Subscribing
→ Request:
<- Receipt Confirmation:
Unsubscribing
→ Request:
<- Receipt Confirmation:
Unsubscribing from all
→ Request:
<- Receipt Confirmation:
Ping/Pong
→ Request:
<- Receipt Confirmation:
Extending Session's Time
One connection of the public (market) Stream is valid indefinitely. The connection becomes invalid if the connection is lost or if the session is not extended in time.
<- To warn about expiration of session server send event:
For extending session's time you need to send this event as a reply:
→ Request:
<- Receipt Confirmation:
Last updated