https://github.com/nicka/coinboss
β‘οΈπΈπ° A Serverless Coinbase tradingbot.
https://github.com/nicka/coinboss
bot coinbase cryptocurrency serverless
Last synced: 7 months ago
JSON representation
β‘οΈπΈπ° A Serverless Coinbase tradingbot.
- Host: GitHub
- URL: https://github.com/nicka/coinboss
- Owner: nicka
- License: mit
- Created: 2017-06-29T08:14:49.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2017-10-22T09:07:51.000Z (over 8 years ago)
- Last Synced: 2025-04-24T01:41:45.411Z (11 months ago)
- Topics: bot, coinbase, cryptocurrency, serverless
- Language: JavaScript
- Homepage:
- Size: 87.9 KB
- Stars: 115
- Watchers: 8
- Forks: 28
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
[](http://www.serverless.com)
[](https://coveralls.io/github/nicka/coinboss?branch=master)
[](https://travis-ci.org/nicka/coinboss)
---
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

# Prerequisites
## Yarn
For node module management Coinboss uses [Yarn](https://yarnpkg.com/) over NPM.
To install yarn globally on your machine please check [Installing Yarn](https://yarnpkg.com/en/docs/install#mac-tab).
After that you can install all service dependencies with:
```bash
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.
```bash
serverless install -u https://github.com/nicka/coinboss
```
2. Install development dependencies
```bash
yarn
```
3. Setup environment
```bash
cp .env.example .env.dev
```
4. Update configuration within `.env.dev`
5. Deploy your Coinboss
```bash
STAGE="dev" yarn run deploy
```
# How

Coinboss is triggered based on CloudWatch alarms. The thresholds can be found within the projects [.env.example](.env.example).
# Test
For testing Coinboss uses [Jest](https://facebook.github.io/jest/), for more information please check their [documentation](https://facebook.github.io/jest/#getting-started).
>NOTE: To update Jest snapshots supply ` -- -u` to any of the test commands.
**Running the tests**
```bash
yarn run test
```
**Code coverage**
In order to inspect code coverage:
```bash
open coverage/lcov-report/index.html
```
# Simulate
Local API Gateway simulation.
```bash
STAGE="dev" yarn run serve
```
# Build
Create build artifacts.
```bash
STAGE="dev" yarn run build
```
# Deploy
Deploy build artifacts.
```bash
STAGE="dev" yarn run deploy
```
# Todo
- [ ] Increase test coverage
- [ ] Add support for percentage thresholds
- [ ] Add more currency alarms