Language

Choose a language

/build/rpc / btc

getaddednodeinfo

getaddednodeinfo ( "node" ) Returns information about the given added node, or all added nodes (note that onetry addnodes are not listed here) Arguments: 1. node (string, optional, default=all nodes) If provided, return information about this specific node, otherwise all nodes are returned. Result: [ (json array) { (json object) "addednode" : "str", (string) The node IP address or name (as provided to addnode) "connected" : true|false, (boolean) If connected "addresses" : [ (json array) Only when connected = true { (json object) "address" : "str", (string) The bitcoin server IP and port we're connected to "connected" : "str" (string) connection, inbound or outbound }, ... ] }, ... ] Examples: > bitcoin-cli getaddednodeinfo "192.168.0.201" > curl --user myusername --data-binary '{"jsonrpc": "2.0", "id": "curltest", "method": "getaddednodeinfo", "params": ["192.168.0.201"]}' -H 'content-type: application/json' http://127.0.0.1:8332/

Signature

getaddednodeinfo(node?: string) → any

Code samples

curl --user "$RPC_USER:$RPC_PASS" \
  --data-binary '{"jsonrpc":"1.0","id":"docs","method":"getaddednodeinfo","params":["all nodes"]}' \
  -H 'content-type: text/plain;' \
  http://127.0.0.1:8332/

Parameters

NameTypeReq.Description
nodestringIf provided, return information about this specific node, otherwise all nodes are returned.

Result

Type:  any

[ (json array) { (json object) "addednode" : "str", (string) The node IP address or name (as provided to addnode) "connected" : true|false, (boolean) If connected "addresses" : [ (json array) Only when connected = true { (json object) "address" : "str", (string) The bitcoin server IP and port we're connected to "connected" : "str" (string) connection, inbound or outbound }, ... ] }, ... ]

Source: services/core-node/bcore/src/rpc/net.cpp:476

C++ symbol: getaddednodeinfo