GET /api/v1/ws/usage
Returns WebSocket usage statistics for your account or globally (admin only).
Parameters
self for your own stats, global for all customers (admin tier required).
Max results for customers and top markets lists. Range: 1–100.
Response
Whether the request succeeded.
Unix timestamp (ms) of last update.
Aggregate statistics.
unsubscribe_requests_total
Your usage (present when scope is self).
Top customers (present when scope is global).
# Your usage
curl -H "X-API-Key: YOUR_API_KEY" \
"https://api.parsecapi.com/api/v1/ws/usage"
# Global usage (admin)
curl -H "X-API-Key: YOUR_ADMIN_API_KEY" \
"https://api.parsecapi.com/api/v1/ws/usage?scope=global&limit=10"
{
"success": true,
"data": {
"scope": "self",
"updated_at_ms": 1707044096000,
"totals": {
"active_connections": 2,
"active_subscriptions": 5,
"connections_opened_total": 10,
"connections_closed_total": 8,
"auth_failures_total": 0,
"subscribe_requests_total": 25,
"unsubscribe_requests_total": 20,
"messages_sent_total": 15000,
"bytes_sent_total": 3500000
},
"customer": {
"customer_id": "cust_abc123",
"active_connections": 2,
"active_subscriptions": 5
},
"top_markets": [
{ "parsec_id": "polymarket:0x1234abcd", "subscriptions_total": 3 }
]
}
}
See Also