How to install Insight Bitcoin Blockchain API on your local machine
insight is an open-source Bitcoin blockchain explorer with complete REST and websocket APIs that can be used for writing web wallets and other apps that need more advanced blockchain queries than provided by bitcoind RPC. The insight project is suppored by Bitpay.
This tutorial is a step by step guide on how to install the insight bitcoin blockchain api on your local windows machine. The Insight REST API provides you with a convenient, powerful and simple way to read data from the bitcoin network and build your own services with it.
Live demos of insight:
- http://insight.bitpay.com/
- http://chain.localbitcoins.com/
- http://search.bitaccess.ca
Prerequisites
- Windows Server, Windows 7 or Windows 8
- Python 2.7.x or newer
- Node.js
- Git for windows
- If you are running a 64bit windows 7 system you will need the 64-bit SDK
- I also recommend Visual Studio 2012, But you can skip it if you are comfortable with windows CMD.
Step 1:
Once everything from above is installed either; Open a windows CMD window run as administrator.
Next in either window (VS or CMD) Type the following;
1
2
3
4
|
cd C:\
git clone a href="https://github.com/bitpay/insight-api.git" target="_blank">https://github.com/bitpay/insight-api.git
cd C:\insight-api
npm install
|
Step 2:
Locate your current bitcoind data directory, which is normally located at %APPDATA%\Bitcoin. Copy and paste this filepath to a notepad for later.
Step 3:
Type Windows Key-R and enter
1
|
rundll32.exe shell32.dll,Control_RunDLL sysdm.cpl,,3
|
This will launch the System Properties panel. ( if this does not work enter it into CMD and hit enter) Here, click on Environment Variables, and under User Variables, add the following:
1
2
3
4
|
INSIGHT_NETWORK: Set this to livenet if your bitcoind is running on mainnet. If on testnet, set this to testnet
BITCOIND_DATADIR: Set this to your bitcoind data dir you found in the step above
BITCOIND_USER: Whatever your bitcoind RPC user is set to (rpcuser= in the bitcoin.conf in your bitcoind data dir)
BITCOIND_PASS: Whatever your bitcoind RPC password is set to (rpcpassword= in the bitcoin.conf in your bitcoind data dir)
|
If you are running on a different host, or set of ports, you will also need to set BITCOIND_HOST, BITCOIND_PORT, and BITCOIND_P2P_PORT as appropriate. Once done, click OK on both the Environment Variables and System Properties windows to save your changes and close them out.
Step 4:
Open up a command window and run……
1
|
"node C:\insight-api\insight.js"
|
You can run it on start up by adding to your Start up program group in Windows.
Result:
After running insight, it should start parsing the blockchain data from the bitcoind data directory you specified (at BITCOIND_DATADIR).
You can do other things during this time, although i would not recommend shutting down the computer without first terminating the parsing function.
Related work: https://bitcointalk.org/index.php?topic=737782.0
I need to to thank you for this excellent read!! I absolutely loved every little bit of it. I’ve got you bookmarked to check out new stuff you post