getpeerinfo - Okcash RPC

getpeerinfo

Returns data about each connected network node as a json array of objects.

Result:
[
  {
    "id": n,                   (numeric) Peer index
    "addr":"host:port",      (string) The IP address and port of the peer
    "services":"xxxxxxxxxxxxxxxx",   (string) The services offered
    "lastsend": ttt,           (numeric) The time in seconds since epoch (Jan 1 1970 GMT) of the last send
    "lastrecv": ttt,           (numeric) The time in seconds since epoch (Jan 1 1970 GMT) of the last receive
    "bytessent": n,            (numeric) The total bytes sent
    "bytesrecv": n,            (numeric) The total bytes received
    "conntime": ttt,           (numeric) The connection time in seconds since epoch (Jan 1 1970 GMT)
    "version": v,              (numeric) The peer version, such as 7001
    "subver": "/oktoshi:5.0.0.3/",  (string) The string version
    "inbound": true|false,     (boolean) Inbound (true) or Outbound (false)
    "chainheight": n,       (numeric) The current height (block) of the peer
    "banscore": n,             (numeric) The ban score
  }
  ,...
]

Examples:
> okcashd getpeerinfo 
> curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getpeerinfo", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:6969/


Okcash Core RPC documentation.

Okcash version: 5.0.0.3

OK RPC docs at:Github