π Generic JSON-RPC proxy to ETH node
Code samples
POST /api/v1/eth/jsonrpc
Proxies any valid Ethereum JSON-RPC 2.0 request to the configured ETH node. The request body is forwarded as-is and the node's response is returned.
Body parameter
{
"jsonrpc": "2.0",
"method": "eth_blockNumber",
"params": [
null
],
"id": null
}
π οΈ Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| body | body | any | true | none |
Example responses
200 Response
{}
π Responses
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | JSON-RPC response from ETH node | Inline |
| 500 | Internal Server Error | ETH node URL is not configured or node is not reachable | EthJsonRpcError |
π Response Schema
Schemas
EthBlock
{
"number": "0x1234abcd",
"hash": 0,
"parentHash": "string",
"nonce": "string",
"sha3Uncles": "string",
"logsBloom": "string",
"transactionsRoot": "string",
"stateRoot": "string",
"receiptsRoot": "string",
"miner": "string",
"difficulty": "string",
"totalDifficulty": "string",
"extraData": "string",
"size": "string",
"gasLimit": "string",
"gasUsed": "string",
"timestamp": "string",
"baseFeePerGas": "string",
"transactions": [
"string"
],
"uncles": [
"string"
]
}
Ethereum block object as returned by eth_getBlockByNumber / eth_getBlockByHash. All numeric quantities are hex strings (QUANTITY).
π οΈ Properties
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| number | string¦null | false | none | Block number as hex QUANTITY, or null for pending blocks. |
| hash | string¦null | false | none | Hash of the block, or null for pending blocks. |
| parentHash | string | false | none | Hash of the parent block. |
| nonce | string¦null | false | none | none |
| sha3Uncles | string | false | none | none |
| logsBloom | string¦null | false | none | none |
| transactionsRoot | string | false | none | none |
| stateRoot | string | false | none | none |
| receiptsRoot | string | false | none | none |
| miner | string | false | none | Address of the block proposer/miner. |
| difficulty | string | false | none | none |
| totalDifficulty | string | false | none | none |
| extraData | string | false | none | none |
| size | string | false | none | none |
| gasLimit | string | false | none | none |
| gasUsed | string | false | none | none |
| timestamp | string | false | none | Block timestamp as hex QUANTITY. |
| baseFeePerGas | string¦null | false | none | none |
| transactions | [oneOf] | false | none | Array of transaction hashes or transaction objects. |
oneOf
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| Β» anonymous | string | false | none | none |
xor
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| Β» anonymous | EthTransaction | false | none | Ethereum transaction object as returned by eth_getTransactionByHash. |
continued
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| uncles | [string] | false | none | none |
EthTransaction
{
"hash": "string",
"nonce": "string",
"blockHash": "string",
"blockNumber": "string",
"transactionIndex": "string",
"from": "string",
"to": "string",
"value": "string",
"gas": "string",
"gasPrice": "string",
"maxFeePerGas": "string",
"maxPriorityFeePerGas": "string",
"input": "string",
"type": "string",
"chainId": "string",
"v": "string",
"r": "string",
"s": "string"
}
Ethereum transaction object as returned by eth_getTransactionByHash.
π οΈ Properties
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| hash | string | false | none | Transaction hash. |
| nonce | string | false | none | Nonce as hex QUANTITY. |
| blockHash | string¦null | false | none | none |
| blockNumber | string¦null | false | none | none |
| transactionIndex | string¦null | false | none | none |
| from | string | false | none | Sender address. |
| to | string¦null | false | none | Recipient address, or null for contract creation. |
| value | string | false | none | Amount of wei sent, as hex QUANTITY. |
| gas | string | false | none | none |
| gasPrice | string¦null | false | none | none |
| maxFeePerGas | string¦null | false | none | none |
| maxPriorityFeePerGas | string¦null | false | none | none |
| input | string | false | none | Input data (call data) as hex string. |
| type | string | false | none | Transaction type (0x0 legacy, 0x1, 0x2, 0x3...) |
| chainId | string¦null | false | none | none |
| v | string | false | none | none |
| r | string | false | none | none |
| s | string | false | none | none |
EthLog
{
"address": "string",
"topics": [
"string"
],
"data": "string",
"blockNumber": "string",
"transactionHash": "string",
"transactionIndex": "string",
"blockHash": "string",
"logIndex": "string",
"removed": true
}
Ethereum log object from transaction receipt.
π οΈ Properties
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| address | string | false | none | none |
| topics | [string] | false | none | none |
| data | string | false | none | none |
| blockNumber | string | false | none | none |
| transactionHash | string | false | none | none |
| transactionIndex | string | false | none | none |
| blockHash | string | false | none | none |
| logIndex | string | false | none | none |
| removed | boolean | false | none | none |
EthTransactionReceipt
{
"transactionHash": "string",
"transactionIndex": "string",
"blockHash": "string",
"blockNumber": "string",
"from": "string",
"to": "string",
"cumulativeGasUsed": "string",
"effectiveGasPrice": "string",
"gasUsed": "string",
"contractAddress": "string",
"logs": [
{
"address": "string",
"topics": [
"string"
],
"data": "string",
"blockNumber": "string",
"transactionHash": "string",
"transactionIndex": "string",
"blockHash": "string",
"logIndex": "string",
"removed": true
}
],
"logsBloom": "string",
"status": "string",
"type": "string"
}
Ethereum transaction receipt object from eth_getTransactionReceipt.
π οΈ Properties
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| transactionHash | string | false | none | none |
| transactionIndex | string | false | none | none |
| blockHash | string | false | none | none |
| blockNumber | string | false | none | none |
| from | string | false | none | none |
| to | string¦null | false | none | none |
| cumulativeGasUsed | string | false | none | none |
| effectiveGasPrice | string | false | none | none |
| gasUsed | string | false | none | none |
| contractAddress | string¦null | false | none | none |
| logs | [EthLog] | false | none | [Ethereum log object from transaction receipt.] |
| logsBloom | string | false | none | none |
| status | string | false | none | 0x1 for success, 0x0 for failure. |
| type | string | false | none | none |
EthTransactionRequest
{
"from": "string",
"to": "string",
"gas": "string",
"gasPrice": "string",
"maxFeePerGas": "string",
"maxPriorityFeePerGas": "string",
"value": "string",
"data": "string",
"nonce": "string"
}
Ethereum transaction parameters used with eth_call, eth_estimateGas and eth_sendTransaction.
π οΈ Properties
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| from | string | false | none | Sender address. |
| to | string¦null | false | none | Recipient address, or null for contract creation. |
| gas | string | false | none | Gas limit as hex QUANTITY. |
| gasPrice | string | false | none | Legacy gas price as hex QUANTITY. |
| maxFeePerGas | string | false | none | EIP-1559 max fee per gas as hex QUANTITY. |
| maxPriorityFeePerGas | string | false | none | EIP-1559 priority fee per gas as hex QUANTITY. |
| value | string | false | none | Amount of wei to send as hex QUANTITY. |
| data | string | false | none | Call data or contract deployment bytecode. |
| nonce | string | false | none | Nonce as hex QUANTITY. |
EthJsonRpcRequest
{
"jsonrpc": "2.0",
"method": "eth_blockNumber",
"params": [
null
],
"id": null
}
Generic Ethereum JSON-RPC 2.0 request.
π οΈ Properties
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| jsonrpc | string | true | none | none |
| method | string | true | none | Ethereum JSON-RPC method name (e.g. eth_blockNumber). |
| params | [any] | true | none | Positional parameters for the method. |
| id | any | false | none | Request identifier (string, number, or null). |
Enumerated Values
| Property | Value |
|---|---|
| jsonrpc | 2.0 |
EthJsonRpcError
{
"error": {
"code": -32603,
"message": "Failed to connect to ETH node"
}
}
Error response used when ETH JSON-RPC proxy fails.
π οΈ Properties
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| error | object | false | none | none |
| Β» code | integer | false | none | none |
| Β» message | string | false | none | none |