diff --git a/README.md b/README.md index 1ada7e2..9f9b802 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,35 @@ -

Dockerized-Rust

-

A Template for Rust Projects

+

StockMAPI

+

A Stock Data API Provider.

-## About this Template -This template should be used when developing **Rust** apps. It's designed to be *lightweight* and *Fast*. I would recommend using this **with** my **Rust-LS** container as it makes Rust Development so much more fun and streamlined +## Table of Contents +* [About this Project](#about-this-project) +* [Deploying](#deploying) +* [Usage](#usage) -Just adopt this into your project and it should take care of itself! \ No newline at end of file +## About this Project +In order to avoid paying **$49.99** A MONTH, this project uses **2 Free APIs** *(AlphaVantage, MarketStack)* and stores the collected data into a **MySQL** database. + +API Keys and Limits are setup in this project, so feel free to give it to whoever you want. As a suggestion, to create an API key, run the following command to generate one to insert into the *Database*: `openssl rand -base64 24` + +## Deploying +This project has a [Docker Image](https://git.objnull.net/NeurontalTeam/-/packages/container/neurostock/latest) available on OBJNULL's Foragejo. However, to make things super simple, I have provided a **Docker-Compose** file for easy and reproducable deployment. + +First, create a server to store *NeuroStock* on. Run the following commands: +```bash +wget https://git.objnull.net/NeurontalTeam/NeuroStock/src/branch/main/docker-compose.yml -O ~/docker-compose.yml +wget https://git.objnull.net/NeurontalTeam/NeuroStock/src/branch/main/data/settings.yaml.template -O /srv/conf/settings.yaml +``` + +Next, change the Docker-Compose to point towards the **/srv/conf** directory. Inside of that directory, edit the lines that you need to grab API Keys, Update the Database Password, etc. + +After that, run the following command and you'll be all set! +```bash +docker-compose up -d +``` + +## Usage +Usage is extremely simple. Just follow the format below and you should be set! Make sure to use the API Key from your provider and ask them to track symbols *(Stocks)* that you want! + +```bash +curl 'https://www.neurostock.site/v1?api=[CHANGEME]&symbol=[CHANGEME]' +```