Skip to content

abdullah50053/hackgtx

Repository files navigation

GENERATE JSON

Steps

  1. Go to data-ingest dir
  2. python3 -m venv venv
  3. python3 -m pip install -r requirements.txt
  4. python3 -m pip install yfinance
  5. python3 main.py

JSON file generation

  • stocks: list of stocks
  • stockOpenPrices: last price the market closed on (Friday)
  • week: stock prices for last week (5 minute data)
  • month: stock prices for last month (hour data)
  • year: stock prices for last year (day data)

API Endpoints

  • GET /today?stock={stock_name}
  • GET /week?stock={stock_name}
  • GET /month?stock={stock_name}
  • GET /year?stock={stock_name}

Return

{
    "prices": [0, 1, 2],
    "error": "error string",
}

Prices is a list of numbers, starting from opening to close, with the specified interval

Valid stock names

From https://www.nasdaq.com/market-activity/quotes/historical

  • AAPL (Apple)
  • SBUX (Starbucks)
  • MSFT (Microsoft)
  • CSCO (Cisco Systems)
  • QCOM (QUALCOMM)
  • META (Meta)
  • AMZN (Amazon.com)
  • TSLA (Tesla)
  • AMD (Advanced Micro Devices)
  • NFLX (Netflix)

NOTE: JSON file is autogenerated by data-ingest

Generate Random Trade Data

percent chance to go down based on delta: diff bw curr + open price

  • [delta] = [up chance] [down chance]
  • 0 = 50% 50%
  • -1 = 100% 0%
  • 1 = 0% 100%
  • 0.5 = 25% 75%

will generate up to the current minute's data points for today, then generate 1/min

Paper Trading

idfk

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors