getpeerinfo
Summary
Returns data about each connected network peer as a json array of objects.
Description
Returns data about each connected network peer as a json array of objects.
Arguments
None.
Results
value(ARR): No description.-
value(OBJ): No description.id(NUM): Peer indexaddr(STR): (host:port) The IP address and port of the peeraddrbind(STR, optional): (ip:port) Bind address of the connection to the peeraddrlocal(STR, optional): (ip:port) Local address as reported by the peernetwork(STR): Network (ipv4, ipv6, onion, i2p, cjdns, not_publicly_routable)mapped_as(NUM, optional): Mapped AS (Autonomous System) number at the end of the BGP route to the peer, used for diversifying peer selection (only displayed if the -asmap config option is set)services(STR_HEX): The services offeredservicesnames(ARR): the services offered, in human-readable formSERVICE_NAME(STR): the service name if it is recognisedrelaytxes(BOOL): Whether we relay transactions to this peerlastsend(NUM_TIME): The UNIX epoch time of the last sendlastrecv(NUM_TIME): The UNIX epoch time of the last receivelast_transaction(NUM_TIME): The UNIX epoch time of the last valid transaction received from this peerlast_block(NUM_TIME): The UNIX epoch time of the last block received from this peerbytessent(NUM): The total bytes sentbytesrecv(NUM): The total bytes receivedconntime(NUM_TIME): The UNIX epoch time of the connectiontimeoffset(NUM): The time offset in secondspingtime(NUM, optional): The last ping time in seconds, if anyminping(NUM, optional): The minimum observed ping time in seconds, if anypingwait(NUM, optional): The duration in seconds of an outstanding ping (if non-zero)version(NUM): The peer version, such as 70001subver(STR): The string versioninbound(BOOL): Inbound (true) or Outbound (false)bip152_hb_to(BOOL): Whether we selected peer as (compact blocks) high-bandwidth peerbip152_hb_from(BOOL): Whether peer selected us as (compact blocks) high-bandwidth peerstartingheight(NUM): The starting height (block) of the peerpresynced_headers(NUM): The current height of header pre-synchronization with this peer, or -1 if no low-work sync is in progresssynced_headers(NUM): The last header we have in common with this peersynced_blocks(NUM): The last block we have in common with this peerinflight(ARR): No description.n(NUM): The heights of blocks we're currently asking from this peeraddr_relay_enabled(BOOL): Whether we participate in address relay with this peeraddr_processed(NUM): The total number of addresses processed, excluding those dropped due to rate limitingaddr_rate_limited(NUM): The total number of addresses dropped due to rate limitingpermissions(ARR): Any special permissions that have been granted to this peer-
permission_type(STR): bloomfilter (allow requesting BIP37 filtered blocks and transactions), noban (do not ban for misbehavior; implies download), forcerelay (relay transactions that are already in the mempool; implies relay), relay (relay even in -blocksonly mode, and unlimited transaction announcements), mempool (allow requesting BIP35 mempool contents), download (allow getheaders during IBD, no disconnect after maxuploadtarget limit), addr (responses to GETADDR avoid hitting the cache and contain random records with the most up-to-date info). -
minfeefilter(NUM): The minimum fee rate for transactions this peer accepts bytessent_per_msg(OBJ_DYN): No description.msg(NUM): The total bytes sent aggregated by message type When a message type is not listed in this json object, the bytes sent are 0. Only known message types can appear as keys in the object.bytesrecv_per_msg(OBJ_DYN): No description.msg(NUM): The total bytes received aggregated by message type When a message type is not listed in this json object, the bytes received are 0. Only known message types can appear as keys in the object and all bytes received of unknown message types are listed under 'other'.connection_type(STR): Type of connection: outbound-full-relay (default automatic connections), block-relay-only (does not relay transactions or addresses), inbound (initiated by the peer), manual (added via addnode RPC or -addnode/-connect configuration options), addr-fetch (short-lived automatic connection for soliciting addresses), feeler (short-lived automatic connection for testing addresses). Please note this output is unlikely to be stable in upcoming releases as we iterate to best capture connection behaviors.-
transport_protocol_type(STR): Type of transport protocol: detecting (peer could be v1 or v2), v1 (plaintext transport protocol), v2 (BIP324 encrypted transport protocol). -
session_id(STR): The session ID for this connection, or "" if there is none ("v2" transport protocol only).
Examples
qbit-cli getpeerinfo
curl --user myusername --data-binary '{"jsonrpc": "2.0", "id": "curltest", "method": "getpeerinfo", "params": []}' -H 'content-type: application/json' http://127.0.0.1:8352/