Questions tagged [json-rpc]

This tag should be used for questions relating to the Bitcoin Core/bitcoind JSON-RPC interface.

Filter by
Sorted by
Tagged with
1
vote
2answers
256 views

trying to get text of a field in json rpc 2.0 response into ar PHP variable

I use json_decode to vardump a return which yields array(3) { ["jsonrpc"]=> string(3) "2.0" ["result"]=> array(13) { ["status"]=> string(7) "Pending" ["amount (BTC)"]=> string(10) "0.05130899" ["...
1
vote
1answer
27 views

Calculating fee rate of tx returned by fundrawtransaction

I'm passing an unfunded proposed tx and feeRate param to fundrawtransaction which gives me back the hex of the tx with inputs selected and its fee. I'm not passing a conf_target or estimate_mode. I ...
1
vote
1answer
54 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 ...
0
votes
1answer
20 views

How do I ask other nodes for their stale blocks?

I want data on as many stale blocks as possible. Is there a way to ask peer nodes to run "getchaintips" and get their results? Previously, I used Blockchain.info's API call for this, but it seems ...
0
votes
1answer
513 views

Please help - Bitcoin Conf file in the wrong directory

I am running a full node using Bitcoin Core GUI on Windows 10. The conf file is in my bitcoin data directory, instead of being in the appdata/roaming folder. But Bitcoin-qt points to it by default and ...
0
votes
1answer
20 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
2answers
21 views

How can I execute `getnewaddress` at my full node from a remote server?

I have a full node running on a digital ocean droplet. I have an app running at heroku, and I want to execute getnewaddress from this app. I'm trying to generate BTC addresses to which users can send ...
0
votes
0answers
15 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
0answers
8 views

How could be useful the softforks field that provides the RPC command getblockchaininfo?

When I execute the command getblockchaininfo I see useful information but I don't understand how to be useful the information that is displayed through field softforks, the example below: bitcoin-cli ...
4
votes
2answers
352 views

Which RPC may I use to query bitcoind for raw transactions coming through?

I need to capture and store the raw transactions coming through my local full-node bitcoin instance. I read here that it is possible, but there is no mention of the particular RPC calls. I also see ...
1
vote
2answers
897 views

How to use electrum RPC to get address balance on windows

$ ./electrum-3.2.3.exe --testnet setconfig rpcport 7777 true $ ./electrum-3.2.3.exe --testnet setconfig rpcuser blah true $ ./electrum-3.2.3.exe --testnet setconfig rpcpassword blah true $ ./electrum-...
4
votes
0answers
134 views

Obtaining historical orphaned blocks (chaintips) without old node

I'm attempting to do some research surrounding orphaned blocks within the Bitcoin network. From my understanding the best and really only way to obtain data for blocks that no longer exist in the main ...
3
votes
1answer
33 views

why is the header for the JSON RPC interface text/plain? vs application/json?

the bitcoin core docs call out that RPC HTTP requests must include a Content-Type header set to text/plain and all the example commands confirm this header. why is it text/plain instead of application/...
0
votes
1answer
276 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....
1
vote
1answer
239 views

Does listsinceblock list all transactions, or only transactions my wallet is interested in?

Wondering if I call listsinceblock "", will I get all transactions that ever occurred on the blockchain regardless of whether my wallet was party to it, or will it only be a list of transactions ...
0
votes
1answer
37 views

Bitcoin Core JSONRPC only accept requests with 0.0.0.0 in configs

I've lunched a Bitcoin Core server, and trying to connect to it via JSON-RPC. This is my configuration settings: server=1 rpcuser=admin rpcpassword=password rpcport=1234 rpcallowip=94.183.32.151 ...
1
vote
2answers
55 views

Checking if transaction is RBF

A transaction can be RBF if itself is a RBF, or it spends outputs from a RBF transaction. Is there a way to use bitcoin RPC node to check if a transaction is spending outputs from a RBF transcation?
0
votes
1answer
210 views

How to properly use the rpc command `listunspent` with `bitcore-lib` to create a transaction and get the transaction hash?

I am trying to use the rpc command listunspent to get all the UTXOs relevant to an address, and then I am trying to pass it to a transaction, using bitcore-lib. Below is my code: const Client = ...
1
vote
1answer
40 views

Recommended way to automatically retry sending of bitcoin via JSONRPC upon failure

Sometimes when sending bitcoin out, sometimes bitcoind's JSON-RPC replies with a 500 error. I'd like to safely automatically retry, but it seems that there's not way to set a nonce to safely retry. I ...
0
votes
0answers
20 views

Using multiple wallets on one “bitcoind” process

Please how do I implement the code below in php Create a wallet for each of the clients using: bitcoin-cli.exe createwallet When you want to perform any action on any wallet simply use: bitcoin-...
1
vote
1answer
47 views

Electrum address syncronization

I need to periodically check the balance of a number of bitcoin addresses (a few tens or hundreds addresses). I noticed that Electrum may syncronize a thousand or more imported addresses in a matter ...
0
votes
1answer
33 views

Is it possible to skip verification of blockchain data when using bitcoin core?

Because I need bitcoin core client only for JSON-RPC requests. Will I need pruned initialization or normal initialization of bitcoin core client for successfully running such requests? (I guess client ...
0
votes
0answers
27 views

How to strip witness data from block in json/hex format?

I have a JSON format block (Height:500000) here. As you can see here, it is a segwit block and its actual size is 1048581 and stripped size (without witness data) is 981404. I want to strip full node'...
1
vote
1answer
37 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]...
3
votes
2answers
2k views

How to calculate low/medium/high fee transaction fee?

I have a website where the users can send and withdraw funds using Bitcoin, I'd like to give them the chance of set their own custom fee (Low, medium and high) instead of the site to choose a fixed ...
5
votes
1answer
4k views

What does the Bitcoin RPC mean and how is it used?

What does Bitcoin RPC mean and how is it used? I see the term RPC referenced multiple times, but not show what it means and how its used. I see it in JSON-RPC. I know json is just a data format, ...
1
vote
2answers
421 views

Bitcoin RPC returning 401

I am using node-bitcoin-rpc to do some api calls to bitcoind, but I am getting 401 error. I know this simply means unauthorized, but I have no authorization enable in my config file. Howerver I can ...
1
vote
1answer
52 views

Why estimatesmart fee returning the same fee for diffeent blocks number?

I am trying to calculate the fee per kb using the estimatesmartfee. I had called estimatesmart fee with different type of blocks number .The fee remaing the same. estimatesmartfee(2)=...
1
vote
1answer
196 views

can not access via RPC to litecoin node

I set up a litecoin full node in AWS. I opened ports 22, 80 and 9332. Also from my laptop I cloned this project https://github.com/janoside/btc-rpc-explorer I executed on my local but unfortunately I ...
1
vote
2answers
142 views

how to set the transactions fee using the RPC call?

I am creating the web wallet for the bitcoin , I want to allow web wallet users to set the transactions fee . Is their is any rpc call available for setting the transactions fee (for setting ...
0
votes
0answers
32 views

How to calculate a candidate block for mining using bitcoind RPC (without getBlockTemplate) and having into acount MAX_BLOCK_SIGOPS

I'm trying to calculate candidate blocks without using getBlockTemplate. Im using the data returned by bitcoind RPC, but I can't find a reliable way to get the required signatures per transaction in ...
2
votes
1answer
1k views

bitcoind sendfrom with minconf=0

Is it possible using bitcoind JSON-RPC API to receive funds from someone and send it immediately to another third-party address? I do not want to wait for 1 confirmation. getbalance with minconf=0 ...
0
votes
1answer
86 views

json-rpc of bitcoin not working for testnet(curl command)

I am trying this command to get transaction from bitcoin testnet: curl --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "gettransaction", "params": ["txId"] }' -H 'content-type: text/...
0
votes
1answer
1k views

json_rpc_call solo mining with bitcoin running on Windows 7 for antminer

I setup BitcoinD on a Windows 7 PC. I configured for defaults except user/pw and rpcallowip=192.168.1.0/255.255.255.0. have also tried 192.168.1.* with no luck. I ultimately want to use an Antminer ...
0
votes
2answers
114 views

How do I configure a port in my .conf file?

This is what my conf file looks like: prune=600 maxconnections=12 maxuploadtarget=20 rpcuser=user rpcpassword=password keypool=10000 server=1 [main] rpcport=5040 Whenever I run this from the ...
0
votes
0answers
16 views

why is getdescriptorinfo returning a “function needed” error with a sortedmulti descriptor?

When trying: bitcoin-cli getdescriptorinfo "wsh(sortedmulti(2,tpubDFck48zH8ZzteKKZCR9WMVBJwHZayhQmtCDyDRzHsU7VMTwEXohD23h1CBiizKtFtWck2fVegNDRM193nGx3VLs1RTSGNc1iePKpc1JvsS6/*,...
0
votes
1answer
41 views

`bitcoind` RPC: ask if syncing headers or blocks

Is there a way to know from bitcoind RPC if it's syncing headers or blocks? And is there a way to know the header sync progress? Even if not directly available, is it possible to derive header sync ...
0
votes
0answers
31 views

btc qt walletdump

I'd like to dump my entire btc qt wallet, while syncing, into an electrum wallet. I don't want to do it receiving address by receiving address. I already emptied out all my receiving addresses but ...
6
votes
2answers
1k 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
0
votes
0answers
73 views

Cannot open dump wallet file (code-8)

Is anybody familiar with this problem using btc qt debug console? Would like to dump wallet and sweep into electrum.
1
vote
1answer
80 views

How to split the funds and send X% to fee wallet and the remaining funds to another wallet?

Anybody have any idea about how to do it? User send the bitcoins X% goes to fee wallet remaining funds goes to service wallet I'm trying to use the "sendfrom" but it's not working because he only ...
0
votes
1answer
999 views

How to get a complete list of transactions?

listtransactions - 9 provides the latest transactions and actually all =) How to get all transactions?
2
votes
1answer
330 views

How to edit the label of an existing address exactly like in bitcoin-qt but instead using RPC calls?

I am trying to edit the label of a bitcoin address in my wallet outside of bitcoin-qt. Currently I only know of 'setaccount' but it results in two addresses after editing one, it assigns a new address ...
0
votes
2answers
139 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
37 views

In the basic Wallet based in QT, How can i get by RPC the stored addresses and labels?

this question is for you to ask about the QT wallet, in the section to send coins, there is an address window, and it has the list of the stored addresses we save along the time. So using RPC, do you ...
0
votes
1answer
137 views

Web wallet making direct RPC calls to bitcoin node

Is it good idea to make direct RPC call's to node computer to generate web wallet addresses here is what i am trying to implement i want to create new web wallet based on bitcoin and want to allow ...
1
vote
1answer
488 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 ...
2
votes
1answer
1k views

Can't connect to Bitcoind remotely

I am running a Bitcoin Cash node on my server, and starting it like this: start bitcoind.exe --server=1 --rpcuser=user --rpcpassword=password --rest=1 --rpcport=8332 --datadir=F:\Bitcoin --bind=10.1....
2
votes
1answer
612 views

How to get total number of transactions from bitcoin core wallet using rpc

I'm trying to implement paginations using : https://chainquery.com/bitcoin-api/listtransactions I want to have reverse listing (oldest first), so I need to get total number of transaction returned ...
0
votes
1answer
212 views

Can't connect to Bitcoin RPC on DigitalOcean server

I am running bitcoind on a DigitalOcean droplet with public IP address e.g. 1.1.1.1. I would like to connect to it via RPC from another DigitalOcean droplet with public IP address e.g. 2.2.2.2. Both ...

1
2 3 4 5
14