JSON-RPC
Every chain and network exposes JSON-RPC over HTTP POST. Copy the target Gateway Access Point from the dashboard.
Request format
The Gateway accepts one strict JSON-RPC 2.0 object:
{
"jsonrpc": "2.0",
"id": 1,
"method": "eth_blockNumber",
"params": []
}Requirements:
jsonrpcmust be the string"2.0";methodmust be a non-empty string;params, when present, must be an array or object;id, when present, must be a string, integer, ornull;- top-level batch arrays are not supported.
Send Content-Type: application/json. A body over the deployment limit receives HTTP 413; a body-read timeout receives HTTP 408.
Request execution order
After authentication and admission, the Gateway classifies the request against Accelerator and checks the shared cache:
- A cache hit returns the shared result immediately.
- On a miss, a route with a usable Endpoint forwards to the selected target.
- On a miss without an Endpoint, the Gateway returns
-32004 No available Endpoint.
A method outside the Accelerator policy goes directly to the route. The complete RPC Method Catalog is not the Endpoint-free method list.
Protocol examples
Set an Access Point without a Path Key and an App Key first:
export RPC_URL='<access_point_without_path_key>'
export APP_API_KEY='<app_api_key>'EVM:
curl "$RPC_URL" -H "Authorization: Bearer $APP_API_KEY" \
-H 'Content-Type: application/json' \
--data '{"jsonrpc":"2.0","id":1,"method":"eth_blockNumber","params":[]}'Solana:
curl "$RPC_URL" -H "Authorization: Bearer $APP_API_KEY" \
-H 'Content-Type: application/json' \
--data '{"jsonrpc":"2.0","id":1,"method":"getSlot","params":[{"commitment":"finalized"}]}'Bitcoin or Litecoin:
curl "$RPC_URL" -H "Authorization: Bearer $APP_API_KEY" \
-H 'Content-Type: application/json' \
--data '{"jsonrpc":"2.0","id":1,"method":"getblockchaininfo","params":[]}'TRON JSON-RPC:
curl "$RPC_URL" -H "Authorization: Bearer $APP_API_KEY" \
-H 'Content-Type: application/json' \
--data '{"jsonrpc":"2.0","id":1,"method":"eth_blockNumber","params":[]}'After an Accelerator miss, the Gateway forwards the method to an Endpoint selected by the route. A valid upstream JSON-RPC application error is final and does not trigger failover.
Notifications
Omitting id creates a notification:
{"jsonrpc":"2.0","method":"eth_sendRawTransaction","params":["0x..."]}The Gateway returns HTTP 204 with no response body. A client cannot use a notification to determine whether the upstream ultimately accepted a call.
A notification also cannot reveal an Accelerator miss, so do not use it for Endpoint-free calls.
Response handling
Regular success responses and JSON-RPC errors normally both use HTTP 200. Inspect result or error:
{"jsonrpc":"2.0","id":1,"error":{"code":-32004,"message":"No available Endpoint.","data":{"type":"gateway_error"}}}See Errors and troubleshooting for the complete Gateway error table.
Not supported
- JSON-RPC batch requests;
- WebSocket subscriptions and
ws://orwss://Endpoints; - public gRPC;
- methods or historical data that the configured upstream does not provide.