Coder Social home page Coder Social logo

rebalancer's Introduction

I built A trading bot in the hours leading up to the MtGox shutdown. I was able to run it and see it working, but it only ran for a couple of hours before MtGox imploded.

I have now re-built it to work with BTC-E

Usage: add your BTC-E api key and secret to btce.py edit the rebalancer call in the main function to use your desired currency pair, ratio, spread multiplier, and trade amount. For best results, balance your account manualy before starting the bot.

python3 btce.py

This bot uses a technique called rebalancing to calculate trades to make on your behalf.

First your acount balance in USD and BTC are retrieved. A price for USD is calculated that would balance your account with the specified ratio. 2 trades for 0.01 BTC each are entered on either side of this value. The trades are checked every 60 seconds to see if they have been filled. If one trade is filled, the other trade is canceled.

Your current ratio is used to create trades, and the only feedback is whether trades happen or not.

!!!Caution, there may be some situations with low balance accounts in which the trades will oscilate and drain your account!!!

rebalancer's People

Contributors

pontifier avatar

Watchers

 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.