Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,10 @@ private void flushMessageQueue() {
public void onMessage(String msg) throws JsonProcessingException {
if (requiresAuthentication(path) && msg.contains("\"op\":\"auth\"")) {
// Check if authentication was successful
isAuthenticated = msg.contains("\"retCode\":0");
// Bybit demo trading WS responds with {"success":true,...} (no retCode);
// upstream issue #63 — accept either signal as auth success.
isAuthenticated = msg.contains("\"retCode\":0")
|| (msg.contains("\"success\":true") && msg.contains("\"op\":\"auth\""));
if (isAuthenticated) {
LOGGER.info("Authentication successful.");
flushMessageQueue(); // Send queued messages after successful authentication
Expand Down