Questions tagged [bitcoin-cli]

should be used for questions related to the Bitcoin Core RPC client

49 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
3
votes
0answers
47 views

How to segregate wallet from bitcoin core | Run multiple wallets in different servers on one centralized bitcoin node

I am running bitcoin full node in a centralized server. I have many web applications running in various places. I want to connect this web applications with centralized full bitcoin node. How to ...
3
votes
0answers
5k views

bitcoin-cli - “error: couldn't connect to server” [solved as per comment]

I have bitcoind 0.13.1 running on a Raspberry Pi. I can see it on the bitcoin network using bitnodes.21.co but I can't connect to it locally with bitcoin-cli. My bitcoin.conf is: rpcuser=xxx ...
2
votes
0answers
168 views

Electrum via command-line: can generic blockchain info be requested?

For example can I ask the Electrum client via it's API what the height or version of the latest block is? Looking through the docs all I currently see is wallet commands.
2
votes
0answers
455 views

vout value in createrawtransaction

I have been following the Bitcoin Core tutorial on creating a simple raw transaction from an offline computer using the CLI. The part on createrawtransaction indicates that the raw transaction should ...
2
votes
0answers
651 views

Mempool filled with 14KB transactions, tons of inputs, 0.15 mBTC fee

With the blockchain experiencing extremely high transaction volumes (most blocks at the 1MB size limit), I am interested in studying the "backlog" of transactions in the memory pool on my own full ...
2
votes
1answer
1k 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 ...
1
vote
1answer
29 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-...
1
vote
1answer
21 views

listunspent rpc/cli command doesn't seem to list unspent unconfirmed transactions for watch-only addresses

I am unable to list unspent unconfirmed transactions for watch-only addresses. Once the transaction gets at least 1 confirmation it gets included in the returned result. This is the command I am ...
1
vote
1answer
46 views

Bitcoin core 0.19.1 RPC, 'sendtoaddress' not working!

Suppose this scenario: There are 2 wallets called wallet1 and wallet1 on the same node in testnet blockchain. wallet1 balance: 0.001 BTC wallet2 balance: 0 BTC I am trying to send 0.001 BTCs from ...
1
vote
0answers
17 views

RPCConvertValues() call error

I'd like to call RPC programmatically, instead of using bitcoin-cli. when I call the function RPCConvertValues(), it always raise error RPCConvertValues() is defined here : https://github.com/...
1
vote
0answers
123 views

How to add money to my Bitcoin Wallet and send my first Raw Transaction with OP_RETURN using bitcoin-cli

Background So after reading these two articles (Learning Bitcoin from the Command Line and Mastering Bitcoin), I am trying to piece together how I can get my first transaction with OP_RETURN data ...
1
vote
1answer
57 views

Why is getdescriptorinfo returning an error “Invalid descriptor (code -5)”

I am using Bitcoin Core bitcoin-cli with getdescriptorinfo like so: curl --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getdescriptorinfo", "params":["sh(multi(2,[3c60330a/1]...
1
vote
1answer
74 views

Why can't a user import keys to the keypool for a blank wallet?

I am creating a blank wallet with the intention of adding keys to the keypool but get an error keys can only be imported to the keypool when private keys are disabled Why? It would be beneficial for ...
1
vote
0answers
17 views

How to fill in the subtractFeeFromOuputs field in fundrawtransaction

I am attempting to use fundrawtransaction, but I am a bit confused on how to populate the subtractFeeFromOutputs field... "subtractFeeFromOutputs": [(json array, optional, default=empty array) A ...
1
vote
0answers
73 views

Why am I getting error: “Signature must be zero for failed CHECK(MULTI)SIG operation” when using signrawtransactionwithkey

I am using descriptor based importmulti like so to import a 2 of 3 HD multisig cold storage wallet into my node: curl --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "importmulti", "...
1
vote
2answers
54 views

Why does bitcoin-cli not know about working directory of bitcoind?

I have a /ect/systemd/system/bitcoin.service with the following content and I am wondering, why bitcoin-cli getinfo tells me about a configuration file elsewhere: error: Could not locate RPC ...
1
vote
0answers
77 views

bitcoin-cli is not using port specified in config

I have setup a bitcoin node in regtest mode with custom config and datadir. I start bittcoind with command: bitcoind -conf=bitcoin-demo.conf -regtest -datadir="testdatabtc" -daemon My bitcoin-...
1
vote
0answers
45 views

how do I mark coins spent in invalid blocks as unspent?

I was just testing bitcoin (v17) in regtest mode with the local, built-in wallet. If I send money to an address (I don't own), generate 1, and then invalidate that block, the local wallet does not ...
1
vote
2answers
269 views

Specified data directory does not exist - but it does…

anyone ever had a similar issue where the directory exists but bitcoin-cli isn't recognizing it? Perhaps this is related to me setting the folder up as a symlink to my external HDD? Thank you! ...
1
vote
0answers
19 views

Paying to one address using inputs from multiple addresses under same seed

I am using bitcoin core and I was wondering. If I make a bitcoin payment using bitcoin-cli which has about 50 addresses registered to it. If the payment is for 1 BTC and I pay from the address A1 (let'...
1
vote
1answer
536 views

RPC Command to send from multiple accounts to one account (default - “”) in same wallet

I have small amounts in multiple accounts in the same wallet. I want to send all of them to default account (usually named as ""). Is their any RPC command available for this scenario? Thanks in ...
1
vote
0answers
22 views

Is there a “print to file” parameter or its equivalent for bitcoin-cli; so that results from the daemon are recorded

Is there any way to "print to file" the queried results of the bitcoin-cli. This would be most helpful in my basic cross platform integration of a program I am making with QB64.
1
vote
0answers
139 views

getblockchaininfo timeout using API only

Thanks in advance. If I call getblockchaininfo through bitcoin-cli it just works. It might take a while but it works all the time. If I call it from within a Python Script from bitcoin.rpc import ...
1
vote
0answers
189 views

Bitcoin-cli using getblock to retrieve historical data

I have recently set up a bitcoin node using bitcoind and want to perform some historical queries on the blockchain using getblock with verbosity set to 2. I am using the default bitcoin.conf file but ...
1
vote
1answer
100 views

How can I pass Multiple addresses in Move command

I have to pass multiple addresses in move command but I am not able to pass as it is not accepting more than one wallet address Is there is any another way to move the balance to multiple addresses.
1
vote
0answers
171 views

Bitcoin RPC - settxfee specific amount rather than based off transaction size?

How am I able to use the "sendfrom" command with a specific amount of 0.0005 BTC as fees no matter how small or big the transaction is in bytes? settxfee is based off fees per bytes.
1
vote
0answers
527 views

“Error: Invalid RPC method” when i try to create block in regtest mode

I use Ubuntu. After i run bitcoind -regtest -daemon I tried to create blocks by running command: bitcoin-cli -regtest generate 101 And it returned error like this: Error: Invalid RPC method ...
1
vote
0answers
248 views

Transaction instantly rejected trying to send from bitcoin-cli

Trying to send bitcoins with this command: bitcoin-cli sendfrom accountdos 1HC...kgT 0.03233376 1 I get this error immediately: The transaction was rejected! This might happen if some of the coins in ...
1
vote
1answer
349 views

Need help to understand where bitcoin transaction has gone

I am new with bitcoin and I need some help from experienced members. I have a server with bitcoin core where we accept some payments and use bitcoin core as mercant. The problem is that we have got ...
0
votes
0answers
19 views

How to manually compute a descriptors checksum?

In the docs it says: The checksum for a descriptor without one can be computed using the getdescriptorinfo RPC. I would like to build a recovery tool where many descriptors are imported, calling ...
0
votes
0answers
13 views

Problems Setting a Transaction Fee on a Per Transaction Basis Bitcoind

I've spent hours and hours trying to find a solution to this problem, with no success. Using Bitcoin Core on a Linux machine, so using bitcoin-cli to process commands back to the daemon. Here's what ...
0
votes
0answers
19 views

Parsing JSON in bitcoin-cli

I am learning the Bitcoin-cli, and when I run a command like getbalances, I get a JSON with "mine" and "watchonly". Is there a way i can only return the watchonly portion? My broader question is can I ...
0
votes
1answer
27 views

Will bitcoind import private keys for multi-sig descriptor with watch-only flag set to true?

I am importing a "warm" multi-sig quorum into bitcoind using importmulti like so: {"jsonrpc":"1.0","id":"curltest","method":"importmulti","params":[[{ "desc": "sh(multi(2,[eb2d2f9e/44'/1'/0']...
0
votes
1answer
35 views

bitcoin-cli decodescript wrong output

If I try to get info in genesis block, there is 1 tx: "scriptPubKey": { "asm": "...
0
votes
0answers
49 views

Getting blockhash using bitcoin-cli command in shell

Currently, my node is syncing blocks and tip(height) is 230000. At this point, if I use command bitcoin-cli getblockhash 230000, the return information will be successful but, if I use bitcoin-cli ...
0
votes
0answers
40 views

Sent some testnet Bitcoin to Bitcoin Core wallet but balance is still zero

I got the testnet Bitcoin address with this command: bitcoin-cli -testnet getnewaddress And here is the Bitcoin address: 2NDtNjDbEiNiKDuAnwyKBmRPQ49NNpesdhE As you can see in blockchain there was a ...
0
votes
0answers
25 views

Why is bitcoin-cli getunconfirmedbalance hanging?

Sometimes when I call bitcoin-cli getunconfirmedbalance, it is instance. Other times it takes 5-10 seconds. Other times it hangs for minutes and I just end up closing it. This is on Google Cloud using ...
0
votes
0answers
28 views

bitcoin-cli getbalance does not match balance with bitcoin-cli listtransactions

version of bitcoin-cli 0.17.1 when I try bitcoin-cli getbalance I get balance 0.00010471 BTC when I try bitcoin-cli listtransactions "*" 1000000 >aaa.txt and then calculate SUM(receive) -...
0
votes
0answers
57 views

How do I determine the descriptor of a given Extended Public Key?

I am trying to run the bitcoin-cli getdescriptorinfo on a ypub... extended public key. Every time I do this I receive the message: error code: -5 error message: Invalid descriptor How can I ...
0
votes
0answers
90 views

Signing multisig raw transaction is returning error “JSON value is not a string as expected”

I am trying to sign a multisig unsigned raw transaction but keep getting "JSON value is not a string as expected", I am stumped and have tried many variations. Can anyone point out what I am doing ...
0
votes
0answers
43 views

Bitcoin-cli transaction fee reset

How do you reset the txfee after you successfully did the transaction? I mean, getting it back to "automatic fee"?
0
votes
0answers
52 views

banning nodes through bitcoin-cli in Windows

I'd like to use Greg Maxwell's banlist for my Bitcoin node in Windows. When I enter the commands however, I receive the following error message for every bitcoin-cli command: bitcoin\bin>bitcoin-...
0
votes
1answer
445 views

How find own address in testnet using bitcoin-cli?

I have bitcoin-core installed, I am running it in testnet mode. Now if I want to fund my wallet, I need to know the receiving address. How do find my receiving address, so that I can fund it and then ...
0
votes
1answer
340 views

Bitcoin curl no reply

Hi I have made a curl to my server but get no reply . What am a missing rpcuser=rpcusername rpcpassword=rpcpassword rpcauth=rpcusername:generatedkey daemon=1 server=1 rpcport=8332 rpcbind=0.0....
0
votes
2answers
150 views

how to split transactions based on send and receive Json rpc bitcoin

I am creating new wallet for bitcoin and want to know how we can get the separate list of send and receive transactions using JSON rpc. I cant see any method for json rpc that give list of send and ...
0
votes
1answer
310 views

Manage multiple users wallets for web wallet service

This already summaries the issue I'm currently trying to figure out to calculate the transaction fee to prevent negative balance. (testnet) I tried using createrawtransaction answered. When I tried ...
0
votes
1answer
67 views

Transaction net gain/loss

I have a TXid in my wallet that contains multiple transactions (multiple sends and receives). From what I read these are transactions the network creates facilitate splitting/combining multiple inputs/...
0
votes
0answers
186 views

Getting the lasthash on a bitcoin full node using bitcoin-cli

I'm trying to figure out how to get the last block hash using bitcoin-cli. I read the help: $ bitcoin-cli help == Blockchain == getbestblockhash getblock "hash" ( verbose ) getblockchaininfo ...
0
votes
1answer
1k views

bitcoin-cli can't connect to server

I'm trying to put up a simple system for some penetration tests. I have an Ubuntu server 16.04.1 with apache2 and bitcoin. all running "Hiddn service" through tor (and bitcoind proxied 127.0.0.1:9050)....