Call JSON RPC

Executes Klaytn JSON RPC methods. Supported RPC methods can be found here: KAS Console > Services > Node API

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

Klaytn 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

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": [
    ]
}