Call RPC WebSocket
Hosted RPC WebSocket keeps native chain subscriptions separate from the market stream surface. The current gateway baseline exposes the public EVM websocket family through compatibility-style endpoint URLs, with the API key carried in the path.
Access
Endpoint source
Endpoint pattern
{RPC_WSS_BASE_URL}/v1/{CHAIN_NAME}/{API_KEY}CHAIN_NAME
ethereum | bnbchain | base | arbitrum | optimism | polygonHow to call RPC WebSocket
Prepare the API key
Create the API key first, then keep the full compatibility websocket URL ready.
Pick one chain-family route
Choose one EVM compatibility websocket route for the first successful subscription.
Start with one reviewed topic
Use a reviewed subscription topic first, then widen into more native chain listeners only after the first stream is stable.
Connection examples
EVM
wscat -c "{RPC_WSS_BASE_URL}/v1/ethereum/{api_key}"{
"jsonrpc": "2.0",
"id": 1,
"method": "eth_subscribe",
"params": ["newHeads"]
}Contract notes
- Reviewed websocket topics live under EVM WebSocket API.
- Market events should stay on Use Market WebSocket, not raw RPC WebSocket.
- Public RPC WebSocket onboarding uses compatibility-style URLs such as
/v1/ethereum/{api_key}. - WebSocket upgrade failures return structured JSON error bodies plus
X-Trace-IDandX-Request-IDheaders.
Failure contract
If auth, plan status, or rate limits reject the websocket upgrade, expect an HTTP error response shaped like:
{
"error": {
"code": "AUTH_REQUIRED",
"message": "workspace identity is required",
"trace_id": "trace_123",
"request_id": "req_456",
"retryable": false
}
}Open one chain-family menu
- EVM WebSocket API: open the reviewed EVM subscription tree.
Related pages
Last updated on