Skip to content
Go to file

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time

This is an old proof-of-concept

See: Newer projects on

Bitcoin Related

BlockchainPen -

Paperbank - paper wallet generator: - - -

Ethereum Related

Original Readme:

Bitcoin Exchange

powered by Ruby, Redis and Sinatra

proof of concept

status: under development

current implementation idea

use client polling to try to submit order, otherwise raise exception: { error: "polling", message: "please resubmit in previous request in 1s" }

this semplifies the concept of exchange and

in the future consider implementing a redis based queue system with minimal overhead, but right now let the client do the dirty job ;)


  • redis (launched on default port)
  • bitcoind
  • libcurl (apt-get install libcurl3 libcurl3-gnutls libcurl4-openssl-dev on debian/ubuntu)


launch the app:

rackup -p 3000

dev mode:

rerun -p "**/*.{rb}" -- rackup -p 3000

install notes

you need to install ruby (better 2.1, from source possibly, or via rvm), then

gem install bundler

into the project directory

bundle install

then follow the instructions to install bitcoind (bitcoin core - copy config/bitcoin.conf.sample to ~/.bitcoin/bitcoin.conf (if in osx, look at the default location mentioned above)

run bitcoind

create a mysql database (named bitcoin_exchange), you may edit db configs in config/env.rb

then run (to create mysql tables)

ruby lib/tasks/migrate.rb

to start the app


and connect to http://localhost:9292

bitcoin - osx

osx bitcoin.conf locaiton:

/Users/USER/Library/Application Support/Bitcoin/bitcoin.conf


mkdir -p ~/.bitcoin
ln -s "/Users/USER/Library/Application Support/Bitcoin/bitcoin.conf" ~/.bitcoin/

development notes

"When a user is logged in to their account, you show the bitcoin address they can send to to add funds. Before showing it, you check if it's been used, if it has then you replace it with a new one (getnewaddress ). You only need to keep the latest bitcoin address for the account in your database. (I posted a sample code fragment for this in an earlier thread somewhere, search on getnewaddress) " > Satoshi

running specs


security notes

useful fontawesome icons

fa-bank fa-dashboard fa-money fa-exchange fa-laptop fa-life-ring fa-question fa-qrcode fa-refresh fa-sign-out fa-suitcase

  • stop order
watch ->
  if prezzo == x
    metti ordine limit(prezzo_y)
  • trailing stop


Bitcoin/Crypto exchange prototype project written in ruby / sinatra in 2014 - Status: UI & routes done - full order matching is not complete



No releases published


No packages published
You can’t perform that action at this time.