Skip to main content

importprivkey

Overview

The 'importprivkey' method allows you to Add a private key (as returned by dumpprivkey) to your wallet. Requires a new wallet backup.

Request

wget --no-check-certificate --quiet \
--method POST \
--timeout=0 \
--header 'Content-Type: application/json' \
--header 'accept: application/json' \
--header 'X-CoinAPI-Key: 4303fb63-adec-42dc-b571-74bc2f2a5167' \
--body-data '{"jsonrpc":"2.0","id":1,"method":"importprivkey","params": [ ]}' \
'https://bitcoin-mainnet.node.coinapi.io'

Request Parameters

  • privkey: The private key
  • label: An optional label
  • rescan: Rescan the wallet for transactions

Response

{
// Response structure here
}