column | type | description
--------------|-----------|-----------------------------
id | integer | stock id, primary key
--------------|-----------|-----------------------------
name | text | stock company name, unique
--------------|-----------|-----------------------------
current_price | numeric | stock price
--------------|-----------|-----------------------------
last_update | timestamp | timestamp with timezone
| API endpoint | curl example
-------------------|---------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------
Get list of Stocks | GET '/api/stocks' | curl -X GET 'localhost:8080/api/stocks?page=0&size=40&sort=name'
-------------------|---------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------
Get Stock by id | GET '/api/stocks/{id}' | curl -X GET 'localhost:8080/api/stocks/1'
-------------------|---------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------
Create new Stock | POST '/api/stocks' | curl -X POST 'localhost:8080/api/stocks' -H 'Content-Type: application/json' --data-raw '{"name": "BNB", "currentPrice": 100}'
-------------------|---------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------
Update Stock price | PATCH '/api/stocks/{id}' | curl -X PATCH 'localhost:8080/api/stocks/11?price=34'
-------------------|---------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------
Delete Stock | DELETE '/api/stocks/{id}' | curl -X DELETE 'localhost:8080/api/stocks/2'