Questions tagged [json-rpc]

A remote-procedure-call (RPC) interface provided by the Bitcoin Core wallet and it's companion software bitcoind. This RPC interface uses the Javascript Object Notation (JSON) serialization format for data and allows other software programs to interact with Bitcoin-Core.

132 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
6 votes
3 answers
17k views

Historical BTC data in JSON

As of now, the only API I can find that serves historical data is https://blockchain.info/charts/market-price?timespan=60days&format=json. It only uses USD, and I need to serve non-USD data. My ...
Christopher Sardegna's user avatar
4 votes
0 answers
411 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?
tokyo's user avatar
  • 65
3 votes
0 answers
110 views

Problems with multiple wallets on RPC in bitcoin-core

I have been playing around a bit with Bitcoin Core (version 23.0), more specifically connecting to different wallets in Bitcoin Core through RPC in Python. I have found this library and tried to ...
chilixxd's user avatar
3 votes
2 answers
749 views

RPC port 8332 not accessible after reboot

I have compiled and installed Bitcoin Core for the first time on Debian 11. Everything is up and running except that RPC port 8332 is not accessible after a reboot. I get the following error running ...
nemomaximus's user avatar
3 votes
0 answers
676 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 ...
nopara73's user avatar
  • 796
3 votes
0 answers
512 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 ...
Gemohn Herbile's user avatar
3 votes
0 answers
179 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 ...
Eleven's user avatar
  • 187
3 votes
0 answers
127 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; ...
Eleven's user avatar
  • 187
3 votes
0 answers
279 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 ...
Gynsuk Euon's user avatar
3 votes
1 answer
188 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 ...
Piotr Müller's user avatar
2 votes
2 answers
148 views

Electrum load_wallet through json-rpcs does not accept "wallet" parameter

When calling load_wallet through json-rpc, using "wallet" param with a path to the wallet throws an error: Commands.load_wallet() got an unexpected keyword argument 'wallet' In the same ...
Meglio's user avatar
  • 287
2 votes
1 answer
497 views

How to import a descriptor into a wallet?

I am trying to import a descriptor into a blank wallet but I get a JSON parsing error. $ cli createwallet "test" false true "" false true $ cli -rpcwallet=test importdescriptors '[{...
Lepus Cyberneticus's user avatar
2 votes
0 answers
178 views

How to use `blockchain.scripthash.subscribe` from a tcp socket in Electrum server

As a personal exercise I want to write a minimal copy of BTCPayServer. I decided to use Electrum server instead of a node to fetch information from the network. My final goal is to be able to track ...
Andrés's user avatar
  • 121
2 votes
0 answers
138 views

Add inputs and outputs to a transaction signed with sighash SINGLE | ANYONECANPAY

I created a transaction with one input and one output, and signed it using sighash SINGLE | ANYONECANPAY. Can I add further inputs and outputs with another wallet using bitcoin-cli?
RobinLinus's user avatar
2 votes
0 answers
108 views

How to compute deposits from the output of listsinceblock?

I am writing a program that, given the JSON outputs from multiple separate RPC calls to listsinceblock, stores valid deposit transactions in a database and then computes the total deposit for every ...
philosopher's user avatar
2 votes
0 answers
118 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 ...
Ron's user avatar
  • 1,453
2 votes
1 answer
2k 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....
Eutherpy's user avatar
  • 153
2 votes
1 answer
804 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 ...
Pavel Niedoba's user avatar
2 votes
0 answers
196 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 ...
wmbtrmb's user avatar
  • 121
2 votes
0 answers
104 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 ...
Noureddine's user avatar
2 votes
0 answers
317 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 ...
bdimych's user avatar
  • 21
2 votes
0 answers
726 views

JSON RPC from external server

I'm having trouble connecting to my node via JSON RPC from an external server. On the same machine, I'm able to pass the commands through bitcoin-cli and also locally I am able to run this PHP file ...
m1xolyd1an's user avatar
  • 5,596
2 votes
0 answers
230 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 ...
jangorecki's user avatar
2 votes
0 answers
665 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 ...
tom's user avatar
  • 21
2 votes
0 answers
397 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 ...
Chris Stewart's user avatar
2 votes
0 answers
573 views

What JSON RPC commands are suitable for a multi-tenant wallet service?

I'm looking at the JSON-RPC commands available in the QT client so I can create a multi-tenant wallet service on top of it. In other words, people would sign up for my site and have the ability to ...
makerofthings7's user avatar
2 votes
0 answers
313 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 ...
o0'.'s user avatar
  • 5,230
1 vote
0 answers
46 views

walletprocesspsbt rpc not signing psbt tx

After extensive regtest testing I've been unable to reproduce this issue. This is a gist to regtest psbt commands that do work. https://gist.github.com/miketwenty1/ecb9acdbca858878f1856b75493fef4c ...
Michael Tidwell's user avatar
1 vote
0 answers
137 views

How to access bitcoin server's RPC interface remotely?

I am running a bitcoin daemon (launched via plist file) on MacOS with these parameters: -server (to accept command line and JSON-RPC commands) -daemon (to run in the background as a daemon and accept ...
Claudio Floreani's user avatar
1 vote
0 answers
392 views

Rpc work Queue Exceeded

I am trying to make rpc calls to an Rpc Interface "listunspent". So i get this Error: ESOCKETTIMEDOUT. I checked the bitcoin node debug file and saw the error message "Depth queue work ...
Abbeville's user avatar
1 vote
0 answers
47 views

How to check whether bitcoin is deposited or not with RPC API?

I am developing a new feature in my website that raises a user's level when they deposit to a new bitcoin address. Using RPC API, I was successful in creating a new wallet address and printing it on ...
dazzle0977's user avatar
1 vote
0 answers
29 views

How to internally call another RPC command inside bitcoin core server?

I'm new to Bitcoin Core development, and I am trying to find a way to execute another RPC command from within a new RPC command I'm trying to add. I believe the Node interface has the executeRpc() ...
andrewz's user avatar
  • 257
1 vote
0 answers
126 views

BITCOIN: get bitcoin transactions list by time using RPC on my node

I want to get the transaction list of a bitcoin node i have. I need to know: How do i get the transaction list filtered by time (1h, 2h,...) using RPC, I have been searching on bitcoin developer: RPC ...
Simon's user avatar
  • 11
1 vote
2 answers
94 views

Multisig synchronization

I understand what the multisig wallets are but I need help understanding what exactly this script does: https://gist.github.com/gavinandresen/3882537 If I understand correctly, bitcoinds are bitcoin ...
Marko's user avatar
  • 111
1 vote
0 answers
136 views

listreceivedbyaddress does not return any information about change addresses, is there any alternative?

listreceivedbyaddress does not return info about change addresses (m/84'/1'/0'/1/*) , only about receiving addresses (m/84'/1'/0'/0/*). I've found out that getreceivedbyaddress "address" ...
le0's user avatar
  • 187
1 vote
0 answers
70 views

Why does estimatesmartfee and walletcreatefundedpsbt with conf_target show a wide disparity?

Seems that when my testnet node boots up estimatesmartfee works just fine generally: {"jsonrpc":"1.0","id":"curltest","method":"estimatesmartfee&...
Fontaine's user avatar
  • 466
1 vote
0 answers
97 views

Bitcoin rpc getbalance wrong

I am using v0.11 rpc, In blockchain balance and my rpc balance are different. rpc balance is wrong why? But transactions are correct.
Magesh ogss's user avatar
1 vote
0 answers
633 views

Connection refused when using bitcoinrpc on Linux

I am new to python-bitcoinrpc(also new to VM Linux actually) and I want to use the blockchain parser from alecalve to get ordered blocks. I used Windows to download the blockchain data into an ...
Lylian's user avatar
  • 11
1 vote
1 answer
150 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']...
Fontaine's user avatar
  • 466
1 vote
0 answers
59 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 ...
decentralized.b's user avatar
1 vote
0 answers
28 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/...
Hyunsoo's user avatar
  • 363
1 vote
0 answers
103 views

Manipulation of Bitcoin RPC with programmatically

I'd like to use Bitcoin source code(only RPC part) to manipulate with programmatically. I have bitcoind and bitcoin-cli installed in my local computer but I don't know how to write code for my ...
Hyunsoo's user avatar
  • 363
1 vote
0 answers
217 views

TimeoutError: [WinError 10060] when trying to connect to bitcoin rpc from a pc on the same local area network

I have a laptop with win10 installed. It is now running a full bitcoin node perfectly. I am already able to make rpc requests from the laptop using python and get valid responses. The laptop is ...
PouJa's user avatar
  • 11
1 vote
0 answers
292 views

Why do I get -4 error code from Bitcoin RPC

I'm directly dealing with Bitcoin RPC and my first step is loading wallet. At first I try to check listwallets to find the current wallet there. If not, trying to load wallet: Post body = {"method":"...
Gleb's user avatar
  • 25
1 vote
0 answers
147 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", "...
Fontaine's user avatar
  • 466
1 vote
1 answer
1k 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 ...
user avatar
1 vote
1 answer
247 views

Access Kucoin OHLC data from API?

I need to access kucoin Open-high-low-close (OHLC) data from Kucoin API. Looking in https://docs.kucoin.com/#get-trade-histories, I deduced that to access OHLC data (for instance BTC versus USDT, ...
daveturner's user avatar
1 vote
0 answers
175 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: ...
Joseratts's user avatar
1 vote
0 answers
51 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 ?
Pankaj Kumar's user avatar
1 vote
0 answers
88 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 ...
Pankaj Kumar's user avatar