{ "$schema": "../rpc-schema-draft.json", "type": "object", "rpc": "disconnect", "title": "Command for disconnecting from another lightning node", "description": [ "The disconnect RPC command closes an existing connection to a peer, identified by *id*, in the Lightning Network, as long as it doesn't have an active channel." ], "request": { "required": [ "id" ], "additionalProperties": false, "properties": { "id": { "type": "pubkey", "description": [ "The public key of the peer to terminate the connection. It can be discovered as peer_id in the output of the listpeerchannels command." ] }, "force": { "type": "boolean", "description": [ "If set to True, it will disconnect even with an active channel." ] } } }, "response": { "additionalProperties": false, "properties": {} }, "errors": [ "On error the returned object will contain `code` and `message` properties, with `code` being one of the following:", "", "- -32602: If the given parameters are wrong.", "- -1: Catchall nonspecific error." ], "author": [ "Michael Hawkins <>." ], "see_also": [ "lightning-connect(7)", "lightning-listpeerchannels(7)" ], "resources": [ "Main web site: " ], "examples": [ { "request": { "id": "example:disconnect#1", "method": "disconnect", "params": { "id": "0382ce59ebf18be7d84677c2e35f23294b9992ceca95491fcf8a56c6cb2d9de199", "force": false } }, "response": {} }, { "request": { "id": "example:disconnect#2", "method": "disconnect", "params": { "id": "032cf15d1ad9c4a08d26eab1918f732d8ef8fdc6abb9640bf3db174372c491304e", "force": true } }, "response": {} } ] }