3

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

  • bitcoin core doesn't have rest api, please elaborate your question what kind of API calls your require – dark knight Nov 3 '16 at 7:46
  • Since bitcoin core 0.12 (or 0.11?!) there is a REST interface – Jonas Schnelli Nov 3 '16 at 8:51
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).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.