• 官网
  • 中文
  • English
  • Russian
  • More language
Show / Hide Table of Contents
  • NEO Basics
    • About NEO
    • NEO Whitepaper
    • NEO Contract Whitepaper
    • Consensus
      • Consensus Whitepaper
      • Consensus Diagram
  • NEO Node
    • Introduction
    • NEO-GUI
      • Installing the Client
      • Wallet
      • Transactions
      • Registering and Distributing Assets
      • Interacting with Smart Contracts
      • Election and Voting
      • Other Features
    • NEO-CLI
      • Publishing from source
      • Installation
      • SeedList
      • NEO-CLI Command line
      • API Reference
        • v2.9.0 and later
          • dumpprivkey
          • getaccountstate
          • getassetstate
          • getbalance
          • getbestblockhash
          • getblock
          • getblock
          • getblockcount
          • getblockhash
          • getblockheader
          • getblocksysfee
          • getconnectioncount
          • getcontractstate
          • getnewaddress
          • getrawmempool
          • getrawtransaction
          • getstorage
          • gettxout
          • getpeers
          • getvalidators
          • getversion
          • getwalletheight
          • invoke
          • invokefunction
          • invokescript
          • listaddress
          • sendfrom
          • sendrawtransaction
          • sendtoaddress
          • sendmany
          • validateaddress
        • v2.8.0
          • dumpprivkey
          • getaccountstate
          • getapplicationlog
          • getassetstate
          • getbalance
          • getbestblockhash
          • getblock
          • getblock
          • getblockcount
          • getblockhash
          • getblocksysfee
          • getconnectioncount
          • getcontractstate
          • getnewaddress
          • getrawmempool
          • getrawtransaction
          • getstorage
          • gettxout
          • getpeers
          • getvalidators
          • getversion
          • invoke
          • invokefunction
          • invokescript
          • listaddress
          • sendfrom
          • sendrawtransaction
          • sendtoaddress
          • sendmany
          • validateaddress
        • v2.7.6
          • dumpprivkey
          • getaccountstate
          • getapplicationlog
          • getassetstate
          • getbalance
          • getbestblockhash
          • getblock
          • getblock
          • getblockcount
          • getblockhash
          • getblocksysfee
          • getconnectioncount
          • getcontractstate
          • getnewaddress
          • getrawmempool
          • getrawtransaction
          • getstorage
          • gettxout
          • getpeers
          • getvalidators
          • getversion
          • invoke
          • invokefunction
          • invokescript
          • listaddress
          • sendfrom
          • sendrawtransaction
          • sendtoaddress
          • sendmany
          • validateaddress
    • NEO Plug-ins
    • NEO-Python
  • NEO Network
    • Test Network
    • Private Chain
      • Build a private chain
      • Build a private chain in an easy way
    • Local Blockchain
    • Synchronizing the blockchain faster
    • Network Protocol
  • NEO Utilities
    • NEO SDK
      • About NEO SDK
      • Common Uses
      • Account
      • Wallet
      • Transaction Construction
    • Blockchain Explorers
  • Smart Contract
    • Introduction
    • Quick Start
      • Getting Started
        • Using C# (Windows)
        • Using C# (macOS)
        • Using C# (ubuntu)
        • Using Java
        • Using Python
      • Limitations
      • Unit Testing
      • Deploying and Invoking Smart Contracts
    • Reference
      • API Reference
        • NEO
        • System
      • Framework
        • .NET Framework
          • NEO
            • Account
            • Asset
            • Block
            • Blockchain
            • Contract
            • Enrollment
            • Header
            • Runtime
            • Storage
            • StorageContext
            • Transaction
            • TransactionAttribute
            • TransactionInput
            • TransactionOutput
            • TriggerType
            • Validator
          • System
            • ExecutionEngine
    • Samples and Tutorials
      • Hello World
      • Lock Contract
      • Domain (Domain Name System)
      • Contract Authentication Tutorial
      • Deploying a Lock Contract
    • Parameters and Return Values
    • Contract Triggers
    • System Fees
  • FAQ
  • Document for Exchange Developers
    • v2.9.4
    • v2.9.3
    • v2.9.2
    • v2.9.1
    • v2.9.0
    • v2.8.0
    • v2.7.6

getpeers Method

Gets the list of nodes that the node is currently connected/disconnected from.

Example

Request body:

{
  "jsonrpc": "2.0",
  "method": "getpeers",
  "params": [],
  "id": 1
}

Response body:

{
    "jsonrpc": "2.0",
    "id": 1,
    "result": {
        "unconnected": [
            {
                "address": "::ffff:70.73.16.236",
                "port": 10333
            },
            {
                "address": "::ffff:82.95.77.148",
                "port": 10333
            },
            {
                "address": "::ffff:49.50.215.166",
                "port": 10333
            },
            {
                "address": "::ffff:24.5.178.244",
                "port": 10333
            }
        ],
        "bad": [
            {
                "address": "::ffff:139.219.226.107",
                "port": 10333
            }
        ],
        "connected": [
            {
                "address": "::ffff:139.219.106.33",
                "port": 10333
            },
            {
                "address": "::ffff:47.88.53.224",
                "port": 10333
            },
            {
                "address": "::ffff:47.91.92.192",
                "port": 10333
            },
            {
                "address": "::ffff:47.89.178.72",
                "port": 10333
            },
            {
                "address": "::ffff:61.69.169.117",
                "port": 10333
            },
            {
                "address": "::ffff:73.129.221.112",
                "port": 10333
            },
            {
                "address": "::ffff:174.2.185.133",
                "port": 10333
            },
            {
                "address": "::ffff:88.161.1.223",
                "port": 10333
            },
            {
                "address": "::ffff:114.234.77.207",
                "port": 10333
            },
            {
                "address": "::ffff:78.18.22.226",
                "port": 10333
            }
        ]
    }
}

Response Description:

  • Unconnected: A node that is not currently connected.

  • Bad: Nodes that are no longer connected.

  • Connected: the node to which you are currently connected.

  • Improve this Doc
Back to top Copyright © 2014-2018 NEO