●PUBLIC BETASEPOLIA TESTNET · NO REAL FUNDS · NOT PRODUCTION CUSTODYLearn more →
Vela

Private L3 Feeds

Real-time fills, order updates, and balance changes — visible only to your authenticated session.

What Are Private Feeds?

Public WebSocket channels broadcast anonymized aggregate data: order book snapshots and anonymized trade events. Private channels give authenticated market makers and traders access to their own order-level data — every fill, every order status change, and every balance update — in real time, as it happens.

Private data is never included in public feeds. Other users cannot see your fills, your order sizes, or your balance. The L3 designation refers to order-level granularity: while public L2 data shows aggregated quantities at each price level, L3 data includes individual order events.

Authentication Flow

  1. Connect to the WebSocket endpoint: wss://vela-engine.fly.dev/ws
  2. Send a challenge request:
    { "type": "request_challenge" }
  3. The server responds with a nonce:
    { "type": "challenge", "nonce": "a3f8c1d2e4b5..." }
  4. Sign the nonce using your wallet: personal_sign("vela:auth:{nonce}")
  5. Send the auth message:
    {
      "type": "auth",
      "address": "0xYourAddress",
      "signature": "0x..."
    }
  6. The server recovers your address from the signature and grants private stream access for this WebSocket connection.

Nonce Security

The challenge nonce is single-use and expires after 60 seconds. You cannot reuse a nonce from a previous challenge — the server will reject it. Replay attacks are prevented at the nonce level: even if someone intercepts your authentication message, they cannot use it again.

Private Message Types

Fill

Sent when one of your resting orders is matched. Contains the fill price, size, side, fee, and the order ID.

{
  "type": "fill",
  "order_id": "ord_abc123",
  "market": "ETH-USDC",
  "side": "bid",
  "price": "3200.00",
  "size": "1.000000",
  "fee": "-0.64",
  "timestamp": 1734567890
}

OrderUpdate

Sent when one of your orders changes status — accepted, partially filled, cancelled, or rejected.

BalanceUpdate

Sent after any event that changes your account balance, including fills, fees, rebates, and deposits. Contains per-asset available and locked amounts.

Private channels require re-authentication if the WebSocket connection drops and reconnects. Your strategy should include reconnection logic that repeats the challenge-response flow before resuming order placement.