Websocket

Sending Heartbeat

This document details how to use the Heart Beat on the Firstock Websockets.

Overview

Sending a heartbeat via WebSocket serves as a mechanism to notify the server of the client's continued activity and its readiness to receive data feeds. This practice allows the server to efficiently manage and prune inactive or closed client connections, contributing to overall improved performance. The request parameters for sending a heartbeat to the server include the essential details needed to maintain this active communication and ensure optimal functioning. Send Heartbeart every 5 seconds

Body

Below is the general JSON body for the Sending Heartbeat request. All fields marked as Mandatory must be included.

Order Placement API Parameters
Field Type Mandatory Description Example
t

string

Yes

‘t’ represents touchline task

h

Request

{
"t": "h"
}


t = Type of request, 'h' stands for Heartbeat