Skip to content
This repository has been archived by the owner on Feb 10, 2022. It is now read-only.


Repository files navigation

⚠️ This project is not maintained anymore. While and you can't expect those to work reliably. If all you want is to broadcast a transaction, use . If you want to build on Bitcoin, please use instead. This is lightweight, works on linux and do not require indexing the whole blockchain.

QBit Ninja

An Open Source and powerful blockchain API


You can see the API documentation on and on apiary.

You can try the API in .NET with the nuget package.

Public servers :

How to setup your own?


In Azure, create one App resource group then you need to create:

  • Storage resource
  • Azure Bus resource
  • Web App resource,
  • Azure VM with 1 data disk of 1 TB attachd to it. (I advise you D1 v2)

Setup the indexer

The indexer is the application which will listener your full node and index everything into your Azure Storage. You can run it through the QBitNinja.Listener.Console project.

Assuming your Bitcoin node is fully synched,

git clone

Then edit QBitNinja.Listener.Console/App.config.

Your QBitNinja.Listener.Console app.config file should looks like.

		<add key="Azure.AccountName" value="azurestorageaccountname" />
		<add key="Azure.Key" value="azurestoragekey" />
        <add key="RPCConnectionString" value="default"/>
		<add key="Network" value="mainnet" />
		<add key="Chain" value="BTC" />
		<add key="Node" value="" />
		<add key="ServiceBus" value="Endpoint=sb://;SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey=mysecretkey" />
  • Azure.AccountName and Azure.Key are in the Azure Portal, in the settings of your Azure Storage Resource,
  • Network can be mainnet, testnet, regtest.
  • Chain can be BTC or LTC or any chain
  • Node represented the P2P connection to your bitcoin node. Do not forget to whitelist the indexer in your node's settings (typically adding whitelist= in bitcoin.conf)
  • ServiceBus connection string to your Service Bus Namespace (in Shared access policies inside Azure)
  • RPCConnectionString optional, but needed for more reliably broadcast transactions.

Example of RPCConnectionString:

  • default: Assume your are running bitcoind locally with default settings.
  • cookiefile=C:\path\to\.cookie: If you run bitcoind in a different data directory with default authentication, you need to set the path to it.
  • server= If you run bitcoind RPC on a different port than default.
  • myuser:password: If you run bitcoind with rpcuser and rpcpassword.
  • server=;myuser:password: If you run bitcoind RPC with rpcuser and rpcpassword, on a different port than default.
  • server=;cookiefile=C:\path\to\.cookie: If you run bitcoind RPC with rpcuser and rpcpassword, in a different data directory with default authentication.

Be careful:You need to compile QBitNinja in (preferably in Release mode) for the configuration to be effective, because QBitNinja will ultimately use the QBitNinja.Listener.Console.exe.config file which is in the same folder as QBitNinja.Listener.Console.exe for its configuration.

Do not forget to disable Secure transfer Required in your storage configuration.

One you have setup everything, build QBitNinja.Listener.Console in Release mode and run QBitNinja.Listener.Console.exe --init.

You can repeat the same operation on multiple machine to index faster.

Once it finished, run QBitNinja.Listener.Console.exe.

We advise you to the Windows Task Scheduler to run QBitNinja.Listener.Console.exe --Listen and bitcoind.exe automatically even when the user is not logged on or when the virtual machine reboot.

Setup the front

The front is a web application which will query your Azure Storage for blocks/transactions/balances indexed by the indexer. You can run find it in the QBitNinja project.

The easiest is deploy via Visual Studio 2017.

  • Download your Web App profile by going into your Web App resource settings in Azure, and clicking on Get publish profile
  • Open the solution under Visual Studio 2017
  • Setup the Web.config exactly how you set up the App.config in the previous step
  • Right click on the QBitNinja project and click on Publish.
  • Click on New profile...
  • In the new window, click on the bottom left Import Profiles and select your downloaded publish profile
  • Click on Publish

How to build?

Via visual studio (recommended)

Open the solution and build.

By command line

Then use msbuild.exe:

msbuild.exe /restore
msbuild.exe /p:Configuration=Release


In order for the API to work in Unity with .NET 4.6 for Android devices you should:

  • QBitNinjaClient.SetCompression(false); Because it's missing the DLL MonoPosixHelper from the build
  • QBitNinjaClient client = new QBitNinjaClient("", NBitcoin.Network.Main); because HTTPS with HttpClient seems to not work correctly.
  • Scripting Runtime Version: Select "Experimental (.NET 4.6 Equivalent)"


This project is released under the terms of the MIT license. See LICENSE.


An Open Source and powerful blockchain API







No packages published

Contributors 4