WebSocket
The market stream and the market-maker feeds — how to subscribe, what each message carries, and how to detect a missed message.
There are two WebSocket interfaces:
| Address | Use it for | |
|---|---|---|
| Market stream | wss://rpc.vordium.com/ws | prices, positions, funding and the chain's progress |
| Market-maker feeds | wss://rpc.vordium.com/feeds | a book, trades, your orders and your fills, sequenced so a gap is detected |
Market-maker feeds
Subscribe to a channel, receive a snapshot, then updates:
{"method": "subscribe", "channel": "book", "pair": 1}
{"method": "subscribe", "channel": "trades", "pair": 1}
{"method": "subscribe", "channel": "orders", "account": "0x…"}
{"method": "subscribe", "channel": "fills", "account": "0x…"}
{"method": "ping"}Every message carries seq, which only rises, and prev_seq, the seq of the message before it (null on the
snapshot). If prev_seq is not the last seq you hold, you missed a message: subscribe again and start from the new
snapshot. A slow client is disconnected, never silently skipped.
A book snapshot lists bids high to low and asks low to high, each level as [price_8dec, size_18dec]. Updates list
only the levels that changed; a size of "0" removes the level. Trades, orders and fills carry a cursor: to fill a
gap in your own history, read the account's records from the REST API.
Limits: 10 connections per address, 1,000 subscriptions per connection, 2,000 messages a minute.
# pip install vordium==1.4.6
from vordium.feeds import Feeds
feeds = Feeds("wss://testnet.vordex.xyz/chain/feeds") # the SDK resubscribes by itself after a gap
feeds.subscribe("book", pair=1)
for kind, msg in feeds.events():
if kind == "snapshot":
book = feeds.books[1]
print("book snapshot at height", msg.get("height"), "· best bid", book.best_bid(), "· best ask", book.best_ask())
break
feeds.close()Market stream
After connecting, subscribe to what you need (and again after every reconnect):
{"type": "subscribe", "pair_ids": [1, 2], "channels": ["oracle"]}
{"type": "subscribe", "channel": "position"}
{"type": "subscribe", "channel": "commit"}
{"type": "unsubscribe", "all": true}The answer is {"type": "subscribed", "subscriptions": [...]} or {"type": "error", "error": "..."}. A subscribed
connection receives {"type": "heartbeat", "ts": ...} every 10 seconds; drop anything you did not ask for until the
subscribed answer arrives.
| Channel | A message carries |
|---|---|
oracle | pair_id, price (8 decimals), timestamp (seconds) |
commit | height, batch_height, state_root, timestamp (milliseconds) |
position, fill, funding | the account's positions and fills, and funding settlements |
Limits: 256 subscriptions, 600 client messages a minute, 10 connections per address.
Network facts last checked against the network 2026-10-22 13:00:37 UTC · mainnet spec v28 · testnet spec v8