Sending Bitcoin — Introducing our opensource self hosted wallet service

Sending Bitcoin — Introducing our opensource self hosted wallet service

Over the years, we have made substantial progress in helping merchants all over the world accept bitcoin on their stores/websites. In…

Mar 31, 2022 • 2 min read

Over the years, we have made substantial progress in helping merchants all over the world accept bitcoin on their stores/websites. In midst of this, we keep getting request from merchants for a way to send bitcoin. This is necessary in websites like marketplaces/exchanges/gaming platforms and various other applications. If we provide such a service, it however becomes paradoxical to our mission / philosophy of being a non custodial service and never holding customer funds. Thus, we have avoided making progress in this area inspite of repeated requests by our customers.

Today we are introducing a free open source wallet service that merchants can host themselves and retain custody of their funds.


  • Completely free and self hosted
  • Self custody of funds
  • Automatic batching of send transactions to minimize fee
  • Easy to use REST API interface
  • Communicates with electrum nodes internally for fetching blockchain data
  • Gets up running instantly [no requirement for waiting days to sync with network]

Getting Started

Download and install by following instructions on our github project repo

Sending and Receiving Bitcoin —Integrated Ecosystem

A great feature is that this wallet is fully compatible with our existing merchants service that helps you to receive bitcoin. The xpub from the wallet service can be added into a store into blockonomics. So you can use our merchant service to receive payments from your customer and then use your self hosted Send API service to send these payments back to customer

Comparison with Other Services


There are various services like blockchain wallet service, blockcypher, bitgo and coinpayments . They will either completely have access to your wallet private keys or have some of the keys(in case of multisignature). Lots of exchanges continue to use such services even after a known comprehensive history of hacks.

Non Custodial

There are various project like IBM secure wallet, Coinpunk and BTCPayServer. We have been inspired by the work done on these and we encourage you to explore them. Each has different features/level of complexity

The important differentiator for our service would be that it is very simple/lightweight and also supports batching for sends

Batching — Grouping Withdraws

If your customer is requesting say a withdraw of 0.0001BTC and you decide to process this immediately, you may pay fee of around 0.00005BTC which would be 50–100% of the amount getting withdrawn. If you pay less fee the funds get stuck in the bitcoin network. In both cases your customer will complain! Batching helps alleviate this in various ways:

  • Queue withdraws/sends and don’t immediately process them
  • Sends are Batched together and sent in one transaction to decrease overall tx fee
  • Funds stuck in batch queue for long time are flushed out as fee/amount tolerable ratio increases over time


As you have full access to private keys, you must be careful with security of your wallet. This can be done in various ways:

  • Don’t expose wallet service ports to public, they should only be accessed via your servers. An extra layer of authentication can also be added
  • Take backup of wallet seed words to protect against server failures
  • Use HTTPS only to communicate with the wallet service
  • Regularly changed API password to avoid attack surface

The complete source code of the wallet service is available on our github repo. For any questions feel free to get back to us on github / our help portal

This is a companion discussion topic for the original entry at