Overview

Private WebSocket for real-time account updates and order management.

After authenticating, the server automatically pushes real-time updates for your orders, trade executions, asset balances, positions, and margin calls. You can also place, replace, and cancel orders directly over the same WebSocket connection without needing separate REST API calls.

WebSocket URL: wss://wss.liquiditytech.com/v1/private

Supported exchanges: BINANCE / OKX / EDX


Connection

Connect to the WebSocket URL above and send a login request immediately. All private channels require authentication — the server will not push any data until login succeeds.

The server may disconnect due to cloud service abnormalities or system updates. Implement automatic reconnection logic in your client to handle this gracefully.


Authentication

Send a login message immediately after connecting. All subsequent push data and order actions are only available after a successful login response.

{
    "action": "login",
    "args": {
        "apiKey": "your_api_key",
        "timestamp": "1538054050",
        "sign": "your_signature"
    }
}

Signature: HMAC-SHA256(secret, timestamp + "GET" + "/users/self/verify"), hex-encoded.

import hmac, hashlib, time

timestamp = str(int(time.time()))
message = timestamp + "GET" + "/users/self/verify"
sign = hmac.new(secret.encode(), message.encode(), hashlib.sha256).hexdigest()

Success response:

{ "id": null, "event": "login", "code": 0, "msg": "", "data": null }

Failure response:

{ "event": "error", "code": "60009", "msg": "Login failed." }
FieldTypeRequiredDescription
args.apiKeyStringYesYour API key
args.timestampStringYesCurrent Unix timestamp in seconds
args.signStringYesHMAC-SHA256 signature (see above)
args.onlyTradeBooleanNoDefault false; set true to restrict this connection to order actions only (no push data)

Rate Limits

ActionLimit
Login1 request per second per API key
Place Order1200 requests per 60 seconds
Replace Order300 requests per 60 seconds
Cancel Order1200 requests per 60 seconds
Cancel Orders (Batch)1200 requests per 60 seconds

Heartbeat

The connection will automatically disconnect if no data is received for 30 seconds. Send a ping periodically to keep it alive.

Client ping:

ping

Server response:

pong

Set a timer after each received message. If no data arrives within N seconds (N < 30), send a "ping". If no "pong" is received in response, reconnect.


Available Pages

PageDescription
User DataReal-time push: orders, trades, assets, positions, margin calls
Place OrderSubmit a new order over WebSocket
Replace OrderAmend the price or quantity of an open order
Cancel OrderCancel a single order by order ID or client order ID
Cancel OrdersCancel all open orders, optionally filtered by exchange