Read stock data from the US stock market.
Stockreader is a system that retrieves current stock data and historical stock data from the US stock market.
The system executes this steps automatically at start-up:
- Read the stocks from the files listed in the config-*.toml file.
- Save the stocks of the step one into the DB.
- Download and save the stock historical data of the past ten years.
Additionally the system repeat the following tasks in different period of times:
- Download and save the stocks current data every one hour.
- Download and save the stocks historical data of the past week every day at 18:00.
- Download and save the stock historical data of the past ten years every last day of the month at 23:00.
This recurring tasks guarantee that the system has the historical stock data of at least the last 10 years.
The only two dependencies stockreader needs to install are:
- docker-engine (It will automatically install docker-compose in Windows and OS X. If you are using Linux please go to step 2 of this list)
- docker-compose
Please copy and paste this commands in the terminal:
git clone [email protected]:julianespinel/stockreader.git
cd stockreader/scripts
sh start-docker.sh
Now open a web browser and go to: http://localhost:5000/stockreader/admin/ping
If you can see pong
in the web browser, then Stockreader is being correctly installed.
- Run all Tests:
nosetests
- Run a single test file:
nosetests test/job_test.py
Stockreader has a simple HTTP API, with it you can request stock current data and historical data.
Please refer to the API documentation. * link.
To generate API docs please follow this steps:
npm install -g aglio
cd docs/
aglio -i input.apib -s
http://localhost:3000