Skip to main content

build_websocket_api_message

Function build_websocket_api_message 

Source
pub fn build_websocket_api_message(
    configuration: &ConfigurationWebsocketApi,
    method: &str,
    payload: BTreeMap<String, Value>,
    options: &WebsocketMessageSendOptions,
    skip_auth: bool,
) -> (String, Value)
Expand description

Builds a WebSocket API message with optional authentication and signature generation.

§Arguments

  • configuration - Configuration for the WebSocket API
  • method - The API method to be called
  • payload - A map of parameters for the API request
  • options - Options for sending the WebSocket message
  • skip_auth - Flag to skip authentication if true

§Returns

A tuple containing the message ID and the constructed JSON request

§Panics

Panics if an API key is required but not set, or if signature generation fails