janoside / btc-rpc-explorer

Database-free, self-hosted Bitcoin explorer, via RPC to Bitcoin Core.
https://bitcoinexplorer.org
MIT License
1.52k stars 1.13k forks source link

Pulling address details via the API #372

Closed lukesturgis closed 2 years ago

lukesturgis commented 2 years ago

Just want to start by saying I love this project and think its absolutely awesome. I run a full bitcoin node locally and an electrumx instance which I have the explorer hooked up to and can view address details via the site but I would like to be able to query address details/balances via the API and am having a hard time seeing if it is possible. I was looking at the api routes and thought it would be possible via getAddress but am not having any luck. Is this a feature that is already supported and I am completely missing it, or is it something that will be supported in the future?

Let me know if it would help if I provide configs/options I'm using. Thank you!

lukesturgis commented 2 years ago

I looked at this issue https://github.com/janoside/btc-rpc-explorer/issues/228 and am under the impression I would likely need to query my electrum server directly, in which case I can try and figure out how to do if required.

pointbiz commented 2 years ago

Hi Luke, it's not currently possible. See my comment here https://github.com/janoside/btc-rpc-explorer/pull/329#issue-873430301 And my comment here https://github.com/janoside/btc-rpc-explorer/pull/336#issuecomment-856928416

Short story is I want that functionality too. If someone else doesn't code it I likely will but not anytime soon.

janoside commented 2 years ago

The api now includes a route for address data. For example: /api/address/34rng4QwB...

The version including this has not been officially released yet, but the code is there in master and I hope to release an update soon.

Enjoy!