getnetworkinfo - Bitcoin

getnetworkinfo. Retrieves detailed information about the Bitcoin node's network status, including protocol version, number of connected peers, network services, relay fees.

getnetworkinfo - bitcoin [Value: 0CU]
Returns network-related information.
Use cases

Use cases

  • Access Bitcoin network data
  • Interact with Bitcoin blockchain
  • Perform transactions and network operations
Constraints

Constraints

  • Requires a running Bitcoin node
  • Depends on node synchronization
  • RPC methods vary by node configuration
Get started
Unlock Access to 50+ chains
Boost your app's speed and reliability with dRPC - get your access API key

Language

Request
Examples
curl  https://bitcoin.drpc.org \
  -X POST \
  -H "Content-Type: application/json" \
  --data '{ "jsonrpc": "1.0", "id": "curltest", "method": "getnetworkinfo", "params": [] }'
Copy
Response
200
{
    "jsonrpc": "1.0",
    "id": "curltest",
    "result": {
        "version": 180100,
        "subversion": "/Satoshi:0.18.1/",
        "protocolversion": 70015,
        "localservices": "000000000000000f",
        "timeoffset": 0,
        "connections": 8,
        "networks": [
            {
                "name": "ipv4",
                "limited": false,
                "reachable": true,
                "proxy": "",
                "proxy_randomize_credentials": false
            }
        ],
        "relayfee": 0.00001000,
        "localaddresses": [
            {
                "address": "192.168.1.2",
                "port": 8333
            }
        ],
        "warnings": ""
    }
}
Copy

Request params

idinteger
jsonrpcstring
methodstring
ParametersThis method does not accept any parameters.

Response

200

Response params

object
versionnumeric
The server version.
subversionstring
The server subversion string.
protocolversionnumeric
The protocol version.
localservicesstring
The services we offer to the network (in hexadecimal format).
localservicesnamesarray
The services we offer to the network, in human-readable form.
localrelayboolean
True if transaction relay is requested from peers.
timeoffsetnumeric
The time offset.
connectionsnumeric
The total number of connections.
connections_innumeric
The number of inbound connections.
connections_outnumeric
The number of outbound connections.
networkactiveboolean
Whether P2P networking is enabled.
networksarray
Information per network.
object
namestring
Network (ipv4, ipv6, or onion).
limitedboolean
Indicates if the network is limited using -onlynet.
reachableboolean
Indicates if the network is reachable.
proxystring
The proxy used for this network, or empty if none.
proxy_randomize_credentialsboolean
Whether randomized credentials are used.
relayfeenumeric
The minimum relay fee for transactions in BTC/kB.
incrementalfeenumeric
The minimum fee increment for mempool limiting or BIP 125 replacement in BTC/kB.
localaddressesarray
List of local addresses.
object
addressstring
The network address.
portnumeric
The network port.
scorenumeric
The relative score.
warningsstring
Any network and blockchain warnings.