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 ...
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 ...
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 ...
4
votes
1answer
692 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 ...
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 ...
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. ...
3
votes
1answer
210 views

JSON-RPC to detect double-spent TXs

How can I be positive that one of the incoming payments to my bitcoin-core was double-spent after it was confirmed once by the network, through the JSON-RPC interface? Related questions: How do I ...
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 ...
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, ...
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 ...
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
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 ...
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, "...
4
votes
2answers
15k views

How do I call JSON RPC API using C#?

How do I access the JSON RPC API in C# in such a way that I can also read the errors that the interface provides?
3
votes
1answer
922 views

Why is a transaction with outputs of less than ฿0.00005460 rejected?

I'm trying to create a transaction via JSON-RPC API. It has low outputs, but not below "dust" threshold, yet it's still getting rejected by bitcoind with error code "-22". Transaction includes fee of ฿...
1
vote
2answers
317 views

Bitcoind confirmations during fork

I'm using bitcoind's JSONRPC interface to get transaction information for my wallet, specifically, I'm running a little script every time a block gets broadcast (using -blocknotify) which calls the ...
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?
3
votes
2answers
2k 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'...
2
votes
2answers
167 views

How confirm my own doublespend transaction got confirmed

Transactions in the testnet are right now almost always double spent with a new txid (possible due to tx malleability). This is actually quite nice for testing purposes. So I'm wondering - when I ...
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?
4
votes
1answer
5k views

rpcallowip=192.168.0.* ?? invalid configuration

I recently downloaded bitcoin from github and changed the settings to allow for rpc. This is how I have it: rpcallowip=192.168.0.* This does not work anymore. However when running bitcoind, it ...
1
vote
3answers
2k views

Bitcoin.conf & JSON-RPC options

What does it mean in the bitcoin.conf file when it states: server=1 tells Bitcoin-Qt to accept JSON-RPC commands? If all one needs to do to solo mine is type setgenerate true in the console, ...
0
votes
2answers
115 views

Can't reach remote bitcoin rpc server

I got vps with ubuntu 18.04 with ssh access and bitoind set up on it. This is my bitcoin.conf file: testnet=1 prune=35840 maxconnections=12 muxuploadtarget=20 daemon=1 server=1 rpcclienttimeout=5000 ...
0
votes
2answers
208 views

What does this output item in the result of the call with blocktrail api mean?

This is the result of a call with blocktrail api. It is about a transaction with the hash 6b1c57d98a557b5f578c02f6c386ef049df5890ebddd01d286bf345f47c5cecc {"raw":"...
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 ...
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 ...
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 ...
4
votes
1answer
1k views

JSON-RPC getwork data field

I recently tried playing around with the getwork command for JSON-RPC and I'm trying to understand what I got out of it. According to the API Call List wiki entry, the "data" field should contain the ...
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?
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 ...
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 ...
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 ...
4
votes
1answer
2k views

JSON RPC call from webpage to Bitcoin Core

I want to make API calls to my Bitcoin Core wallet from my webpage but when I try to connect it gives me Internal Server Error I'm using easybitcoin.php JSON from Github. I'm trying with this JSON ...
4
votes
2answers
7k views

How do you delete an account in Bitcoin Core?

I am attempting to allow multiple bitcoin addresses to be created per account, but how can I delete them using the standard API? There doesn't seem to be a function for that. E.g. the acccount "Test" ...
3
votes
1answer
2k views

How to access any transaction detail in Bitcoin version 0.8 and above?

Since the Standard Client version 0.8 removed the full index of all historical transactions, some Bitcoin applications that relied on that functionality have stopped working. For example, one is no ...
2
votes
2answers
3k views

Bitcoind (linux) CPU usage through the roof

Basically I'm trying to keep a wallet on linux along with the RPC service so I can receive coins and poll the server periodically for transactions. I'm trying with both 0.8.1 and 0.8.5 and CPU usage ...
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 ...
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?
4
votes
1answer
417 views

Is there a way to know the Bitcoin Network transaction fee BEFORE actually submitting the transaction?

I am using the RPC API to submit automated transactions to my Bitcond, the user introduces the Amount and I check it against its balance before submitting the transaction. I would like to also check ...
4
votes
3answers
241 views

For Application Development is bitcoind RPC the Only Way?

I am looking at building an application using Bitcoins, and being a newbie the only real resources I have found regarding how to interact with the network is to issue RPC commands to the bitcoin-qt ...
3
votes
2answers
1k 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 ...
3
votes
1answer
381 views

Which version of the JSON-RPC protocol does Bitcoin use?

I would like to get some clarification on which version of the JSON-RPC protocol does Bitcoin use? 1.0 or 2.0?
2
votes
2answers
2k views

How to retrieve all transactions from bitcoind?

I am working on a project that need to parse all transactions from bitcoind. I have been using bitcoind which the option txindex=1 and pulling transactions using RPC call getRawTransaction. It work, ...
2
votes
4answers
225 views

Would it be possible to add an RPC call to be able to determine if a node is fully synced?

After reading this answer, where Peter Wuille talks about how a node can't really tell if it is synced or not, it got me wondering if there is a way we can tell that a node is as synced as it possibly ...
1
vote
1answer
456 views

Howto scale thousands of bitcoin accounts properly with bitcoind deamon?

It is said in the bitcoin wiki that: The accounts code does not scale up to thousands of accounts with tens of thousands of transactions, because by-account (and by-account-by-time) indices are not ...
1
vote
1answer
4k views

Bitcoin Client API-RPC: Efficient way to list transactions from a list of addresses

In the API CallList: https://en.bitcoin.it/wiki/Original_Bitcoin_client/API_calls_list You can pass an address as a parameter to "listtransactions" to get the latest list of transactions from an ...
0
votes
1answer
704 views

createrawtransaction and fundrawtransaction

I use createrawtransaction for create a rawtransaction with [] "zero inputs" and one output. I use fundrawtransaction for populate rawtrasaction with inputs. {"method":"createrawtransaction","params"...