Coder Social home page Coder Social logo

jmoussa / stock-tracer-be Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 1.0 46 KB

Stock Tracer RestAPI Backend. Handles Robinhood and Yahoo Finance API queries for historical and user data, as well as user authentication.

Python 98.44% Shell 0.61% Dockerfile 0.94%
postgresql sqlalchemy fastapi sqlalchemy-python python docker-compose docker robinhood robinhood-api stocks

stock-tracer-be's Introduction

Stock Tracer Backend

This is the backend API for the Stock Tracer Web App. This API handles

  • Fetching/Caching historical stock data from yfinance
  • Authentication
  • User Account
  • User's Explicit Financial Profiling (stored safely)

Requirements

  • Anaconda (for Python environemnt management)
  • Python FastAPI (included in the Anaconda environment) docs
  • PostgreSQL database docs

Architecture

The API caches each call it does, and before the next call is made, it checks the database for any request of that stock within the caching time limit (default set in config.json, and editable by the user in the UI).

After the historical data is retrieved (whether from the database or yfinance) the API will format the data so that it can be sent to the front-end in the proper format and graphed.

Set Up and Run the Server

I've set it up so that you only need to use the run script to start. Be sure to set the S3 environement variables for access.

In the root directory of the repository:

conda env create -f environment.yml
conda activate stock-tracer 
cd stock_tracer
cp config/config.json.template config/config.json # edit config.json and fill with your values/credentials for the postgresql database

./run

For quick API documentation, navigate to localhost:8000/docs after starting the server

stock-tracer-be's People

Contributors

jmoussa avatar

Watchers

 avatar

Forkers

mikpim01

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.