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
1 Answer
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).