A spring boot application that makes requests to Robinhood(or other data providers) for market and instrument data and updates the table data in the database, and provides the user with an endpoint to get database data and sync data with the ones in data providers.
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.
- Integration and unit tests has been developed for nearly all services and controllers. Test containers are used for integration tests so you will need Docker to run integration tests.
- Response of GetInstrumentBySymbol method in InstrumentService is cached. These caches will be evited if you sync instrument data (request to the api/instruments/sync) for data consistency.
- If you stop the containers after running them and start them again, the application container will give an error because it will try to insert the data in the instrument table into the database again (the spring application will try to run the data.sql file every time it starts). For this reason, before starting the application again, you need to run the 'docker-compose down' command and delete the existing containers.
Application itself, PostgreSQL and Redis (for caching) databases are containerized by using Docker Compose and provided connection to these containers with each other. So you need to have Docker in your computer.
A step by step guide that will tell you how to get the development environment up and running.
- Clone the repo
git clone https://github.com/shintalha/Stock-Market-Data-Application.git
- Run dockerized app
docker-compose up
Go to the swagger ui screen
http://localhost:8080/swagger-ui/index.html