StockCruncher

License build status coverage report Gem Version

  1. Overview
  2. Description
  3. Setup
  4. Usage
  5. Limitations
  6. Development
  7. Miscellaneous

Overview

StockCruncher is a stock market data cruncher.

Description

This tool requests a stock market data API and parse the incoming data in order to write the data in a database for later calculation and use.

Setup

$ gem install stockcruncher
$ mkdir /etc/stockcruncher && cd /etc/stockcruncher
$ echo 'AlphaVantage:' > stockcruncher.yml
$ echo '  apikey: CHANGEME' >> stockcruncher.yml
$ echo 'InfluxDB:' >> stockcruncher.yml
$ echo '  scheme: http' >> stockcruncher.yml
$ echo '  host: localhost' >> stockcruncher.yml
$ echo '  port: 8086' >> stockcruncher.yml
$ echo '  user: CHANGEMEAGAIN' >> stockcruncher.yml
$ echo '  password: CHANGEMETOO' >> stockcruncher.yml
$ echo '  dbname: stock' >> stockcruncher.yml

Usage

An interactive help is available with:

$ stockcruncher help [subcommand]

Examples

To get daily time serie data of a symbol:

$ stockcruncher daily AAPL

To get last day endpoint data of a symbol:

$ stockcruncher quote AAPL

Limitations

Data are currently scraped from AlphaVantage API. More source could be great especially because AlphaVantage doesn't provide EU intraday data. InfluxDB is used as database to keep time series data.

Development

Please read carefully CONTRIBUTING.md before making a merge request.