Author

Topic: Querying data from Full node ? (Read 123 times)

legendary
Activity: 2870
Merit: 7490
Crypto Swap Exchange
May 15, 2021, 04:22:08 AM
#3
Assuming you're using Bitcoin Core, all of them are impossible. If you wish to do it,
1. Follow @DaveF suggestion to use your own DB, which is indexable.
2. Follow @DaveF suggestion to use third party API.
3. Host your own blockchain explorer using open-source bitcoin block explorer. I took a peek at mempool.space and esplora API documentation, but it looks like it doesn't have feature you're looking for.
legendary
Activity: 3500
Merit: 6320
Crypto Swap Exchange
May 14, 2021, 05:50:19 PM
#2
Short version....you can't.
You are going to have to pull that data into a DB and query the data from there.
Otherwise every time you want to find out something you are going to have to parse the entire blockchain.

https://blockchair.com/ has a very good API that is fairly cheap to use if you do not have that many queries that you will do every day.

-Dave
hero member
Activity: 2702
Merit: 716
Nothing lasts forever
May 14, 2021, 11:57:26 AM
#1
I am having a full node. What do I do to fetch data from it as per the user requirement ?

Let's consider the below examples with x = any random number

1. I want to receive all address "with x+ BTC"

2. I want to receive all transactions "in last 24" hours which transacted x amount

3. fetch blocks between date ranges

4. fetch transactions where fees was x


If it were a normal SQL database we could have used SQL queries such as

Select tx from full node where amount=x

but I am not sure how to receive block data from the full node.
I want to develop a program where I can code to retrieve the above data.
Jump to: