StockMAPI

A Stock Data API Provider.

## Table of Contents * [About this Project](#about-this-project) * [Deploying](#deploying) * [Usage](#usage) ## 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/stockmapi/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 *StockMAPI* on. Run the following commands: ```bash wget https://git.objnull.net/NeurontalTeam/StockMAPI/raw/branch/main/docker/docker-compose.yml -O ~/docker-compose.yml wget https://git.objnull.net/NeurontalTeam/StockMAPI/raw/branch/main/data/settings.yaml.template -O /srv/data/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.stockmapi.site/v1?api=[CHANGEME]&symbol=[CHANGEME]' ```