Peers

Get Peers List

Gets list of peers from provided filter parameters.

GET /api/peers?state=state&os=os&version=version&limit=limit&offset=offset&orderBy=orderBy

  • state: State of peer. 1 - disconnected. 2 - connected. 0 - banned. (Integer)
  • os: OS of peer. (String)
  • version: Version of peer. (String)
  • limit: Limit to show. Max limit is 100. (Integer)
  • offset: Offset to load. (Integer)
  • orderBy: Name of column to order. After column name must go "desc" or "acs" to choose order type. (String)

All parameters joins by "OR".

Example
/api/peers?state=1&version=0.3.2 looks like: state=1 OR version=0.3.2

Response

 {
  "success": true,
  "peers": [
    "List of peers as objects (see below the peer object response)"
  ]
}

Example

curl -k -X GET http://localhost:8000/api/peers

Get Peer

Gets peer by IP address and port.

GET /api/peers/get?ip=ip&port=port

  • ip: Ip of peer. (String);
  • port: Port of peer. (Integer)

Response

 {
  "success": true,
  "peer": {
        "ip":"Requested ip. String",
        "port":"Requested port. Integer",
        "state":"1 - disconnected. 2 - connected. 0 - banned. Integer",
        "os":"Operating system. String",
        "version":"Lisk client version. String",
        "broadhash":"Peer block propagation efficiency and reliability. String",
        "height":"Blockchain height. Integer"
  }
}

Example

curl -k -X GET http://localhost:8000/api/peers/get?ip=<ip>&port=<port>

Get Peer Version/Build Time

Gets a list peer versions and build times.

GET /api/peers/version

Response

 {
  "success": true,
  "version": "Version of Lisk. String",
  "build": "Time of build. String"
}

Example

curl -k -X GET http://localhost:8000/api/peers/version

What's next?
Blocks