Class WebSocketApiAuth

    • Method Detail

      • logon

        public void logon​(org.json.JSONObject parameters)
        Authenticate WebSocket connection using the provided API key.
        After calling session.logon, future requests under same connection won't send apiKey and signature parameters.
        Calling session.logon multiple times changes the current authenticated API key.
        Parameters:
        parameters - JSONObject composed by key-value pairs:

        recvWindow -- optional/int -- The value cannot be greater than 60000
        requestId -- optional/String or int
        See Also:
        https://binance-docs.github.io/apidocs/websocket_api/en/#log-in-with-api-key-signed
      • logout

        public void logout​(org.json.JSONObject parameters)
        Forget the API key previously authenticated. If the connection is not authenticated, this request does nothing.
        Note that the WebSocket connection stays open after session.logout request.
        You can continue using the connection, but now the requests will send the apiKey and signature parameters where is needed.
        Parameters:
        parameters - JSONObject composed by key-value pairs:

        requestId -- optional/String or int
        See Also:
        https://binance-docs.github.io/apidocs/websocket_api/en/#log-out-of-the-session