Code Monkey home page Code Monkey logo

bitcoin-arbitrage's Introduction

bitcoin-arbitrage - opportunity detector and automated trading

Khertan Fork

It gets order books from supported exchanges and calculate arbitrage opportunities between each markets. It takes market depth into account.

Currently supported exchanges to get data:

  • MtGox (USD, EUR)
  • Bitstamp (USD, ~EUR)
  • Bitcoin24 (EUR)
  • Bitfloor (USD)
  • Bitcoin-Central (EUR)
  • BTC-e (USD, EUR)
  • Intersango (EUR)

Currently supported exchanges to automate trade:

  • MtGox (EUR, USD)
  • Bitstam (USD)
  • Bitcoin-Central (EUR) - closed

To add a new exchange see this doc/add-new-exchange.md

Donation are always welcome: 18tFSEMgeHbCK28hAC81RT6cNCjCDZ91sx

WARNING

Real trading bots are included. Don't put your API keys in config.py if you don't know what you are doing.

Configuration

cp src/config.py-example src/config.py

Then edit config.py file to setup your preferences: watched markets and observers

Run

$ python src/arbitrage.py
2013-03-12 03:52:14,341 [INFO] profit: 30.539722 EUR with volume: 10 BTC - buy at 29.3410 (MtGoxEUR) sell at 29.4670 (Bitcoin24EUR) ~10.41%
2013-03-12 03:52:14,356 [INFO] profit: 66.283642 EUR with volume: 10 BTC - buy at 29.3410 (MtGoxEUR) sell at 30.0000 (BitcoinCentralEUR) ~22.59%
2013-03-12 03:52:14,357 [INFO] profit: 31.811390 EUR with volume: 10 BTC - buy at 29.3410 (MtGoxEUR) sell at 30.0000 (IntersangoEUR) ~10.84%
2013-03-12 03:52:45,090 [INFO] profit: 9.774324 EUR with volume: 10 BTC - buy at 35.3630 (Bitcoin24EUR) sell at 35.4300 (BitcoinCentralEUR) ~2.76%

Note, this example is real, it has happened when the blockchain forked. MtGox is a very reactive market, price dropped significally in 1 hour, this kind of situation opens very good arbitrage opportunities with slower exchanges.

TODO

  • Tests
  • Add other exchanges:
    • icbit
  • Update order books with a WebSocket client for supported exchanges (MtGox, Bitcoin-Central)
  • Better documentation
  • Add fiat currency converters USD / EUR
  • Replace float by Decimal
  • Better history handling for observer "HistoryDumper" (Redis ?)
  • Move EUR / USD from a market to an other:
    • Coupons
    • Ripple ?
    • Negative Operations

LICENSE

MIT

Copyright (c) 2013 Benoît [email protected] Copyright (c) 2013 Maxime Biais [email protected]

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

bitcoin-arbitrage's People

Contributors

hisabness avatar maccam912 avatar maxme avatar sixty4bit avatar tadejs avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

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.