Questions tagged [json-rpc]

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

130 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
4
votes
1answer
311 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 ...
4
votes
1answer
342 views

How to explore transaction chain via Original Bitcoin API as blockexplorer does it

Is there any possibility to explore transaction chain via Original Bitcoin API (https://en.bitcoin.it/wiki/Original_Bitcoin_client/API_Calls_list) as the blockexplorer does it. If not, why?
3
votes
0answers
78 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
0answers
444 views

bitcoind inconsistent authentication error

I am using a Linux computer. The issue I am having is that sometimes I have to use "kill -s 9 (bitcoind pid)" and restart bitcoind using "bitcoind -txindex" because bitcoind will sometimes not let me ...
3
votes
3answers
3k views

jsonRPCClient.php states its served a 401 error response

When I execute my php file from the command line I get this: <pre> PHP Warning: fopen(http://...@127.0.0.1:8332/): failed to open stream: HTTP request failed! HTTP/1.0 401 Authorization ...
3
votes
0answers
150 views

getblocktemplate times out after being called many times

I am writing a program about bitcoin mining. It calls the RPC method getblocktemplate every second. Sometimes bitcoind doesn't reply to my RPC getblocktemplate request, but bitcoind still accepted new ...
3
votes
0answers
105 views

When does the “reject” string have an empty reject reason upon submitting a new block?

I submitted a new block using the rpc command submit. And I just got a "reject" string without a reject reason. I checked the bitcoind source code, and found that it usually sends a reject reason; ...
3
votes
0answers
254 views

Bitcoind JSON-RPC - getbalance with 0 confirmations not included

When I access bitcoind through JSON-RPC and query: getbalance '*' 0 It does not include transactions with 0 confirmations. Only when a transaction has least 1 confirmation it is included in that ...
3
votes
1answer
165 views

What is the best way to implement withdrawal in online service?

Suppose we have a service, which holds user balance in Bitcoin. How to implement withdrawal from bitcoin perspective? Which RPC call to use? How to archive transaction to have a proof of sending ...
2
votes
1answer
26 views

How to prevent specific method calls to bitcoin node

I have setup a bitcoin node and can access RPC methods via curl or bitcoin-cli. Now I don't want to share the node with multiple parties and in such case, I want to restict some functions from being ...
2
votes
0answers
48 views

Using bitcoind RPC to identify an incoming transaction that has been replaced using BIP125 Replace-By-Fee

In the context of running a web service that accepts payments in Bitcoin, how can we use bitcoind to identify a transaction that has been replaced using BIP125 Replace-By-Fee? When RBF is used, a new ...
2
votes
1answer
206 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 ...
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
0answers
399 views

Bitcoin RPC: How to find the transaction that spends a TXO?

I suspect there is no good way to do it. However is there any sub-optimal way to find the transaction that spends a transaction output (knowing the txid and index) with Bitcoin RPC? Assuming txindex=1 ...
2
votes
1answer
563 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 ...
2
votes
0answers
166 views

Can I balance load between two instances of bitcoin daemon by switching RPC request?

The question is pretty simple. I have two instances of bitcoin daemon. When I'm running my pool with parallel RPC requests to each instance it calls daemons too often and daemons queue of RPC calls ...
2
votes
0answers
561 views

How to test Bitcoin's RPC interface?

I can't find any tool to test RPC interface. I am looking for something like Postman (Chrome extenstion). I would like to send request (with login and password) and see their responses in JSON.
2
votes
0answers
91 views

The blockchain lookup speed in a local machine

How to determine the exact required time (seconds, milliseconds) to find a particular block when searching within a local blockchain using address? Is there any way to make a benchmark to study the ...
2
votes
0answers
225 views

bitcoind verifychain vs reindex

actually this is not Bitcoin but Litecoin 0.13.2 on Linux Mint, litecoind stopped with "bus error" just on start verifying blocks: tail ~/.litecoin/debug.log ... 2017-05-06 21:15:26 Verifying last ...
2
votes
0answers
765 views

I can't connect to RPC from python. JSONRPCException: -342

Tryed to run this code : from bitcoinrpc.authproxy import AuthServiceProxy, JSONRPCException import logging import json logging.basicConfig() logging.getLogger("BitcoinRPC").setLevel(logging.DEBUG) ...
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 ...
2
votes
1answer
965 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 ...
2
votes
0answers
185 views

Get as many blocks as possible (stale, invalid, orphans)

I would like to download (and access) as much blocks as possible - including stale (extinct) blocks, orphans blocks and invalid blocks. I have 0.11 official client. My node is already synchronized but ...
2
votes
0answers
553 views

on testnet: 'transaction already in blockchain'.. but it isn't

At least I don't think so! I'm trying to create a wallet infrastructure to minimise fees, and so I've been experimenting with raw transactions. I'm quite clueless but fortunately have enough sense to ...
2
votes
0answers
358 views

JSON RPC calls for Armory wallet

I'm trying to access an armory wallet via RPCs. For instance using the procedure listreceivedbyaddress should ideally return all of the addresses in my Armory wallet. However, when I run this from my ...
2
votes
0answers
308 views

API: keeping account balance positive (+knowing in advance the transaction fee)

I'm using the json API. I need to keep all the account balances positive: I call getbalance first, check if it has enough bitcoins to proceed, and then move or sendfrom. This approach causes two ...
1
vote
0answers
16 views

listreceivedbyaddress missing transactions after restore

After restoring wallet from wallet.dat balance is identical, but listreceivedbyaddress 0 do not have the transactions associated with wallet. listunspent 0 show all the transactions, but it will ...
1
vote
2answers
365 views

Unable to bind any endpoint for RPC server

I recently updated my bitcoin docker image to bitcoing v0.18.0 version and can't allow external rpc connections to it now. It binds to localhost if I set rpcallowip=X.X.X.X, then I tried to used ...
1
vote
0answers
59 views

where is located the implementation of getaddressutxos method of litecoin rpc

Hi I have started to play with litecoin node making queries via rpc using litecoin-cli. There are some methods that caught my attention and have something related to "addressindex" these are: ...
1
vote
1answer
29 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 ...
1
vote
1answer
35 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
118 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
94 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 ...
1
vote
0answers
41 views

In which file node rpc details stored in Insight-api

Bitpay insight api https://github.com/bitpay/insight-api allows blockchain epxlore functionality I cant find the files in which insight-api store the rpc details ?
1
vote
0answers
56 views

How can I set the rpc user credentials in Insight to connect to a custom node?

Bitpay has done brilliant work in creating the bitcore libraries pack. I am stuck trying to find the file in which we can add the rpc user name and password for connecting to a custom node inside the ...
1
vote
1answer
388 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-...
1
vote
1answer
355 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
32 views

“label” field in the transaction list

Looking at this dev reference guide I found a returned field called label. Is this the same label specified to each key when using importmulti?
1
vote
1answer
200 views

Bitcoind Cannot assign requested address

I'm trying to run a regtest bitcoind node but I'm always receiving the following error connect() to [2a05:d01c:a35:2902:6e18:7290:ff27:e9aa]:18444 failed: Cannot assign requested address (99) ...
1
vote
1answer
308 views

Bitcoin cash - Transaction history as JSON

Is there a way/a service to retrieve all bitcoin cash transaction for a bitcoin cash address in JSON format? Like the API of blockchain.info offers for bitcoin core?
1
vote
0answers
160 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
0answers
256 views

Bitcoin rpc-json for web javascript

So is there any js file that you can use to connect a json-rpc server on a client side website? I seem to find one for PHP but not JavaScript or there isn't one?
1
vote
0answers
201 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 ...
1
vote
1answer
76 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
175 views

sendtoaddress not deducting from account

I have two accounts called "hot" and "cold" and have few address and transactions in each of them. I am trying to move some funds between "hot" to "cold" and using sendtoaddress like this bitcoin-...
1
vote
2answers
1k views

How do you change rpc password?

I'm trying to run bitcoind with a changed conf file, but for some reason the password it thinks is incorrect. Is there a way I can change the rpc username and password?
1
vote
0answers
98 views

What is QuoteAssetVolume and BaseAssetVolume?

This is a JSON result for a candle returned by an exchange API for ETHBTC: { openTime: 1517340600000, open: '0.10635000', high: '0.10742000', low: '0.10635000', close: '0.10687200', volume: ...
1
vote
0answers
263 views

getpeerinfo peer port number

Working on regtest (Bitcoin Core 0.15.1) I've realized that some peers are identified just by ip instead of by ip:port when querying bitcoin-cli getpeerinfo. I've noticed that when it happens the ...
1
vote
0answers
49 views

Confusing about received transaction?

I have two addresses in my wallet and sent some coins to one and set change to the other, both addresses are wallet generated addresses(not watchonly ones), but the transaction returned from RPC shows ...
1
vote
0answers
74 views

Polling for transactions — possible scalability issues?

We are generating a few thousand addresses by an offline wallet, and plan to run a bitcoind node to check for incoming transfers. The idea is to check an address e.g. every second and get the list of ...