Skip to main content

Connection

Send a ping every 30 seconds. The server closes idle connections after 60 seconds.

Subscribe / Unsubscribe

Private channels require authentication before subscribing. See Authentication Flow below.

Public Channels

Order Book

Snapshot (sent immediately on subscribe, and on significant changes):
Incremental update:
A quantity of 0 means the price level was removed. Apply updates in seq order. If you detect a gap in sequence numbers, re-subscribe to get a fresh snapshot.

Trades

side is the aggressor (taker) side.

Markets

Private Channel

Authentication Flow

The auth signature message is vela:ws:{address}:{timestamp} (timestamp is Unix seconds, must be within 30 seconds of server time). Step 1 — Send auth:
Signing in Python:
Signing in TypeScript:
Step 2 — Subscribe to account channel:
Auth success response:

Account Channel Message Types

account_snapshot

Sent immediately after subscribing to the account channel. Provides current state.

fill

Sent when one of your orders receives a fill.

order_update

Sent when an order’s status changes.
Possible status values: open, partially_filled, filled, cancelled, rejected. cancelled with no user-initiated cancel means the credit system auto-cancelled the order.

balance_update

Sent when your balance changes.
reason values: fill, order_placed, order_cancelled, deposit, withdrawal.

Sequence Numbers and Gap Detection

All messages include a seq field that increments monotonically per channel. If you receive two messages with non-consecutive sequence numbers, you missed one or more updates. On gap detection: unsubscribe and re-subscribe to the channel to receive a fresh snapshot, then resume applying incremental updates from the new baseline.

Auto-Reconnect Pattern

On reconnect, re-send auth and all subscriptions. The server does not persist subscription state across connections.