Code Monkey home page Code Monkey logo

crypto_signal's Introduction

Bitcoin Signal

Release 1.0

This release provides an API that recommends Buy/Sell of Bitcoin for a given date with intention to maximize profits.

Requirements to BUY (based on Marc Howard's blog ):

  1. Search terms of “Buy Bitcoin” to “BTC USD” ratio is more than 35%.
  2. BTC price difference closes more than $80 above the prior day’s close price.

Features

This release

  • Get historical transaction data for Bitcoin.
  • Get Google Trends data.
  • Import data into database.
  • Identify buy/sell based on parameters described in blog.
  • Use Django to create API.
  • Write api docs and publish.

Next release

  • Switch to SQLite database for easier sharing.
  • Use graphical analysis to see how well the current buy/sell recommendations are performing.
  • Explore other sources (ie. BitMEX, CCXT).
  • Optimize existing parameters (specifically, revise Google Trends and BTC price change thresholds).
  • Incorporate OHLCV (open, high, low, close,volume) trends.

Running project locally

  1. Clone repo to your development environment
git clone https://github.com/lauramayol/crypto_signal.git
  1. Install virtualenv
pip install virtualenv
  1. Change directory to project folder
cd crypto_signal
  1. Start virtualenv
virtualenv --python=/usr/local/bin/python3 env
  1. Run virtualenv
source env/bin/activate 
  1. Install dependencies using pip
pip3 install -r requirements.txt
  1. Add Nomics Api Key to environment variables. Nomics
export NOMICS_API_KEY=YOUR_API_KEY
  1. Run development server
python crypto_signal/manage.py runserver    
  1. Check http://127.0.0.1:8000/ on your browser.

Endpoints

Location Endpoint
Root path /
Signal /<simulation_id>/signal
Load Bitcoin data /load/nomics
Load trends data /load/trends
Update candles foreign keys /update/candles
Update BUY/SELL signal /update/<simulation_id>/signal

HTTP request and query methods

Method Endpoint Query Description Examples
GET / n/a Retrieves the current list of Simulations that can generate a signal. Reference this list to use the correct simulation_id with other methods. /
GET /<simulation_id>/signal ?currency=BTC&date=yyyy-mm-dd Retrieves the Buy/Sell signal from specified simulation in database for given currency (currently only Bitcoin (BTC) available and historical date (Jan 2013-Oct 2018). /1/signal?currency=BTC&date=2018-08-15
POST /load/nomics ?currency=BTC&start=yyyy-mm-dd&end=yyyy-mm-dd Full load of candle (OLHCV metrics) from Nomics.com with given currency and start/end dates (optional). Currently defaulted to daily (1d) intervals and start/end is blank (all-time). /load/nomics?currency=BTC&start=2018-01-01
POST /load/trends ?currency=BTC Full load of Google trends Interest Over Time metrics using pytrends library. We are comparing the Google search terms "buy bitcoin" and "BTC USD" Worldwide, and pulling the daily data on 180-day interval starting with today down to 2013. /load/trends?currency=BTC
PATCH /update/candles ?currency=BTC Updates foreign key relationship of candle to trend model. /update/candles?currency=BTC
PATCH /update/<simulation_id>/signal ?currency=BTC Updates BUY/SELL signal for each candle based on specified simulation. /update/1/signal?currency=BTC

Contribute

Support

If you are having issues, please let me know by posting on Issue Tracker.

Project Plan: Bitcoin signal

Pre-Release

The goal of this project is to provide an API that recommends Buy/Sell/Hold of Bitcoin at any given time to maximize profitability.

To-do

1.0 release

  • Get historical transaction data for Bitcoin.
  • Get Google Trends data.
  • Import data into database.
  • Identify buy/sell based on parameters described in blog.
  • Use Django to create API.
  • Write api docs and publish.

2.0 release

Goal: optimize parameters
  • Switch to SQLite database for easier sharing.
  • Use graphical analysis to see how well the current buy/sell recommendations are performing.
  • Explore other sources (ie. BitMEX, CCXT).
  • Optimize existing parameters (specifically, revise Google Trends and BTC price change thresholds).
  • Incorporate OHLCV (open, high, low, close,volume) trends.

3.0 release

Goal: live model and optimize the data sources
  • What other variables could play a part in Bitcoin price?
  • Get live transactional and order book data.
  • Compare various sources for historical data and implement as needed.

Contribute

crypto_signal's People

Contributors

lauramayol avatar cagica avatar

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.