Skip to content

cobyeastwood/blue-bot

Repository files navigation

BlueBot

Quick Note

BlueBot and all mentioned services are free to use, including supported financial APIs.

Overview

BlueBot is a self-healing trading bot. You can get started by building a custom stock screener from Free Stock Screener - Yahoo Finance and setting it in the global scope.

This project supports the following:

  1. Custom Stock Screening
  2. Historical & Real-Time Data Collection
  3. Technical Analysis (eg. Bollinger Bands, VWAP)
  4. Custom Trade Strategies (eg. Backtesting)
  5. Conditional Trade Execution (WIP)

How To Get Started

Root file main.go contains the general structure and configuration for this project.

  1. Custom Yahoo Finance stock screener endpoint can be attached on line line 16.


     YF_SCREENER_URL = "" // Set custom yahoo finance screener endpoint
    

    Note: global URL will live for only a month and will have recreated if used actively. A future OAuth tool will allow endpoints to add so that the Yahoo Finance screener will come from inside a Yahoo account.


  2. Trading strategies can be easily implemented.


     // An example trade strategy
     
     func Strategy(mc *MainConfig) (string, interface{}) {
     	t.Sort(2.00)
    
     	m1 := Short(t, mc.c)
    
     	m2 := Sift(m1)
    
     	m2 := Mechanics(FetchLong(m1.Ticker, NewFetchConfig(HOUR, "1", 365)), NewLongMechConfig())
    
     	Check(m1.Ticker, EMA)
     }
    

    Later a custom strategy can be added and placed inside the following code block on line 48.

     for {
    
     	t := <-mc.tOut
    
     	Strategy(mc) // Custom trade strategy goes here
    
     	time.Sleep(60 * time.Second)
    
     }
    

Historical Support

For historical data collection, you can choose from three different services: Alpha Vantage, IEX Cloud, and Polygon.io. Any API keys will need to be placed inside a local env file.

Real-Time Support

For real-time data collection, you will need to collect API keys from Alpaca, an algorithmic stock trading for developers with margin availability and fractional shares. Any API keys will need to be placed inside a local env file.

About

Blue Bot is an open-source trading bot that can be customized to handle specific investment strategies.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published