Real-Time News (News) Unsubscribe
This document describes how to fully cancel or partially cancel product subscriptions without disconnecting the WebSocket connection.
Overview
This document describes how to cancel the news subscription on the current WebSocket connection without disconnecting. After unsubscribing, news will no longer be pushed until a new subscription is made.
Each news connection keeps only one subscription at a time. Unsubscribing clears the entire current subscription criteria.
Request Frequency
Keep the connection alive with heartbeats. It is recommended to send a heartbeat every 30 seconds (protocol number 10010). If the server does not receive a heartbeat (business heartbeat or WebSocket Ping) for more than 60 seconds, the connection will be closed automatically.
Error Code Explanation
Please refer to the WebSocket error code documentation for further details.
Subscription Address
wss://data.infoway.io/news?apikey=YourAPIKeyRequest (Protocol Number: 11020)
{
"code": 11020,
"trace": "423afec425004bd8a5e02e1ba5f9b2b0"
}code
Integer
Yes
Protocol number for the request
Real-time news unsubscribe: 11020
trace
String
Yes
Trace ID (random string)
423afec425004bd8a5e02e1ba5f9b2b0
Response (Protocol Number: 11010)
code
Integer
Yes
Response protocol number
Unsubscribe response: 11010
trace
String
Yes
Trace ID from the request
423afec425004bd8a5e02e1ba5f9b2b0
msg
String
Yes
Response message
ok
Last updated
