Skip to main content

Module auth

Module auth 

Source
Expand description

WebSocket authentication for Bybit V5 private channels.

Authentication is required for private WebSocket topics (position, execution, order, wallet). The process:

  1. Generate an expires timestamp (current ms + 10 seconds)
  2. Sign the expires value with HMAC-SHA256 using the API secret
  3. Send {"op": "auth", "args": [api_key, expires, signature]}

Functionsยง

generate_auth_params
Generate WebSocket authentication parameters.