0

I'm running a full node on my PC and wondering if there is a way to query the blockchain locally via NodeJS instead of going through blockchain.info? It is very inefficient/slow to run queries through HTTP when I have all the data local.

1 Answer 1

0

If you want to query your full node, you should use the JSON-RPC API. Note that by default, you'll only be able to get blocks, and transactions from your own full node wallet. If you want to be able to query any transactions, you have to add txindex=1 to your configuration file. And compared to using blockchain.info, you won't be able to query balances of addresses.

1
  • That is helpful, thank you. So I assume blockchain.info is aggregating info about the blockchain. I hate being dependent on a third-party centralized source, I will take a close look at the JSON RPC API. Thanks again.
    – Corbin
    Mar 3, 2018 at 14:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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