WebSocket
Heartbeat and Subscription
Describes ping/pong, heartbeat, and subscription listing for FastConnect WebSocket.
Heartbeat
The server sends heartbeat periodically to verify the client is still online. The client must respond with the correct format to keep the session alive.
Channel used
HEARTBEATPing from server
{
"method": "PING",
"channel": "HEARTBEAT",
"time": "dd-mm-yyyy hh-mm-ss"
}Pong from client
{
"method": "PONG",
"channel": "HEARTBEAT",
"time": "dd-mm-yyyy hh-mm-ss"
}LIST_SUBSCRIPTION
Request:
{
"method": "LIST_SUBSCRIPTION"
}Sample response (scope summary):
{
"trading": "order.*;portfolio.123456",
"data": "trade.*;quote.*;room.*"
}Subscribe topic
{
"method": "SUBSCRIBE",
"channel": "DATA|TRADING",
"topics": ["trade.SSI@tick", "quote.SSI@tick", "order.0901351"]
}Unsubscribe topic
{
"method": "UNSUBSCRIBE",
"channel": "DATA|TRADING",
"topics": ["trade.SSI@tick", "order.0901351"]
}List current subscriptions
{
"method": "LIST_SUBSCRIPTION"
}Topic convention
order.<accountNo>portfolio.<accountNo>trade.<symbol>@tick|1m|5mtrade.index.<index_code>@tick|1m|5mindexsummary.<index_code|*>quote.<symbol>@tickroom.<symbol|*>put.<symbol|*>oddlot.<symbol>market.<group|exchange>