githubEdit

getrpcinfo - Bitcoin

Example code for the getrpcinfo JSON-RPC method. Complete guide on how to use getrpcinfo JSON-RPC in GetBlock Web3 documentation.

This method returns details about the RPC server.

Parameters

  • none

Request

curl --location --request POST 'https://go.getblock.io/<ACCESS-TOKEN>/' \
--header 'Content-Type: application/json' \
--data-raw '{
    "jsonrpc": "2.0",
    "method": "getrpcinfo",
    "params": [],
    "id": "getblock.io"
}'

Response

{
    "result": {
        "active_commands": [
            {
                "method": "getblock",
                "duration": 78931
            },
            {
                "method": "getrpcinfo",
                "duration": 2860
            }
        ],
        "logpath": "/home/bitcoin/.bitcoin/debug.log"
    },
    "error": null,
    "id": "getblock.io"
}

Response Parameters

Field
Type
Description

active_commands

array

Currently active RPC commands.

active_commands[].method

string

Name of the RPC command.

active_commands[].duration

number

Duration of the command in microseconds.

logpath

string

Path to the debug log file.

Use Case

The getrpcinfo method is essential for:

  • Monitoring active RPC commands

  • Debugging long-running requests

  • Building administrative dashboards

  • Performance analysis

  • Troubleshooting RPC issues

  • Understanding server load

Error Handling

Status Code
Error Message
Cause

403

Forbidden

Missing or invalid ACCESS-TOKEN.

Integration With Web3

The getrpcinfo method helps developers:

  • Monitor RPC server activity

  • Identify long-running commands

  • Build operational monitoring

  • Diagnose performance bottlenecks

  • Track concurrent request patterns

Last updated

Was this helpful?