Code Monkey home page Code Monkey logo

crypto's Introduction

Crypto

Playground for testing crypto trading bots. Comes with 5 months of market data from HitBTC with 1 minute resolution.

This data can be used to test strategies of Crypto trading bots. This codebase contains some very basic strategies, which can be visualized and backtested in the included react app.

React frontend

Getting started:

The default configuration uses an sqlite database. To use PostgreSQL, update the .env

Bootstrapping the database and running the backend:

cp .env.example .env
cd backend
yarn
yarn typeorm migration:run
sqlite3 database.sqlite ".mode csv" ".import ../tick_2019_06_29.csv tick"
yarn create-candles
yarn start

Running the frontend:

cd ../frontend
yarn && yarn start

Structure

A simulation is started with a set of market data and a Strategy type.

The simulation creates the strategy instance and supplies it with a market interface.

The simulation then feeds the ticks into the strategy. The strategy handles the ticks and determines the buy/sell signals. To generate those signals it can feed the ticks into indicators and compare the values.

When the strategy encounters a signal, tells the market to create an order, depending on the amount of held stocks the strategy wants.

crypto's People

Contributors

stam 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.