Call JSON RPC

Executes Kaia (=Klaytn) JSON RPC methods. Supported RPC methods can be found here: KAS Console > Services > Node API. Its path /v1/klaytn remains as before for compatibility.

Request
Security:
header Parameters
x-chain-id
required
string

Kaia Network Chain ID (1001 or 8217)

Request Body schema: application/json

JsonRpcRequest

id
required
integer <int64>

RPC request ID

jsonrpc
string

JSON RPC version

method
required
string

RPC method to execute. Supports both klay_ and kaia_ prefixes

Array of objects

Parameter array for executing RPC method

Responses
200

The request is successful.

400

The request is not valid.

401

The credential you provided is invalid.

post/v1/klaytn
Request samples
application/json
{
  • "id": 1,
  • "jsonrpc": "2.0",
  • "method": "klay_blockNumber",
  • "params": [ ]
}
Response samples
application/json

The request is successful.

{
  • "jsonrpc": "2.0",
  • "id": 73,
  • "result": [
    ]
}