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.

Filter by
Sorted by
Tagged with
40 votes
1 answer
40k views

What is the difference between the rpc port 8332 and port 8333?

What is the difference between the protocol and commands used on default ports 8332 and port 8333? From what I gather, port 8332 is the RPC port, it's "sensitive", only allowed by local host by ...
makerofthings7's user avatar
39 votes
11 answers
38k views

How to check if the block chain is up to date using bitcoind or json-rpc?

I read the full api method list and did not seem to find one. I suppose there is no command specifically for that purpose, so what is the general way of doing this? I would consider checking the ...
Steven Roose's user avatar
  • 11.8k
27 votes
5 answers
10k views

how to monitor +20,000 addresses for new received transactions?

I have around 20000 generated addresses which I want to monitor for new transactions. More addresses should probably come. Customers should use every address only once but I would like to monitor ...
curiosity's user avatar
  • 365
25 votes
2 answers
45k views

json-rpc via curl

I'am running Bitcoin-qt 0.8.6.1-beta on Qt 4.8.3 on windows 7 64. below is my .conf content in %appdata%/bitcoin folder rpcuser=bitcoinrpc rpcpassword=ahything rpcallowip=127.0.0.1 rpcallowip=192....
Gian's user avatar
  • 376
24 votes
3 answers
14k views

Bitcoin-Qt command line control on Mac

I'm trying to communicate with the new Bitcoin-Qt -server via a command line on Mac. I run ./Bitcoin-Qt -server, the application starts, but my terminal window is stuck on an empty line (no matter ...
ThePiachu's user avatar
  • 43k
23 votes
1 answer
18k views

Get non-wallet transactions using bitcoin rpc (gettransaction)

I am playing around with Bitcoin-qt. I want to iterate all blocks and all their transactions. So far I've been able to get a list of all tx's in the blocks I want to. Now I want to get information ...
Lars Holdgaard's user avatar
22 votes
2 answers
18k views

How do I use walletnotify?

I have bitcoin daemon and I want to use the walletnotify option with a json-rpc call. Some of the examples use a "transaction.sh" file for walletnotify. What is it for? What do I have to write in ...
M.R's user avatar
  • 501
17 votes
2 answers
27k views

What is rpcuser?

Can I just make up a value for rpcuser/rpcpassword in bitcoin.conf? Or do I have to set one up somewhere?
Charlie's user avatar
  • 171
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
13 votes
1 answer
5k views

Why is JSON-RPC over SSL "strongly discouraged"?

The Wiki contains a page that simply states: JSON-RPC over SSL is strongly discouraged Why? I found a method for enabling JSON_RPC over SSL here. The post mentions nothing about JSON-RPC over SSL ...
Rich Apodaca's user avatar
  • 2,321
12 votes
2 answers
8k views

What is chainwork?

If I run the RPC call getBlock on the bitcoin-qt client it gives me field called chainwork containing a hash. I can't find any information what this value is about. Request: getblock ...
Dennis Kriechel's user avatar
12 votes
1 answer
2k views

What is the difference between time, blocktime and timereceived?

What is exactly the difference between time, blocktime and timereceived in transaction information returned by Bitcoind JSON RPC API? For example: { "amount": 0.02, "blockindex": 45, "...
Alexey Kalmykov's user avatar
12 votes
2 answers
5k views

How to setup a LAN network with only one bitcoind client downloading the blockchain?

I want to do the following: I have one small server PC at home. I want to install bitcoind on that machine to download the blockchain information. Then I want this machine to accept RPC calls from my ...
Steven Roose's user avatar
  • 11.8k
10 votes
2 answers
3k views

What is the difference between the bitcoind command line options "addnode" and "connect"?

As seen here: https://en.bitcoin.it/wiki/Running_Bitcoin#Command-line_arguments -addnode=ip Add a node to connect to and attempt to keep the connection open -connect=ip Connect ...
user3145's user avatar
  • 867
10 votes
1 answer
16k views

error : incorrect rpcuser or rpcpassword (authorization failed)

I started bitcoind -datadir=/mnt/btc but everytime I try to use bitcoin-cli it says : error : incorrect rpcuser or rpcpassword (authorization failed) I can't find bitcoin.conf (neither in the ...
ChiseledAbs's user avatar
10 votes
2 answers
8k views

Is there a light (SPV) version of bitcoin core (bitcoind)?

I'm trying to develop an SPV Bitcoin client which makes use of a library requiring bitcoin core (a running bitcoind service). However, from what I understand, Bitcoin Core is full node, meaning that ...
FedFranz's user avatar
  • 652
10 votes
3 answers
2k views

What's the best practice for creating and maintaining an address index?

I am working on a Blockchain.info-like block explorer, and I have some questions regarding best practice for data retrieval. Bitcoin Core stores and serves all blocks and, if txindex is set to 1, all ...
user avatar
10 votes
1 answer
453 views

Obtaining historical stale blocks (chaintips) without old node

I'm attempting to do some research surrounding stale 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 ...
Mason Ticehurst's user avatar
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
2k views

How secure is calling bitcoind JSON-RPC?

How secure is calling bitcoind through a JSON-RPC? For example, if I run it on one of my computers, and try calling it from another computer (provided neither of them are compromised), can someone ...
ThePiachu's user avatar
  • 43k
9 votes
1 answer
10k 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, ...
Patoshi パトシ's user avatar
9 votes
3 answers
9k views

How can an unconfirmed transaction be removed from the memory pool?

Using Bitcoind and Json-RPC, how can I remove an unconfirmed transaction from the memory pool? The scenario being that I want to remove the unconfirmed transaction because it's not getting confirmed, ...
Flavien's user avatar
  • 1,027
9 votes
1 answer
625 views

Importprivkey's "label" - is it the same as an account?

The "importprivkey" API call allows one to import a private key and save it with a label. Is the "label" in the API call synonymous with an account used in the wallet?
ThePiachu's user avatar
  • 43k
9 votes
1 answer
16k views

How to open bitcoind -daemon using command line in Windows?

I have created a conf file on the following path: C:\Users\NAME\AppData\Roaming\Bitcoin\bitcoin.conf When I run the Bitcoind file, nothing happens. My command line window becomes unresponsive as if ...
Lars Holdgaard's user avatar
9 votes
1 answer
2k views

Passing a JSON argument to bitcoind in Windows command prompt

I've been trying to use sendmany on my local installation of Bitcoin-qt (version 0.7.0) from the Windows command prompt. I've seen examples but when I try them all I get is a JSON parsing error. I ...
Meni Rosenfeld's user avatar
8 votes
1 answer
976 views

Why does Bitcoin Core support a transaction index but not an address index?

Bitcoin Core has the CLI option -txindex to maintain a full transaction index for RPC calls. That sounds useful for some use cases, like for a blockchain explorer. It seems perfectly logical then that ...
Vojtěch Strnad's user avatar
8 votes
3 answers
3k views

What's the difference between the Bitcoin's peer to peer protocol and the RPC API?

Bitcoin implements both a peer-to-peer synchronization protocol (normally on port 8333) and a JSON-RPC API (normally on port 8332). What are these designed to accomplish? If I'm trying to implement a ...
Nick ODell's user avatar
  • 29.3k
8 votes
3 answers
2k views

What's the best way for a website to detect payments from green addresses?

Does any proven third party code exist for this? Edit* To be more specific, what I haven't been able to find out is how to get the sender's bitcoin address when receiving a transaction. As far as ...
Amin's user avatar
  • 1,482
8 votes
2 answers
2k views

Import multiple watch-only addresses using importaddress?

With the importaddress RPC command it is possible to import one watch-only address. But how can I do that with, let's say, 100?
RoqueNE's user avatar
  • 81
8 votes
1 answer
5k views

How does the electrum wallet 'payto' command work

Hello fellow bitcoin users, I'm currently working on developing an application that takes advantage of the Electrum wallet in order to receive and payout to users of my service. My application uses ...
George Davies's user avatar
8 votes
1 answer
1k views

Does bitcoind accept batch RPC calls?

Am currently sending RPC calls to bitcoind in Python3 in series using JSON: import json, requests def pull(command, foo): headers = {'content-type': 'application/json'} payload = json.dumps({...
SLee's user avatar
  • 133
8 votes
3 answers
6k views

Checking/polling a balance of an address in Electrum via the command line/RPC

Suppose, I've dynamically -- via the command line/RPC -- created an address or payment_query in Electrum. And saved its details in a database along with the amount of bitcoins I expect to receive. ...
Kolayn's user avatar
  • 81
8 votes
1 answer
447 views

Is there an API for price estimation?

I need to display at my website what a certain amount of Bitcoins will likely cost. I can fetch the latest price using the MtGox API and multiply it by the amount, but for large amounts this is ...
Maestro's user avatar
  • 1,967
8 votes
1 answer
1k views

Using bitcoins JSON RPC, how can I confirm a transaction I published?

I have created, signed and sent a raw transaction via bitcoind RPC. Now I want to wait for it to have n confirmations. Considering transaction malleability, I can't just check the "confirmations" ...
lvella's user avatar
  • 256
7 votes
9 answers
8k views

How to communicate between Java and bitcoind?

I am having problems communicating between Java and bitcoind - every JSON RPC library I try has some issues. Can anyone provide a working implementation of even the most basic JSON RPC communication ...
ThePiachu's user avatar
  • 43k
7 votes
7 answers
19k views

How to install a Bitcoin client on Ubuntu Server

I've googled a lot for this issue. Hehe. I have found some tutorials, but they were of no use because they are for systems that do have a GUI. I have no plans to install a GUI on that system, and I ...
ParanoidE's user avatar
  • 101
7 votes
3 answers
2k views

How to know when a payment has been received by bitcoind?

I want to create a website which involves the creation of a new single-use address that a user would send bitcoins to. I'd like to know programmatically when the user has sent bitcoins to the address ...
Sanjay's user avatar
  • 205
7 votes
3 answers
2k views

Is it safe to run bitcoind on another server

I'm making first, rough concepts of some ideas for bitcoin-enabled services I have in mind. One thing that I wonder is, is there a best-practise approach on running bitcoind on another server that ...
Gundon's user avatar
  • 271
7 votes
2 answers
3k views

Add a Watch-only Wallet in Bitcoind

When running bitcoind under OSX/Linux, how can we add a watch-only wallet using the JSON RPC? Do we need the public key or is the bitcoin address sufficient?
Nyxynyx's user avatar
  • 271
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
2 answers
3k views

Calculating address balance

Is there some method how you can calculate the balance of an address without resorting to web-based API's? When I import a private key the rescanning of bitcoind takes hours. I know to get a balance ...
Maestro's user avatar
  • 1,967
7 votes
1 answer
713 views

Can I send almost 1MB transaction?

Block size is still limited to 1MB. As I understood, transaction size is no longer limited. So can I be sure that my transaction with 29000 outputs and reliable fee will be included into block? Or ...
Lizzy Bug's user avatar
7 votes
2 answers
758 views

Bitcoind Performance for production usage

Lets say we have one instance of bitcoind running on the production server. And our exchange software/application interacts with it using RPC callbacks for: address generation withdrawal ...
Muhammad Bilal's user avatar
6 votes
1 answer
3k views

How Do HD Wallets Keep Track of all accounts?

If a HD Wallet generates 1,000 accounts for example. How would they keep track of all of the account's balances, if someone for example, paid into the 455th account, they would want to update the ...
Kyle Graham's user avatar
6 votes
2 answers
4k views

How do I query a remote bitcoin node like RPC?

I know how to query the blockchain stored on my machine programmatically using bitcoind commands. Is it possible to do the same on a public node? For example, is it possible to send “getblockcount” ...
u2843's user avatar
  • 125
6 votes
1 answer
2k views

listsinceblock parameter: target-confirmations

listsinceblock help returns: listsinceblock ( "blockhash" target-confirmations ) Get all transactions in blocks since block [blockhash], or all transactions if omitted Arguments: 1. "blockhash" (...
Doug Peters's user avatar
  • 1,366
6 votes
3 answers
3k views

Is there a lightweight blockchain parser library/server?

I'm using bitcoin-qt and have a local copy of the blockchain, in which I'm running some analysis with the JSON-RPC API using mostly getblock and getrawtransaction. I have no need writing or sending ...
Bruno Kim's user avatar
  • 161
6 votes
1 answer
3k views

What is the standard protocol for pools/miners?

The Bitcoin client protocol is well documented in the Bitcoin Wiki, but I can't find much on the protocol used by pools and miners. Is it described anywhere?
ThePiachu's user avatar
  • 43k
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
3 answers
1k views

How to receive payments online to single address per user in scalable way?

Suppose we are building online casino/market and want to receive payments. To be scalable, safe and have good user experience, we: cannot generate new address for every single payment. Having single ...
Piotr Müller's user avatar

1
2 3 4 5
17