Skip to content

infiloop2/personal-stock-ticker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

personal-stock-ticker

These are the scripts powering a personal stock ticker. To learn more about the concept visit https://infiloop.io/personalstockticker

Currently supported brokers are:

Dependencies

All of the scripts are written in python3. To install python3 follow: https://realpython.com/installing-python/

You'll need to install the following libraries for these scripts. To install a library use: python3 -m pip install library

  • selenium (used for browser automation)
  • yahoo_fin
  • coinbase (only needed for coinbase)

Additionally for selenium you'll need to install firefox browser drivers: https://github.com/mozilla/geckodriver/releases

Overall Setup

Each broker has its own folder which has the following files:

  • fetch_latest.py : Use python3 fetch_latest.py to fetch the latest price and print it to terminal.
  • config_sample.json : Sample of the config file needed to fetch the price. Copy it to config.json and replace the config with actual secrets. Remember not to commit config.json (It's already in .gitignore)
  • README.md : Broker specific instructions to setup the config

Setting up the ticker in production

  • You'll need to configure the script for each broker you use. If your broker is not in the supported list, please consider adding support for it and contributing to this repo.
  • Choose a DB and configure scripts to write the value to the DB instead of printing it. AWS Dynamo DB might be a good choice. This is not natively supported in this repo yet.
  • Configure a machine to run these scripts periodically. AWS EC2 might be a good choice.
  • Configure aggregation of this data. This can be done via another script which periodically reads from the DB or you can use stream processing.

Releases

No releases published

Packages

No packages published

Languages