Bitcoin core API for address

3

2

I installed bitcoin core and now it is completely synced. I am not able to find REST Api for a particular address. I want to run my server so can i am able to make an http request for REST API

MONARK AGARWAL

Posted 2016-11-03T05:16:16.680

Reputation: 31

bitcoin core doesn't have rest api, please elaborate your question what kind of API calls your requiredark knight 2016-11-03T07:46:48.150

Since bitcoin core 0.12 (or 0.11?!) there is a REST interfaceJonas Schnelli 2016-11-03T08:51:18.773

Answers

2

You need to enable REST by setting rest=1 in your bitcoin.conf or startup bitcoind with -rest=1 or bitcoin-qt with -server=1 and -rest=1.

You can access REST by curl (example): curl localhost:18332/rest/getutxos/checkmempool/b2cdfd7b89def827ff8af7cd9bff7627ff72e5e8b0f71210f92ea7a4000c5d75-0.json

A simple documentation is available here: https://github.com/bitcoin/bitcoin/blob/master/doc/REST-interface.md

EDIT: There is no REST API for addresses. Bitcoin-Core does not have an per-address index. If you enable -txindex=1, you can retrieve any transaction with GET /rest/tx/<TX-HASH>.<bin|hex|json> (otherwise only transactions in the mempool).

Jonas Schnelli

Posted 2016-11-03T05:16:16.680

Reputation: 5 465