Connect to a MEVX-operated BSC node over WebSocket for standard JSON-RPC
calls and real-time subscriptions.
Supported Methods and CU Cost
WebSocket billing is based on delivered data. Successful billable responses and
notifications use 5 CU per 100,000 JSON bytes delivered.
| Method | CU cost |
|---|---|
eth_blockNumber | 5 CU / 100 KB |
eth_call | 5 CU / 100 KB |
eth_chainId | 5 CU / 100 KB |
eth_createAccessList | 5 CU / 100 KB |
eth_estimateGas | 5 CU / 100 KB |
eth_feeHistory | 5 CU / 100 KB |
eth_gasPrice | 5 CU / 100 KB |
eth_getBalance | 5 CU / 100 KB |
eth_getBlockByHash | 5 CU / 100 KB |
eth_getBlockByNumber | 5 CU / 100 KB |
eth_getBlockReceipts | 5 CU / 100 KB |
eth_getBlockTransactionCountByHash | 5 CU / 100 KB |
eth_getBlockTransactionCountByNumber | 5 CU / 100 KB |
eth_getCode | 5 CU / 100 KB |
eth_getFinalizedBlock | 5 CU / 100 KB |
eth_getFinalizedHeader | 5 CU / 100 KB |
eth_getRawTransactionByHash | 5 CU / 100 KB |
eth_getStorageAt | 5 CU / 100 KB |
eth_getTransactionByBlockHashAndIndex | 5 CU / 100 KB |
eth_getTransactionByBlockNumberAndIndex | 5 CU / 100 KB |
eth_getTransactionByHash | 5 CU / 100 KB |
eth_getTransactionCount | 5 CU / 100 KB |
eth_getTransactionReceipt | 5 CU / 100 KB |
eth_getUncleCountByBlockHash | 5 CU / 100 KB |
eth_getUncleCountByBlockNumber | 5 CU / 100 KB |
eth_maxPriorityFeePerGas | 5 CU / 100 KB |
eth_mining | 5 CU / 100 KB |
eth_sendRawTransaction | 5 CU / 100 KB |
eth_syncing | 5 CU / 100 KB |
net_listening | 5 CU / 100 KB |
net_peerCount | 5 CU / 100 KB |
net_version | 5 CU / 100 KB |
web3_clientVersion | 5 CU / 100 KB |
web3_sha3 | 5 CU / 100 KB |
Subscriptions
| Method | Subscription type | CU cost |
|---|---|---|
eth_subscribe | newHeads | 5 CU / 100 KB |
eth_subscribe | logs | 5 CU / 100 KB |
eth_unsubscribe | — | 0 CU |
eth_unsubscribe remains available after CU quota exhaustion so clients can
release subscriptions. The credential must remain active, the subscription must
belong to the current WebSocket session, and request-rate limits still apply.
For logs, include a non-empty address or topics filter. Pending-transaction,
Trace, Debug, transaction-pool, filter, proof, blob-sidecar, broad log-scan, and
unbounded multi-call methods are denied by default.
Connect
wscat -c "wss://api.mevx.io/saas/ws/v1/bsc"
-H "X-API-KEY: YOUR_API_KEY"Send one JSON-RPC object per text message:
{
"jsonrpc": "2.0",
"id": 1,
"method": "eth_subscribe",
"params": ["newHeads"]
}Browser WebSocket clients cannot add the X-API-KEY handshake header. Connect
from your backend to keep the key out of client-side code.
Session Rules
- Batches and binary messages are not supported
- Maximum inbound message size: 1 MiB; maximum outbound message size: 10 MiB
- Respond to server pings with pongs
- Reconnect with backoff and recreate subscriptions
- Process messages promptly; slow consumers are disconnected
| Time | Status | User Agent | |
|---|---|---|---|
Retrieving recent requests… | |||
101Connection established. The client can now exchange JSON-RPC 2.0 text messages over the WebSocket.