WebSocket API reference

Streaming channels for vault metrics, strategy updates and protocol events.

Planned. The api.noderr.xyz public REST/GraphQL/WebSocket API is not yet live. This page documents the planned interface. The live API is https://agent.noderr.xyz. See the Agent Protocol API Reference.

Connection

const ws = new WebSocket('wss://ws.noderr.xyz/v1');

For testnet:

const ws = new WebSocket('wss://ws-testnet.noderr.xyz/v1');

Message format

All messages are JSON:

{
"type": "subscribe",
"channel": "vault.updates",
"params": {
"address": "0x49f747BBac988Cd628a5D79AAdF865EBaDe6a34f"
}
}

Channels

Vault updates

Vault metrics in real time:

{
"type": "subscribe",
"channel": "vault.updates",
"params": {
"address": "0x49f747BBac988Cd628a5D79AAdF865EBaDe6a34f"
}
}

Events:

{
"channel": "vault.updates",
"event": "tvl_change",
"data": {
"address": "0x49f747BBac988Cd628a5D79AAdF865EBaDe6a34f",
"tvl": "1250000000000000000000",
"pricePerShare": "1041666666666666666",
"timestamp": 1703721600
}
}

Vault transactions

Deposit and withdraw events:

{
"type": "subscribe",
"channel": "vault.transactions",
"params": {
"address": "0x49f747BBac988Cd628a5D79AAdF865EBaDe6a34f"
}
}

Events:

  • deposit_requested - New deposit request (ERC-7540)
  • deposit_fulfilled - Deposit fulfilled by validator
  • deposit_claimed - User claimed shares
  • redeem_requested - New redeem request
  • redeem_fulfilled - Redeem fulfilled
  • redeem_claimed - User claimed assets

Strategy updates

Strategy performance updates:

{
"type": "subscribe",
"channel": "strategy.updates"
}

Node network

Node status updates:

{
"type": "subscribe",
"channel": "nodes.status"
}

Protocol metrics

Aggregate protocol metrics:

{
"type": "subscribe",
"channel": "protocol.metrics"
}

Heartbeat

The server sends a heartbeat every 30 seconds:

{
"type": "heartbeat",
"timestamp": 1703721600
}

Respond with:

{
"type": "pong"
}

Unsubscribe

{
"type": "unsubscribe",
"channel": "vault.updates",
"params": {
"address": "0x49f747BBac988Cd628a5D79AAdF865EBaDe6a34f"
}
}

Errors

{
"type": "error",
"code": "INVALID_CHANNEL",
"message": "Channel not found"
}

Example JavaScript client

const ws = new WebSocket('wss://ws.noderr.xyz/v1');
ws.onopen = () => {
// Subscribe to vault updates
ws.send(JSON.stringify({
type: 'subscribe',
channel: 'vault.updates',
params: {
address: '0x49f747BBac988Cd628a5D79AAdF865EBaDe6a34f'
}
}));
};
ws.onmessage = (event) => {
const data = JSON.parse(event.data);
if (data.type === 'heartbeat') {
ws.send(JSON.stringify({ type: 'pong' }));
return;
}
console.log('Received:', data);
};
ws.onerror = (error) => {
console.error('WebSocket error:', error);
};

Last updated: December 2025

results matching ""
    No results matching ""