Skip to main content

ws_auth_args

Function ws_auth_args 

Source
pub fn ws_auth_args(
    api_key: &str,
    api_secret: &str,
    expires_ms: i64,
) -> [String; 3]
Expand description

The args of the WebSocket login: the key, the expires time (milliseconds, in the future) and the signature of GET/realtime{expires}.

§Examples

use brokapi_bybit_protocol::sign::ws_auth_args;

let args = ws_auth_args("key", "secret", 1662350400000);
assert_eq!(args[0], "key");
assert_eq!(args[1], "1662350400000");
assert_eq!(args[2].len(), 64);