Skip to main content

disconnectnode

Overview

The 'disconnectnode' method allows you to immediately disconnect from a specified peer node in the Bitcoin network. You can identify the node either by its 'address' or 'nodeid'. Only one of these parameters can be provided to identify the node. To disconnect by 'nodeid', you can either set the 'address' to an empty string or use the 'nodeid' argument only.

Request

wget --no-check-certificate --quiet \
--method POST \
--timeout=0 \
--header 'Content-Type: application/json' \
--header 'accept: application/json' \
--header 'X-CoinAPI-Key: 73034021-THIS-IS-SAMPLE-KEY' \
--body-data '{
"jsonrpc": "1.0",
"id": "1",
"method": "disconnectnode",
"params": []
}'\'https://bitcoin-mainnet.node.coinapi.io'

Request Parameters

  • address: The IP address/port of the node (string).
  • nodeid: The node ID (numeric, optional, default=fallback to address). You can find node IDs using the 'getpeerinfo' method.

Response

{
"result": null,
"error": null,
"id": "request_id"
}