Igor14Rafa / stock-quote-manager

A stock quote manager, to consumer info from a stock manager, as a test

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Requirements

Docker, Maven, Java (>=8), The stock-manager project.

How to run

In the stock-quote-manager folder, run

mvnw package && java -jar target/stock-quote-manager.jar

If you don't have the maven installed, go here. After this, you need to create the docker image

docker build -t igorrafa/stock-quote-manager .

You can change the image's name, but you must change it in the Dockerfile and docker-compose.yml as well.

Usage

Build the stock-manager project and run.

Endpoints

[POST] :8081/add - Add a new quote

Create a new quote on a a given stock. The stock must be registered in the stock-manager

Parameters

  • id (String): stock id
  • Date (Date): stock date
  • Price (Float): stock price

[GET] :8081/stockquotes -List stockquotes

List all the quotes registered for each stock, in the given format:

{
  "id": "stockId",
  "quotes": {
    "quoteDate": "quotePrice"
  }
}

License

MIT

About

A stock quote manager, to consumer info from a stock manager, as a test


Languages

Language:Java 98.3%Language:Dockerfile 1.7%