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
33
votes
10answers
27k 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 ...
26
votes
4answers
7k 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 ...
24
votes
1answer
25k 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 ...
24
votes
2answers
12k 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 ...
22
votes
2answers
29k 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....
18
votes
1answer
11k 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 ...
18
votes
1answer
13k 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 ...
15
votes
1answer
11k 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, ...
14
votes
2answers
19k 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?
12
votes
2answers
4k 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 ...
11
votes
1answer
4k 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 ...
10
votes
1answer
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, "...
9
votes
2answers
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 ...
9
votes
1answer
548 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?
9
votes
1answer
13k 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 ...
9
votes
1answer
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 ...
8
votes
3answers
1k 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 ...
8
votes
3answers
1k 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 ...
8
votes
1answer
432 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 ...
8
votes
1answer
671 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" ...
7
votes
8answers
6k 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 ...
7
votes
2answers
3k 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 cant find any information what this value is about. Request: getblock ...
7
votes
7answers
17k 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 ...
7
votes
3answers
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 ...
7
votes
2answers
2k 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 ...
7
votes
1answer
536 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 ...
6
votes
3answers
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 ...
6
votes
2answers
915 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
6
votes
2answers
5k 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 ...
6
votes
2answers
1k 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?
6
votes
1answer
696 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({...
6
votes
1answer
3k 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 ...
6
votes
4answers
6k views

How to remove a transaction from the memory pool

Using Bitcoind and Json-RPC, how to remove an unconfirmed transaction from the memory pool? The scenario being removing the unconfirmed transaction because it's not getting confirmed, and it's ...
6
votes
1answer
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" (...
6
votes
1answer
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?
6
votes
2answers
2k views

Manually creating transactions

Due to complete lack of documentation on the subject, how would the pseucode for creating a transaction look using the following functions: createrawtransaction signrawtransaction and ...
6
votes
1answer
296 views

Alternative clients and the Bitcoin API

Which of the alternative clients support any/some/all of the standard API calls? I am looking for a possible alternative client to replace Bitcoind on my server.
6
votes
1answer
3k views

How to call JSON RPC API from C?

How do I make RPC calls from C? My question is related to the question: "How do I call JSON RPC API using C#?"
6
votes
2answers
550 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 ...
6
votes
1answer
510 views

How to sign non-standard transaction

Consider Testnet transaction 7a438...de03e which has vout[0].scriptPubKey = OP_DUP OP_DROP OP_DUP OP_HASH160 039.....6fe OP_EQUALVERIFY OP_CHECKSIG The script is equivalent to a standard pay-to-...
5
votes
3answers
3k views

Where can i get all the commands with descriptions for Bitcoind on my linux server?

Just installed bitcoind on my server and wanted to find a cheat sheet for the bitcoind commands. Where would i find them with a description and example of what each command does?
5
votes
2answers
2k 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?
5
votes
1answer
4k views

Why is my bitcoind daemon not listening on RPC port at 8332?

I have read a similar post which had no answer at this location. I am trying to use bitcoin-cli from a host that different from the host that runs bitcoind. I also would be happy with being able to ...
5
votes
1answer
1k views

Why is bitcoind so slow on VPSs?

Sometimes it takes bitcoind more than a minute to respond to basic RPC calls such as getbalance (and on average, it takes at least 5 seconds), even though the "STAT" according to the Linux 'ps' ...
5
votes
3answers
4k views

How can I code a Bitcoin JSON-RPC “getwork” request in Java?

I'm not entirely sure whether to ask this question on Bitcoin-SE or Stack Overflow, but I decided to post it here due to the direct relevancy of the question to Bitcoin and the general prominence of ...
5
votes
2answers
1k views

Connecting two local nodes in RegTest

I am trying to connect two local regtest nodes together. I am able to run one regtest node without any issues, and am also able to run the bitcoin-cli commands such as generate to create my own chain, ...
5
votes
3answers
3k 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. ...
5
votes
2answers
895 views

Is there a way to find the coinbase for a given block using only bitcoind commands?

ASICMiner includes hex(Mined By ASICMiner) in the coinbase. I'd like to generate weekly statistics that include ASICMiner' solo-mining efforts, but I don't want to have to rely on blockchain.info or ...
5
votes
1answer
403 views

Why does calling BlockExplorer's checkaddress JSON API do nothing?

I need some help with using JSON and the bitcoin / blockexplorer json calls. I'm not even sure if this is going to work. Basically I'm trying to validate a bitcoin wallet address. I want it to check ...
5
votes
2answers
714 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 ...