Skip to main content

GetPeerList

Query the list of nodes currently connected to the client

Parameter​

  • id:
  • jsonrpc: json version
{
"id":"1",
"jsonrpc":"2.0",
}

Response​

  • id:
  • jsonrpc: json version
  • method: method
  • result: result message
    • code: result code
      • 0 success
    • message: error message
    • peers: List of nodes connected to the client
    • size: Number of nodes connected to the client
{
"id": "1",
"jsonrpc": "2.0",
"method": "GetPeerList",
"result": {
"code": 0,
"message": "success",
"peers": [
{
"addr": "0x0aFeBC02da4d5111d05d425e74e822B032274f2b", //Account address
"fd": 16, //file descriptor
"pulse": "3", //heartbeat
"height": 2499, //Node current height
"ip": "192.168.1.100", //Remote IP
"ip_l": "192.168.1.81", //My own IP address
"kind": 1, // line type
"name": "", //Node Name
"logo": "", //Browser Logo
"port": 55302, //Local port number
"port_l": 20619, //Remote port number
"version": "1_1.0.0_d" //client version
},
{
"addr": "0xd57730E2CE30d412cea04689C9cDE2f0846df169",
"fd": 17,
"pulse": 3,
"height": 2499,
"ip": "192.168.1.110",
"ip_l": "192.168.1.81",
"kind": 1,
"name": "",
"logo": "",
"port": 36874,
"port_l": 20619,
"version": "1_1.0.0_d"
}
],
"size": 2
}
}