GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - SmashingEric/redis-stack-stocks: This project demonstrates how you can use the multi-model capabilities of Redis to create a real-time stock watchlist application.

BranchesTags
Open more actions menu
 
 

Latest commit

 

History

56 Commits
56 Commits

Folders and files

NameName
Last commit message
Last commit date
api
api
 
 
data
data
 
 
stream
stream
 
 
testing
testing
 
 
ui
ui
 
 
.gitignore
.gitignore
 
 
README.md
README.md
 
 
app_preview_image1.png
app_preview_image1.png
 
 
docker-compose.yml
docker-compose.yml
 
 
final_image.png
final_image.png
 
 
image2-redistack.png
image2-redistack.png
 
 
marketplace.json
marketplace.json
 
 
redis-stack-image.png
redis-stack-image.png
 
 
redis-stack-stocks.png
redis-stack-stocks.png
 
 
redis_stacks.png
redis_stacks.png
 
 

Repository files navigation

Introduction

redis-stack-stocks

This project demonstrates how you can use Redis Stack to create a real-time stock watchlist application. It uses several different features of Redis:

  • Sets
  • Pub/Sub
  • Hashes
  • RedisTimeSeries
  • RedisBloom
  • RedisJSON
  • RediSearch

Usage with Docker

Requirements

  1. Install Docker

Set the following environment variables in a .env file in the root directory of the project:

  1. APCA_API_KEY_ID: Your Alpaca API Key found on the Alpaca dashboard
  2. APCA_API_SECRET_KEY: Your Alpaca API Secret found on the Alpaca dashboard

Installation

$ docker-compose --env-file ./.env up -d

After the containers are up and running (for the first time), go into the data directory and run:

$ pip install -r requirements.txt
$ python main.py

Usage Locally

Requirements

  1. python 3.6+
  2. pip

Environment Variables

Create a .env file in the root directory of the project and set the following environment variables:

APCA_API_KEY_ID=<your-api-key>
APCA_API_SECRET_KEY=<your-api-secret>
REDIS_URL=<redis-url>
REDIS_OM_URL=<redis-url>

Create a .env file in the ui directory of the project and set the following envionrment variables:

NEXT_PUBLIC_API_URL=http://localhost:8000/api/1.0
NEXT_PUBLIC_WS_URL=ws://localhost:8000

Installation

From the root directory, run the following commands:

$ python -m venv ./.venv

Stream Service

Run the following commands in the stream directory:

$ pip install -r requirements.txt
$ python main.py

API Service

Run the following commands in the api directory:

$ pip install -r requirements.txt
$ uvicorn main:app

Web Service

Run the following commands in the web directory:

$ npm install
$ npm run dev

Known Issues

  1. There is a known issue with the Alpaca websocket API thread safety. You will find a workaround in the alpaca.py file.

Managed Hosting

Redis offers managed hosting for Redis Stack for free, and you can even get $200 in credits towards a paid subscription by using code TIGER200.

About

This project demonstrates how you can use the multi-model capabilities of Redis to create a real-time stock watchlist application.

Resources

Readme
Activity

Stars

1 star

Watchers

0 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.