Stream live market data instead of polling. Nexus exposes a SockJS + STOMP WebSocket at /ws/market that relays real-time token prices, DEX swaps, and dApp blueprint events.
There are two ways to get WebSocket access:
- Included with your plan. Scale, Enterprise, and Unlimited plans include streaming using the plan’s own connection and message limits. (Builder and Growth do not include WebSocket access by default.)
- A WebSocket package, attached per API key, which adds streaming to a plan that doesn’t include it or overrides the per-key limits:
| Package | Concurrent connections | Messages / mo |
|---|
| Starter | 2 | 100,000 |
| Pro | 10 | 2,000,000 |
| Unlimited | Unlimited | Unlimited |
Enterprise includes WebSocket Unlimited. Plan access and per-key packages are managed from your account.
Connecting
- Endpoint:
wss://nexus.gerowallet.io/ws/market (SockJS)
- Protocol: STOMP
- Auth: API key via
?access_token=nexus_… query parameter or Authorization: Bearer nexus_… header
Access is checked at connection time. Connections without an allowed package/tier are rejected during the handshake; exceeding your concurrent-connection or monthly-message quota caps or closes the connection.
Topics
Subscribe to these STOMP destinations (server → client):
| Destination | Streams |
|---|
/topic/market/prices | All token prices - sends a current snapshot on subscribe, then live updates |
/topic/market/prices/{assetId} | A single token’s price - snapshot on subscribe, then updates |
/topic/swaps | Global DEX swap events (executed swaps, cancellations, limit-order fills) |
/topic/dapp/{id}/events | Events for a registered blueprint dApp |
Client → server control:
| Destination | Purpose |
|---|
/app/market/unsubscribe | Unsubscribe from a token’s price stream (send the assetId) |
Example
import SockJS from 'sockjs-client';
import { Client } from '@stomp/stompjs';
const client = new Client({
webSocketFactory: () =>
new SockJS('https://nexus.gerowallet.io/ws/market?access_token=nexus_your_api_key_here'),
onConnect: () => {
// Live price for one token (current snapshot arrives first)
client.subscribe('/topic/market/prices/lovelace', (msg) =>
console.log('price', JSON.parse(msg.body)),
);
// Global swap feed
client.subscribe('/topic/swaps', (msg) =>
console.log('swap', JSON.parse(msg.body)),
);
},
});
client.activate();
Each delivered message counts toward your package’s monthly message quota. Subscribe only to the tokens/feeds you need; use /app/market/unsubscribe when you no longer need a per-token stream.