Call info.peers:

curl -X POST --data '{
"jsonrpc":"2.0",
"id" :1,
"method" :"info.peers"
}' -H 'content-type:application/json;' 127.0.0.1:9650/ext/info

Each entry in the response contains a peer’s IP address, public IP address, node ID, version, and the time of the last sent and received messages exchanged with this node. If you see none, something is wrong and you are not connected to any peers.

Chat with Ava Labs | Validate on Avalanche | Build on Avalanche

Did this answer your question?