Public Peers API
List All Peers
Endpoint
GET /api/peers
Query Parameters
Name | Type | Description | Required |
---|---|---|---|
offset | int | The offset of resources that will be returned. | ❌ |
limit | int | The number of resources per page. | ❌ |
port | int | The port by which the resources will be filtered. | ❌ |
status | string | The status by which the resources will be filtered. | ❌ |
os | string | The operating system by which the resources will be filtered. | ❌ |
version | string | The node version by which the resources will be filtered. | ❌ |
orderBy | string | The column by which the resources will be sorted. | ❌ |
Response
{
"peers": [
{
"ip": "62.113.246.106",
"port": 4002,
"version": "1.1.1",
"height": 3035375,
"status": "OK",
"os": "linux2.6.32-042stab127.2",
"delay": 109
}
],
"success": true
}
Example
curl -X GET https://explorer.swipechain.org:8443/api/peers \
-H "API-Version: 1"
Retrieve a Peer
Endpoint
GET /api/peers/get
Query Parameters
Name | Type | Description | Required |
---|---|---|---|
ip | int | The IP address of the peer to be retrieved. | ✅ |
port | int | The port of the peer to be retrieved. | ✅ |
Response
{
"peer": {
"ip": "145.239.88.101",
"port": 4002,
"version": "1.1.1",
"status": "OK",
"os": "linux4.4.0-109-generic",
"delay": 254
},
"success": true
}
Example
curl -X GET https://explorer.swipechain.org:8443/api/peers/get?ip=185.233.104.31&port=4001 \
-H "API-Version: 1"
Retrieve the Core Version
Endpoint
GET /api/peers/version
Response
{
"version": "1.0.0",
"success": true
}
Example
curl -X GET https://explorer.swipechain.org:8443/api/peers/version \
-H "API-Version: 1"
← Loader Signatures →