ChainBridge Nodes · Reference

JSON-RPC reference

ChainBridge Nodes is fully compatible with standard JSON-RPC 2.0. No client changes: point your client at a ChainBridge endpoint and add an API key. Routing, retries, circuit breaking, and rate limiting all happen in the gateway.

Endpoints and chain identifiers

ProtocolEndpointDescription
HTTPPOST /rpc/{chain}Standard JSON-RPC 2.0 with batch array support
WebSocketWS /ws/{chain}Subscribe to new blocks, logs, and pending transactions. Opens chain by chain, following the enabled-capability list (see Supported Networks). Chains not yet enabled return 501 and are not billed.
Health checkGET /healthzNo auth. Liveness probe only — returns no customer data.
{chain}
Short chain identifier, such as ethereum、bsc、 base、arbitrum、solana. See the Supported Networks page for the full list.
Authentication
Authorization: Bearer cs_live_xxx; keep the key on the server only.
Request ID
Every response includes X-Request-Id; include it when you contact support.
Unsupported chain
Returns 400301; unsupported methods return 400302。

Request examples

Read a balance and send a signed transaction
# read balance
curl -sS https://YOUR-GATEWAY-DOMAIN/rpc/ethereum \
  -H "Authorization: Bearer cs_live_xxx" \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","id":1,"method":"eth_getBalance","params":["0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045","latest"]}'

# broadcast a transaction you signed yourself (ChainBridge never signs on your behalf)
curl -sS https://YOUR-GATEWAY-DOMAIN/rpc/ethereum \
  -H "Authorization: Bearer cs_live_xxx" \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","id":2,"method":"eth_sendRawTransaction","params":["0x02f8..."]}'

Replace YOUR-GATEWAY-DOMAIN with the gateway domain your deployer provides.

Methods and compute unit weights

The weight table carries a version and effective date, so invoices can be recomputed under the original rules. Supported method sets differ by chain; below are the methods and weights currently in effect.

Batch requests and WebSocket

Batch requests

Send a JSON array as the request body; the response is an array in matching order.

  • · Each element is metered separately, not once per batch
  • · A failed element does not affect the others; errors are returned per item
  • · Exceeding the payload size limit triggers 400018; split the batch into smaller requests

WebSocket subscriptions

Connect to /ws/{chain} then send a standard subscription request. WebSocket and archive are standard features, enabled chain by chain. Chains without them return 501 with an explanation and bill nothing.

  • · Billed by connection time: 1 CU per connection per minute
  • · Subscription messages are billed per message; reconnecting the same session within 5 minutes incurs no second connection fee
  • · Connections idle for more than 10 minutes are closed by the server; clients must implement reconnection

Error codes

CodeHTTPMeaningWhat to do
400300503Node service temporarily unavailableFailover is automatic; retry once
400301400Unsupported chainSee the Supported Networks page for the list
400302400Unsupported RPC methodCheck whether the method is allowed for your plan and chain
400303400Archive queries not enabledEnable archive per chain in the console
400304429Upstream node rate limitRetried or degraded automatically; try again later
400016429Rate limit hit on your sideBack off using Retry-After and retry
400018413Payload too largeShrink the request body or split the batch
400032403Plan quota exceededUpgrade your plan or wait for the next billing period
500003500Internal system errorRecord X-Request-Id and contact support

FAQ

No. ChainBridge Nodes only relays raw transactions you signed yourself (eth_sendRawTransaction). We never hold or custody assets, and never ask for private keys or seed phrases. Any page that asks for your private key is not us.

Node costs differ by chain: specs, archive requirements, response size. Weight tables are versioned per chain, and invoices are recomputed with the version in effect at call time.

No. Failed requests cost nothing, and cache hits bill zero CU.

The gateway probes block height and latency on every route. Past the lag threshold it fails over automatically, so your requests land on a healthier route with no code changes.