Questions tagged [bitcoin-cli]

The Bitcoin-Core wallet provides a Command-LIne-Interface (CLI) that can be used to retrieve information from the wallet or to perform certain actions.

Filter by
Sorted by
Tagged with
15 votes
1 answer
12k views

How to generate SegWit address

How do I generate a SegWit address using Bitcoin Core CLI? Also will I be able to redeem those outputs and send them to a "legacy" address? If so, will this second transaction be accepted by older, ...
Paul's user avatar
  • 361
14 votes
5 answers
9k views

bitcoin-cli not found on OSX

I have a Qt testnet3 node synched and running on my mac. In the terminal, when simply trying: $ bitcoin-cli getinfo or $ ./bitcoin-cli getinfo I get: -bash: bitcoin-cli: command not found ...
user avatar
10 votes
1 answer
6k views

Can you list receiving addresses in bitcoin-cli?

In bitcoin-qt, there are interfaces for seeing "receiving addresses" which have been generated in the past. I don't see any way to do that in bitcoin-cli.
Ian Kelling's user avatar
10 votes
1 answer
7k views

How to sign bitcoin transaction with 'bitcoind' and non-bitcoind-wallet private key?

I want to create and sign bitcoin transaction using only 'bitcoind' and 'bitcoin-cli'. I can create a transaction using createrawtransaction RPC API, but signing it using 'signrawtransaction' fails. ...
KostaZ's user avatar
  • 261
9 votes
2 answers
2k views

How to check if node is on TestNet or MainNet via `bitcoin-cli`?

Is there a way, by using bitcoin-cli using RPC querying, if the node I'm querying is running on MainNet or TestNet? Thanks
knocte's user avatar
  • 1,754
9 votes
2 answers
11k views

bitcoin-cli get all tx hashes for watch-only address

does bitcoin-cli have any functionality to get all tx hashes for a given address (ie the txs that either send or receive funds from the given address). listtransactions sounds like it should do what i ...
mulllhausen's user avatar
  • 1,713
8 votes
2 answers
2k views

How to detect a fork with bitcoin-cli?

I'm keeping a simple log of blocks, and storing them in an array. When a new block arrives, I add it to the array. Let's say this is my block chain array: E <- tip D C B A Now, say a new ...
inersha's user avatar
  • 2,968
7 votes
1 answer
4k views

What are the hex and asm field values in the JSON decoded from a raw transactions?

I used the command line bitcoin-cli decoderawtransaction <hex-value> and got back a JSON output (see below). However, I noticed there are hex and asm fields that are themselves hex values (at ...
Jane Wayne's user avatar
7 votes
2 answers
4k views

How to check if an output has been spent?

Using an rpc client (e.g. bitcoin-cli), for a given transaction and index of an output of it, how can I tell if the output is currently an utxo, or if it has already been spent? In the latter case, I'...
shx2's user avatar
  • 803
7 votes
3 answers
3k views

bitcoin.rpc python library problem

I am working through Master Bitcoin. I got the bitcoin client up and running. I am now trying to access the client from python. In the example, there is a line that says from bitcoin.rpc import ...
user2242044's user avatar
6 votes
1 answer
2k views

How do I get the private key of an address in descriptor wallets? How to dumpprivkey?

When I run dumpprivkey from Bitcoin Core 0.21.1. I get the following error message: error code: -4 error message: This type of wallet does not support this command I came across achow's explanation ...
U2F0b3NoaVNhdHVyZGF5's user avatar
6 votes
1 answer
6k views

How to check if my node is fully sync'ed

Using bitcoin-cli, how do I check how sync'ed my full node is?
oshirowanen's user avatar
6 votes
2 answers
1k views

Why are some Bitcoind commands comparatively slow?

For example, running bitcoin-cli getbalance <address> on an arbitrary, watch-only address takes around 6-7 seconds for a response. Is there any way to improve the response time? How do API ...
user avatar
6 votes
2 answers
6k views

64: too-long-mempool-chain

I am using bitcoind json rpc api to send bitcoin to multiple bitcoin addresses. I am using sendrawtransaction. When i have 24 unconfirmed payments sent from my account, i can't send anymore because i ...
Adrian's user avatar
  • 59
6 votes
1 answer
250 views

Bitcoin.conf setting for CPFP - how can I enable longer 'chains' of unconfirmed transactions?

I often receive an -32700 'Insufficient Funds' error when attempting to create 'child pays for parent' (CPFP) transactions using unconfirmed change output. This can be problematic since it can prevent ...
qmux's user avatar
  • 182
6 votes
1 answer
262 views

What is better, pre-existing Bitcoin-core API bindings for python or custom wrapper functions

How advisable is using the following code to query the bitcoin core as compared to using some python RPC library. import os btc_prefix = 'bitcoin-cli ' def getblockcount(btc_prefix): print("in ...
Shabahat M. Ayubi's user avatar
5 votes
2 answers
1k views

Why does importmulti not support zpub and ypub?

As far as I can tell importmulti does not work with zpub/ypub. Why not? FWIW I prefer only to deal with xpubs, but I am curious.
Fontaine's user avatar
  • 466
5 votes
3 answers
12k views

bitcoin-cli could not locate RPC credentials

I'm running a bitcoind 0.16 and it seem working, blockchain in sync etc.. I've used the "new" rpcauth, which is non deprecated so kind of referennce as explained here: https://github.com/bitcoin/...
Daniele Dellafiore's user avatar
5 votes
1 answer
147 views

Testing pruning logic with bitcoind

I'd like to test pruning logic using bitcoind in regtest mode, however, given the nature of regtest, blocks are rather empty (if not fully). Is there any way of easily generating full blocks so the ...
sr_gi's user avatar
  • 3,192
5 votes
3 answers
2k views

Bitcoin-tx sign/redeem p2sh transaction (Unable to sign input, invalid stack size (possibly missing key))

I'm seeking help in redeeming a p2sh transaction using the standard tools from bitcoin core, e.g., bitcoin-cli or using directly the RPC commands via curl would also be fine. Creating the P2SH ...
jagodacarlito's user avatar
5 votes
2 answers
8k views

Why is my bitcoind daemon not listening on RPC port at 8332?

I have read a similar post which had no answer at this location. I am trying to use bitcoin-cli from a host that different from the host that runs bitcoind. I also would be happy with being able to ...
Jared Clemence's user avatar
5 votes
2 answers
2k views

How to make a taproot transaction with bitcoin-cli?

Can you give a simple step-by-step example for a taproot transaction with bitcoin-cli on Testnet?
RobinLinus's user avatar
5 votes
1 answer
919 views

Bitcoin Core coin control via RPC (CLI)

Bitcoin Core introduced nice Coin Control feature accessible via the GUI client. To my surprise though, I don't see any obvious way how to make use of Coin Control via RPC/bitcoin-cli. How can I pick ...
knaperek's user avatar
  • 1,424
5 votes
1 answer
2k views

bitcoin-cli very slow to respond to RPC calls (Raspberry Pi)

Running Bitcoin 0.11 on Raspberry Pi 2 (Quad core 900MHz 1GB RAM, 128GB Flash Drive for blockchain, 8GB SD Card for OS and software). Blockchain is fully synced, 13 connections. In htop, I see I'm ...
pinhead's user avatar
  • 4,992
4 votes
2 answers
2k views

What is the key differences between bitcoin-qt, bitcoin-cli, bitcoind, bitcoin rpc, and daemon?

Can someone please give a brief explanation on these? I'm getting very confused with the differences, and every tutorial article I read uses these terms interchangeably (I'm trying to set up a pruned ...
2523454's user avatar
  • 311
4 votes
2 answers
3k views

running live and test node simultaneously

it took me 4 days to fully synchronize my node, but its finally running and i can create wallets etc.. I wanted to experiment with some transactions on testnet, so need to either change my config or ...
Sonic Soul's user avatar
4 votes
2 answers
2k views

bitcoin-cli commands like createrawtransaction not working with json on command line

I am trying to create raw transaction using the createrawtransaction api on testnet using the Windows7 command line. I always get an "error parsing JSON": C:\Users\amjad>bitcoin-cli -testnet ...
Amzad Raza Khan's user avatar
4 votes
2 answers
970 views

Bitcoin-cli how to get balance of a wallet on different node?

I am making a bitcoin mobile application, and I an trying to get the balance of a wallet that is on the mobile phone, from a daemon that is running on a separate node. The mobile wallet is connected ...
Barney Chambers's user avatar
4 votes
1 answer
1k views

How do I create a taproot multisig address requiring 21 of 210 keys to spend?

I understand that prior to taproot activation, m-of-n multisig addresses had an "n" max limit of 20 keys. I also saw the 998/999 tapscript multisig transaction that recently caused issues ...
FractalEncrypt's user avatar
4 votes
2 answers
4k views

-fallbackfee option in sendtoaddress

I'm trying to send some bitcoins using bitcoin-cli API, but bitcoin core tells me that Fallbackfee is disabled. How can I set a value for fallbackfee? I've tried to specify it like bitcoin-cli ...
dcfg's user avatar
  • 394
4 votes
1 answer
222 views

Is there a way to allow use of unconfirmed RBF outputs in transaction building?

Bitcoin Core seems to not consider unconfirmed outputs that are marked replaceable in input selection. Is there a way to override this protection and allow use anyway? The transaction is created using ...
Murch's user avatar
  • 72.8k
4 votes
1 answer
402 views

How to have my bitcoin-cli connect to an outside fullnode

I don't want to run a full node in my laptop. I rather want to install bitcoin-cli only and configure it to connect to an external full node. Is that possible? If so, two questions: where can I get ...
kee's user avatar
  • 167
4 votes
1 answer
9k views

How to find bitcoin balance via command line

I'm wondering how to find the balance a wallet for a full node on a command-line only linux box. bitcoin-cli doesn't seem to help here, and I'm not sure what else to try.
erikvold's user avatar
  • 883
4 votes
1 answer
202 views

What is the asm section of scriptSig

I am trying to understand the output from bitcoin-cli. The sample transaction's txid is 061959f1a3360d3781a870b2d43f73f7105b194b22f3765fcb9b8f545f9c8317, from block 222,222. The asm section of ...
D.J. Elkind's user avatar
4 votes
1 answer
218 views

How to spend an imported rawtr() descriptor with bitcoin-cli?

I created a transaction that creates a taproot output that can be spent using the private key (KEY) corresponding to the taproot output key. Then I imported the WIF formatted private key into Bitcoin ...
raphjaph's user avatar
4 votes
2 answers
440 views

Stopping bitcoind on mac

One of my kids while learning more about bitcoin started bitcoind on my mac. Now I am unable to stop it. In my activity monitor, it shows a process named "bitcoind". I have stopped that ...
Vedant Sharma's user avatar
4 votes
1 answer
160 views

What are best practices around toggling between multiple wallets in bitcoind?

I've created a couple wallets on Core to experiment with and want to dedicate one wallet as a live one. What is the best way to move between those wallets inside the command line? When I toggle to a ...
Ryan's user avatar
  • 61
3 votes
2 answers
397 views

Is it possible to set RBF as always-on in bitcoind?

I can't seem to find any cli commands for this. Is it even possible? Or does RBF need to be opted into on a per transaction basis? I would just like every transaction sent by my node to be RBF enabled....
Aaron's user avatar
  • 33
3 votes
1 answer
3k views

Method not found when I use bitcoin-cli to generate blocks under regtest mode [duplicate]

As the picture shows,I am really confuesd.
jia tan's user avatar
  • 31
3 votes
3 answers
2k views

How can I accept Bitcoin as a payment without a 3rd party gateway

I want to create a website where users can pay with Bitcoin. However I want to create my own payment gateway because I do not want to rely on services like BitPay. I want a unique BTC address for ...
Emil Engler's user avatar
3 votes
2 answers
408 views

How to increase fee of existing transaction with bitcoin-cli

I have broadcast a trasnaction from my bitcoincli wallet using this command: ./bitcoin-cli sendtoaddress ADDRESSGOESHERE 0.1 The problem is, it has set the fee to a very low amount by default. After ...
lipp's user avatar
  • 31
3 votes
2 answers
1k views

How to get info for public address from bitcoin-cli + local db? (Can it be done without creating a wallet?)

I just started running my own full node. IBD is finished, and I'm now learning how to use bitcoin-cli. First I would like to extract all the available information for one or more public addresses ...
kjo's user avatar
  • 145
3 votes
1 answer
97 views

Why is the field 'hash' necessary in a bitcoin transaction?

Using bitcoin-cli decoderawtransaction I see results like... { "txid": "d2183b3ea763f41a30ec5ba6fbf6e5f32e0ca6a5e8761249c533fe22190f71f1", "hash": "...
d3wannabe's user avatar
  • 275
3 votes
1 answer
546 views

How to get more chain tips from getchaintips?

I've just restarted my node. When I run getchaintips, it only gives me 48 tips (the lowest being at a height of 402,609). Does getchaintips only return a limited number of branch tips? If so, is it ...
inersha's user avatar
  • 2,968
3 votes
2 answers
1k views

bitcoin-cli how to verify balance

I've read that addresses alone are a "confusing" way to think about "where" bitcoins "are". Nonetheless I was formerly (2018) able to correlate what I got from bitcoin-...
Martin Moops's user avatar
3 votes
2 answers
703 views

Is there a way to disable a blockchain validation?

I installed Bitcoin Full Node on Raspberry pi 3b+. Blockchain sync is dead slow because of less CPU. I Guess blockchain validation is time/CPU consuming thing. Is there a way to disable the validation ...
lch's user avatar
  • 213
3 votes
1 answer
807 views

What does score tell me in getnetworkinfo?

Using bitcoin-cli getnetworkinfo; Or, going into Help>Debug>Console in bitcoin-qt and typing getnetworkinfo; What does localaddresses:score tell me?
Willtech's user avatar
  • 3,231
3 votes
1 answer
2k views

Why 'bitcoin-cli getreceivedbyaddress ...' always returns 0?

I've already synchronized about 400.000 blocks, but every time I'm trying to get balance for specific address, e.g. first coinbase address - link: $ bitcoin-cli getreceivedbyaddress ...
Sergey Potekhin's user avatar
3 votes
1 answer
469 views

Why does getblocktemplate use priority for transaction selection?

I don't know how getblocktemplate works exactly, but it seems to include transactions based on priority. Selecting transactions based on priority isn't the most profitable method for building a block ...
inersha's user avatar
  • 2,968
3 votes
1 answer
130 views

Why does bitcoin-cli return strange version numbers for blocks?

I've been looking at the version numbers of blocks, but I'm getting strange results from bitcoin-cli getblock. "version": 536870913 However, when I run the same command with the false option (to get ...
inersha's user avatar
  • 2,968

1
2 3 4 5
9