Reference
Standard Ethereum JSON-RPC 2.0 over HTTPS. One endpoint per chain. Compatible with ethers.js, viem, web3.js, and any EVM toolchain.
HTTP method
POST https://rpc.kubernodes.com/{chainSlug}
Headers
X-API-Key: pk_live_YOUR_KEY Content-Type: application/json
Pass your API key in the X-API-Key header. Keys are prefixed pk_live_ for production and pk_test_ for test environment.
curl -X POST https://rpc.kubernodes.com/eth \
-H "X-API-Key: pk_live_YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}'{
"jsonrpc": "2.0",
"method": "eth_getBalance",
"params": ["0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96044", "latest"],
"id": 1
}id can be any string or number — it is echoed back unchanged in the response.
Send an array to execute multiple calls in a single HTTP round trip. Responses are returned as an array in the same order.
curl -X POST https://rpc.kubernodes.com/eth-mainnet \
-H "X-API-Key: pk_live_YOUR_KEY" \
-H "Content-Type: application/json" \
-d '[
{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1},
{"jsonrpc":"2.0","method":"eth_gasPrice","params":[],"id":2}
]'
// Response:
[
{"jsonrpc":"2.0","id":1,"result":"0x14aB4F2"},
{"jsonrpc":"2.0","id":2,"result":"0x5D21DBA00"}
]eth_blockNumberReturns the current block number.
params
[]result
"0x14aBcD5" // hex block numbereth_getBalanceReturns the balance in wei for an address at a given block.
params
["0xAddress", "latest"]result
"0x14aBcD5" // wei as hexeth_gasPriceReturns the current gas price in wei.
params
[]result
"0x5d21dba00" // hex weieth_maxPriorityFeePerGasReturns the current max priority fee (tip) per gas. EIP-1559 chains only.
params
[]result
"0x3b9aca00"eth_getTransactionCountReturns the number of transactions from an address (the nonce for its next tx).
params
["0xAddress", "latest"]result
"0x2a" // hex nonceeth_getBlockByNumberReturns a block by number. Pass true as the second param for full Transaction objects.
params
["latest", false]result
{ number, hash, transactions: ["0x..."], ... }eth_getBlockByHashReturns a block by hash.
params
["0xBlockHash", false]result
{ number, hash, ... }eth_getTransactionByHashReturns a transaction by hash. Returns null if not found.
params
["0xTxHash"]result
{ hash, from, to, value, input, ... } | nulleth_getTransactionReceiptReturns the receipt for a mined transaction. Returns null if still pending.
params
["0xTxHash"]result
{ status: "0x1", blockNumber, gasUsed, logs, ... } | nulleth_callExecutes a message call (no state change). Used for contract reads.
params
[{ "to": "0x...", "data": "0x..." }, "latest"]result
"0x000...result" // ABI-encoded hexeth_estimateGasEstimates gas for a transaction. Reverts if the tx would fail.
params
[{ "to": "0x...", "data": "0x..." }]result
"0x5208" // 21000 for plain ETH transfereth_getLogsReturns logs matching a filter. Use blockHash OR fromBlock+toBlock, not both.
params
[{ "address": "0x...", "topics": ["0x..."], "fromBlock": "0xEC4E20" }]result
[{ address, topics, data, blockNumber, transactionHash, logIndex, removed }, ...]eth_sendRawTransactionBroadcasts a signed transaction. Returns the transaction hash immediately (before mining).
params
["0x02f8...signedTxHex"]result
"0xTxHash"eth_chainIdReturns the chain ID as hex.
params
[]result
"0x1" // Ethereum mainneteth_getCodeReturns the bytecode at a contract address. Returns "0x" for EOA addresses.
params
["0xContractAddress", "latest"]result
"0x6060..." // deployed bytecodeeth_getStorageAtReturns the value at a storage slot for a contract.
params
["0xContractAddress", "0x0", "latest"]result
"0x000...value"net_versionReturns the network ID as a string.
params
[]result
"1"Standard JSON-RPC errors use the error field instead of result. HTTP-level errors (401, 404, 429) are also returned.
{
"jsonrpc": "2.0",
"id": 1,
"error": {
"code": -32602,
"message": "Invalid params: expected 2 arguments"
}
}| Code | Name | Description |
|---|---|---|
| -32700 | Parse error | Request body is not valid JSON. |
| -32600 | Invalid Request | JSON-RPC envelope is malformed (missing jsonrpc, method, or id). |
| -32601 | Method not found | The requested RPC method is not supported. |
| -32602 | Invalid params | Method params are the wrong type or count. |
| -32603 | Internal error | Upstream node returned an unexpected error. |
| 3 | Execution reverted | Smart contract call reverted. data field contains revert reason. |
| 401 | Unauthorized | Missing or invalid X-API-Key. |
| 429 | Rate limited | Request limit exceeded. Retry after the value in Retry-After header. |
| 404 | Chain not found | The chain slug in the URL is not recognized. |
import { JsonRpcProvider } from "ethers";
const provider = new JsonRpcProvider(
"https://rpc.kubernodes.com/eth-mainnet",
undefined,
{ headers: { "X-API-Key": process.env.KN_API_KEY } }
);
const block = await provider.getBlockNumber();import { createPublicClient, http } from "viem";
import { mainnet } from "viem/chains";
const client = createPublicClient({
chain: mainnet,
transport: http("https://rpc.kubernodes.com/eth-mainnet", {
fetchOptions: { headers: { "X-API-Key": process.env.KN_API_KEY } },
}),
});
const block = await client.getBlockNumber();