WARING: THIS WILL LOSE YOU MONEY IN IT'S CURRENT FORM.
THIS PROJECT IS ONLY INTENDED FOR EDUCATIONAL PURPOSES/TO BE USED AS A BOILERPLATE.
This project makes use of rudimentary statistics (Exponential Moving Average) and Twitter sentiment analysis to long or short a cryptocurrency on Coinbase Pro.
- Get Coinbase Pro Sandbox Credentials
- Get Twitter Credentials
cp .env.example .env
, then copy credentials to this filenpm i
npm run build
- build the codenpm link
- link the node scriptcbp-bot
- run it
CBP
cbp viewBalances
: shows current balancescbp viewBook [product]
: view a snapshot of a product book (e.g. "BTC-USD")cbp watchTicker [product]
: watch a product tickercbp watchBook [product]
: watch a product bookcbp purchase [product] [amount]
: market order purchase a token (amount is in quote)
twitter [keyword]
: stream tweet sentiment based on a keyword
Algorithm
run [product] [keyword]
: run trading algorithm using a Twitter keyword
clean
- remove coverage data, Jest cache and transpiled files,build
- transpile TypeScript to ES6,build:watch
- interactive watch mode to automatically transpile source files,lint
- lint source files and tests,test
- run tests,test:watch
- interactive watch mode to automatically re-run tests
CBP
: built on coinbase-pro-nodeTwitter
: built on node-twitter
- TypeScript [3.9][typescript-39]
- ESLint with some initial rules recommendation
- Jest for fast unit testing and code coverage
- Type definitions for Node.js and Jest
- Prettier to enforce consistent code style
- NPM scripts for common operations
- Simple example of TypeScript code and unit test
- .editorconfig for consistent file format
- Reproducible environments thanks to Volta
- Example configuration for Travis CI
This project uses Volta:
"node": "12.18.2",
"npm": "6.14.5"
Volta's toolchain always keeps track of where you are, it makes sure the tools you use always respect the settings of the project you’re working on. This means you don’t have to worry about changing the state of your installed software when switching between projects. Pretty cool stuff.
🤲 Free as in speech: available under the APLv2 license.
Licensed under the APLv2. See the LICENSE file for details.