⌘/
Live
← Back to Docs

API Reference

Technical

All available API endpoints with request/response examples

Base URL

https://opue.vercel.app

pNodes

Retrieve pNode data from the Xandeum network

GET/api/pnodes

Get all pNodes with their current status and metrics

View example response
{
  "pnodes": [{
    "id": "6cXp...",
    "pubkey": "6cXp...",
    "address": "192.190.136.28",
    "status": "online",
    "version": "2.0.15",
    "storage": { "total": 100, "used": 0.05, "available": 99.95 },
    "performance": { "uptime": 99.8, "latency": 45, "score": 95 },
    "location": { "city": "Frankfurt", "country": "Germany", "region": "Europe" }
  }],
  "total": 25
}
GET/api/pnodes/[id]

Get detailed information for a specific pNode

Parameters

id(string)pNode pubkey or address
View example response
{
  "id": "6cXp...",
  "pubkey": "6cXp...",
  "address": "192.190.136.28",
  "status": "online",
  "version": "2.0.15",
  "storage": { "total": 100, "used": 0.05, "available": 99.95, "unit": "GB" },
  "performance": { "uptime": 99.8, "latency": 45, "score": 95, "cpu": 12.5, "ram": 50 },
  "network": { "packetsIn": 1500000, "packetsOut": 1200000, "peers": 8 },
  "location": { "city": "Frankfurt", "country": "Germany", "lat": 50.11, "lon": 8.68 }
}

Network Stats

Network-wide statistics and metrics

GET/api/network-stats

Get aggregated network statistics

View example response
{
  "totalPNodes": 25,
  "onlinePNodes": 23,
  "totalStorage": 2500,
  "usedStorage": 125,
  "averagePerformance": 94.5,
  "averageLatency": 42,
  "networkHealth": 98,
  "epoch": { "current": 27, "slot": 8598, "progress": 0.85 }
}

pRPC Proxy

Proxy for Xandeum RPC calls (avoids CORS)

POST/api/prpc

Forward RPC requests to Xandeum network

Request Body

{
  "method": "getClusterNodes" | "getEpochInfo" | "getVoteAccounts",
  "params": []
}
View example response
{
  "jsonrpc": "2.0",
  "result": {...},
  "id": 1
}

Analytics

Historical data, predictions, and analysis

GET/api/analytics/history

Get 30-day historical network data

Parameters

days(number)Number of days (default: 30)
View example response
{
  "history": [{
    "date": "2024-12-01",
    "totalPNodes": 20,
    "onlinePNodes": 18,
    "totalStorage": 2000,
    "avgPerformance": 92
  }]
}
GET/api/analytics/anomalies

Get detected anomalies in the network

View example response
{
  "anomalies": [{
    "id": "anom_123",
    "type": "performance_drop",
    "severity": "warning",
    "pnodeId": "6cXp...",
    "message": "Performance dropped 15% in last hour",
    "detectedAt": "2024-12-15T10:30:00Z"
  }]
}
GET/api/analytics/predictions

Get 7-day and 30-day network predictions

View example response
{
  "predictions": {
    "7day": { "pnodes": 28, "storage": 2800, "confidence": 0.85 },
    "30day": { "pnodes": 35, "storage": 3500, "confidence": 0.72 }
  }
}
GET/api/analytics/leaderboard

Get top performing pNodes

Parameters

limit(number)Number of results (default: 10)
View example response
{
  "leaderboard": [{
    "rank": 1,
    "pnodeId": "6cXp...",
    "score": 98.5,
    "uptime": 99.9,
    "storage": 100
  }]
}
GET/api/analytics/pnode/[pubkey]

Get historical analytics for a specific pNode

Parameters

pubkey(string)pNode public key
GET/api/analytics/quant

Get quantitative analysis (correlations, regressions)

View example response
{
  "correlations": { "uptime_performance": 0.85, "storage_score": 0.62 },
  "regressions": { "growth_rate": 0.12, "r_squared": 0.78 }
}
GET/api/analytics/events

Get recent network events

Alerts

Alert management and notification rules

GET/api/alerts

Get all alerts

Parameters

status(string)Filter by status: active, resolved, all
type(string)Filter by alert type
View example response
{
  "alerts": [{
    "id": "alert_123",
    "type": "pnode_offline",
    "severity": "critical",
    "pnodeId": "6cXp...",
    "message": "pNode went offline",
    "status": "active",
    "createdAt": "2024-12-15T10:30:00Z"
  }]
}
POST/api/alerts

Create a new alert

Request Body

{
  "type": "pnode_offline" | "pnode_performance_drop" | "pnode_storage_full",
  "pnodeId": "6cXp...",
  "threshold": 90,
  "message": "Custom alert message"
}
GET/api/alerts/rules

Get configured alert rules

POST/api/alerts/rules

Create or update alert rules

Request Body

{
  "type": "pnode_performance_drop",
  "threshold": 85,
  "enabled": true,
  "notification": { "browser": true, "email": false }
}

AI Chat

AI-powered chat for network queries

GET/api/chat

Health check for chat endpoint

View example response
{ "status": "ok", "model": "gpt-4o" }
POST/api/chat

Send a message to the AI assistant (streaming response)

Request Body

{
  "messages": [
    { "role": "user", "content": "Show me the network health" }
  ]
}
View example response
Streaming text response with tool calls for:
- get_pnodes
- get_network_stats
- get_pnode_details
- search_pnodes
- get_epoch_info
- get_validators