Code Monkey home page Code Monkey logo

botbase's Introduction

BotBase

GitHub license Issues Codacy grade Code Climate maintainability Travis (.com) Codacy coverage Libraries.io dependency status for GitHub repo GitHub Super-Linter Quality Gate Status dependency check

An experimental bot to automatically trade on coinbase

Howtos

How to set up the environment

Notice that, being based on the use of workers (more details here), it required to use node version 16.2.0 at least, in order to do so, run the following command to check the current version being used locally:

node -v

if the version is below 16.2 proceed as follows:

run the following command to see the list of node environments

nvm ls

if you already have version 16.2.0 run:

nvm use v16.2.0

else install it (it will set 16.2.0 as default automatically)

nvm install v16.2.0

The core part of the bot is the main.js file, in order to start it, load a set of strategies in the all_strategies.js file (under the strategies folder) and then export as environment variables the authentication data for codebase:

export key=<your-api-key>
export secret=<your-api-secret>
export name=<your-api-name>

for more details on how to create the values above, refer to the wiki.

How to run it

To run the bot, type:

node main.js --conf=/path/to/the/configuration/yaml/file.yaml

How to unit test

Unit tests are, as you probably guessed, in the 'test' directory, to run all the unit tests:

npm test

to run the test and measure the coverage:

npm run test-coverage

after running the above command, coverage is shown in the coverage/index.html file:

to run the test continuously whilst you are developing:

npm run test-dev

you can also run continuous testing on a particular test (quite handy to have the results fast)

npm run test-dev path/to/your/test/file

Going further down, you can also continuously running a particular single test:

npm run test-dev-one --test_file=<file containing the test>
--pattern='<Pattern in the description>'

How botbase is documented

Botbase makes use of mkdocs and github pages to keep its documentation in a tidy state.

Documentation is kept in the docs folder, to locally see the current documentation:

mkdocs serve

The website will be visible on your local environment

Code Quality

A few tools are used to ensure code quality:

Codeclimate

To locally run codeclimate:

codeclimate analyze

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.