Awesome Open Source
Awesome Open Source

serverless Coverage-Status Build-Status


Automagically buy BTC, ETH or LTC on Coinbase, based on user defined thresholds.

Tradingbots: Typically, bots perform tasks that are both simple and structurally repetitive, at a much higher rate than would be possible for a human alone.

Architecture

coinboss

Prerequisites

Yarn

For node module management Coinboss uses Yarn over NPM.

To install yarn globally on your machine please check Installing Yarn.

After that you can install all service dependencies with:

yarn

Coinbase

You need a Coinbase.com API key with the following permissions:

  • wallet:accounts:read
  • wallet:buys:create
  • wallet:payment-methods:read
  • wallet:sells:create

Quick Start

  1. Setup project

This is a convenience method to install a pre-made Serverless Service locally by downloading the Github repo and unzipping it. Services are listed below.

serverless install -u https://github.com/nicka/coinboss
  1. Install development dependencies
yarn
  1. Setup environment
cp .env.example .env.dev
  1. Update configuration within .env.dev

  2. Deploy your Coinboss

STAGE="dev" yarn run deploy

How

cloudwatch-dashboard

Coinboss is triggered based on CloudWatch alarms. The thresholds can be found within the projects .env.example.

Test

For testing Coinboss uses Jest, for more information please check their documentation.

NOTE: To update Jest snapshots supply -- -u to any of the test commands.

Running the tests

yarn run test

Code coverage

In order to inspect code coverage:

open coverage/lcov-report/index.html

Simulate

Local API Gateway simulation.

STAGE="dev" yarn run serve

Build

Create build artifacts.

STAGE="dev" yarn run build

Deploy

Deploy build artifacts.

STAGE="dev" yarn run deploy

Todo

  • [ ] Increase test coverage
  • [ ] Add support for percentage thresholds
  • [ ] Add more currency alarms

Get A Weekly Email With Trending Projects For These Topics
No Spam. Unsubscribe easily at any time.
javascript (70,403
bot (779
serverless (660
cryptocurrency (508
coinbase (30