janoside / btc-rpc-explorer

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

Output transaction details of an Address to CSV or JSON #439

Closed dykstranet closed 2 years ago

dykstranet commented 2 years ago

Thanks for this great tool. It's very useful. I'm trying to do something new and can't see an easy way.

Describe the new feature or enhancement I'd like to output transaction data for an address in CSV or JSON format.

Output similar to this, which used to be available from blockchain.info

date,description,moneyIn,moneyOut,tx
2017-01-10 06:49:19,PAYMENT RECEIVED,0.01494828,0,4ac3578c3bfa0125e04aa142a469c941b7d141b66d08db425733332894d4f6ef
2017-01-06 13:00:05,PAYMENT SENT,0,0.00925734,38352b13a8773082217af8b66cf6395dbb468e8f23a52761df8f0497a80f3361
2017-01-06 08:18:40,PAYMENT RECEIVED,0.00925734,0,d4475b9bb635d70be082a53151de9ad17ac5f37dc7af4e88424e03773a979fe6

I posted this question to stackexchange here.

I already tried the REST API /api/address/<ADDRESS> and it returns the txids but I have to do a separate call to get info on each txids. Output /api/tx/<txid> is too raw, in hex format.

Thanks in advance for any guidance or fix.

pointbiz commented 2 years ago

Hi, is this pull request useful for you? https://github.com/janoside/btc-rpc-explorer/pull/434

The input amounts and addresses are included in that API response.

janoside commented 2 years ago

@dykstranet PR #434 that @pointbiz referenced has been merged and is now live on bitcoinexplorer.org. Does that meet your needs?

janoside commented 2 years ago

@dykstranet Happy to re-open this if needed.

dykstranet commented 2 years ago

Excellent @janoside . Good stuff! Thank you.

sbounmy commented 1 year ago

I am totally in @dykstranet usecase.

Excuse me if I dont understand correctly but how #434 solve his issue ?

/tx/:id needs a transaction id and returns inputs / outputs related to 1 transaction.

I can't see the /address eager loading transactions + respective inputs / outputs

ex: I did integrate blockcypher and here how it looks like https://api.blockcypher.com/v1/btc/test3/addrs/tb1qqmw2g6tghrcqdgeas2eawpcpyr537xc0ukf222/full?limit=50&unspentOnly=true&includeScript=true