Install S.T.O.C.K.S
pip3 install robin-stocks
pip3 install numpy
pip3 install flask
git clone https://github.com/S-Spektrum-M/Stocks
cd Stocks
touch auth.py
sudo add-apt-repository ppa:redislabs/redis
sudo apt-get update
sudo apt-get install redis
pip install redis
- Add your Robinhood email and password to auth.py.
- S.T.O.C.K.S parses historical data to create two types of models
- Short term: Linear
- Next trading hour
- Long term: Exponential
- Next trading day
- Short term: Linear
- If the query has already served itself within the last minute, then it is loaded from a Redis database to increase speed and decrease compute time
- The query is then served through Flask
Endpoint | Parameter | Return | Description |
---|---|---|---|
/api/short |
?id={ticker} |
Below | The short term calculation |
Short Return Type
{
"lower": 2944.7,
"upper": 3065.44
}
Endpoint | Parameter | Return | Description |
---|---|---|---|
/api/long |
?id={ticker} |
Below | The long term calculation |
Long Return Type
{
"lower": 2944.7,
"upper": 3065.44
}
Endpoint | Parameter | Description |
---|---|---|
/api/short/multi |
?params={ticker} |
The short term calculation for multiple stocks |
Return Type
[
{
"goog": [
2931.54,
2827.87
]
},
{
"aapl": [
171.47,
159.31
]
}
]
Endpoint | Parameter | Description |
---|---|---|
/api/long/multi |
?params={ticker} |
The long term calculation for multiple stocks |
Return Type
[
{
"goog": [
2931.54,
2827.87
]
},
{
"aapl": [
171.47,
159.31
]
}
]