public class WebSocketApiUserDataStream extends Object implements WebSocketApiModule
Constructor and Description |
---|
WebSocketApiUserDataStream(com.binance.connector.client.utils.websocketapi.WebSocketApiRequestHandler handler) |
Modifier and Type | Method and Description |
---|---|
void |
userDataStreamPing(String listenKey,
org.json.JSONObject parameters)
Ping a user data stream to keep it alive.
User data streams close automatically after 60 minutes, even if you're listening to them on WebSocket Streams. In order to keep the stream open, you have to regularly send pings using the userDataStream.ping request. It is recommended to send a ping once every 30 minutes. Note: the stream will close in 60 minutes unless userDataStream.ping requests are sent regularly. |
void |
userDataStreamStart(org.json.JSONObject parameters)
Start a new user data stream.
The response will output a listen key that can be subscribed through on the WebSocket stream afterwards. Note: the stream will close in 60 minutes unless userDataStream.ping requests are sent regularly. |
void |
userDataStreamStop(String listenKey,
org.json.JSONObject parameters)
Explicitly stop and close the user data stream.
|
public WebSocketApiUserDataStream(com.binance.connector.client.utils.websocketapi.WebSocketApiRequestHandler handler)
public void userDataStreamStart(org.json.JSONObject parameters)
parameters
- JSONObject composed by key-value pairs:
public void userDataStreamPing(String listenKey, org.json.JSONObject parameters)
listenKey
- -- required/String parameters
- JSONObject composed by key-value pairs:
public void userDataStreamStop(String listenKey, org.json.JSONObject parameters)
listenKey
- -- required/String parameters
- JSONObject composed by key-value pairs:
Copyright © 2023. All rights reserved.