Coder Social home page Coder Social logo

moonbot's Introduction

MoonBot

A (very) simple cryptocurrency trading bot.

Hold on tight, folks. We're going to the moon!*

Boot Screen

Please Note: This is a work in progress.

This project is an attempt to build an automated bot for trading cryptocurrencies. Some ideas are based upon the work of others who've come before, notably Zenbot and Gekko.

*Most likely not going to the moon.

IMPORTANT: In order to use LIVE trading, you will need to provide your Binance API key in config.js. Note that if you use enable live trading, you will MOST LIKELY / PROBABLY / DEFINITELY LOSE MONEY.

Installation & Usage

To get started, follow the steps below:

> git clone https://github.com/daveschumaker/moonbot.git
> cd moonbot
> cp config-sample.js config.js
> npm install
> ./moonbot.js

Optionally, you can also run npm link from the root folder of the MoonBot project and it will be available as a global binary that you can run from anywhere on your system using moonbot.

MoonBot will begin fetching real data from Binance and display the results in your terminal.

Setup

Open config.js in the root project directory and enter your relevant configuration details (the Binance API key is optional at this time and will only used for fetching and placing orders with your personal account). You do not need it to run MoonBot in its default simulation mode.

How to run MoonBot

To get started with default options using the sample configuration file, simply start the project with npm start. Some additional tools are provided.

Backfill older trade data.

moonbot backfill

  Usage: backfill [options]

  Add trade details for a particular symbol to database for use in sims and calculating longer period data.

  Options:

    --dateFrom <YYYYMMDD>   Required: Initial date to start fetching trade data from.
    --dateTo <YYYYMMDD>     Optional: Date to stop fetching trade data. Defaults to current date.
    --symbol <name>         Optional: Market symbol for trade data to fetch. Defaults to config.js.

  Example:

    moonbot backfill --dateFrom 20180101 --symbol NEOETH

Simulate trade strategy

[WORK IN PROGRESS] Iterate through backfilled data for a certain period of time and simulate placing buy / sell orders based on a trading strategy that you provide.

moonbot sim

  Usage: sim [options]

  Add trade details for a particular symbol to database for use in sims and calculating longer period data.

  Options:

    --dateFrom <YYYYMMDD>   Required: Initial date to start simulation from.
    --dateTo <YYYYMMDD>     Required: Date to stop simulated.
    --symbol <name>         Optional: Market symbol used for simulation. Defaults to config.js.

  Example:

    moonbot sim --dateFrom 20180101 --dateTo 20180107 --symbol NEOETH

To do

There are a number of things still to implement and cleanup. A small sample of ideas can be found inside TODOs.md

moonbot's People

Contributors

daveschumaker avatar

Watchers

James Cloos 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.