Code Monkey home page Code Monkey logo

bitcoin_exchange's Introduction

This is an old proof-of-concept

See: Newer projects on http://makevoid.com

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 ;)

prerequisites

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

development

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 - github.com/bitcoin/bitcoin) 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

rackup

and connect to http://localhost:9292

bitcoin - osx

osx bitcoin.conf locaiton:

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

symlink:

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

https://bitcointalk.org/index.php?topic=417.msg3579#msg3579

running specs

rspec

security notes

https://bitcointalk.org/index.php?topic=434.msg3770#msg3770

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_exchange's People

Contributors

45kb avatar makevoid avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

bitcoin_exchange's Issues

TODO - Orders page toggle buttons

There are 2 toggle buttons "Open/Closed" to show up closed or open buttons, actually don't know if they links to 2 different urls like orders/closed and orders/open or if they need to toggle 2 divs in same page

TODO - check toggle buttons and/or links

Sometimes buttons and a toggle elements doesn't fires the click event correctly, try for example /withdrawals "New" button for the modal (click on the very edge)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.