Não fala inglês? Clique aqui para ver está página em português
Turning starry-eyed investors into masters of the financial market
- Mandacaru Broker API
- Table of contents
- Description
- Developers
- Resources
- System login
- System registration
- Delete system registration
- Get all exchange traded funds
- Get a specific Exchange Traded Fund
- Register an Exchange Traded Fund
- Update an Exchange Traded Fund
- Delete an Exchange Traded Fund
- List all investments
- Register a new investment
- Delete an investment
- List all real estate funds
- Get a specific real estate fund
- Register a new real estate fund
- Update a specific real estate fund
- Delete a specific real estate fund
- Get all registers
- Get register
- Create register
- Update register
- Delete register
- List all assets
- Get a specific asset
- Register an asset
- Update an asset
- Delete an asset
- User system login
- User system registration
- Update user in the system
- Delete user in the system
- Postman collection
- Swagger
- Testing
- Step-by-Step environment setup
- Requiriments
- Technologies Used
- Contributions
- License
A Mandacaru Broker API é uma aplicação Spring Boot que fornece operações CRUD (Create, Read, Update, Delete) para gerenciar informações sobre ações (stocks).
A Home Broker is an online platform that allows investors to buy and sell financial assets, such as stocks, options, government bonds, among others, directly over the internet. Through it, investors can access real-time market information, analyze charts, execute buy and sell orders, monitor their investment portfolios, among other features, all online.
If you want to learn more about Home Broker and how it works, visit the B3 (Brazilian stock exchange) : How to operate with Homebroker
The project was developed in collaboration by the following developers:
Ingrid Lima |
Wesley Maciel |
João Paulo |
Moisés Oliveira |
---|
Logs into the system.
Endpoint:
POST /auth/login
Responses:
200: Successful login
400: Invalid credentials
401: User not registered
Registers in the system.
Endpoint:
POST /auth/register
Responses:
200: Successful registration
409: User already registered
Deletes the registration in the system.
Endpoint:
DELETE /auth/{id}
Responses:
200: Successful deletion
Returns all available Exchange Traded Funds.
Endpoint:
GET /etf
Returns details of a specific Exchange Traded Fund based on the provided ID.
Endpoint:
GET /etf/{id}
Registers a new Exchange Traded Fund based on the provided data.
Endpoint:
POST /etf/register
Updates details of a specific Exchange Traded Fund based on the provided ID.
Endpoint:
PUT /etf/{id}
Deletes a specific Exchange Traded Fund based on the provided ID.
Endpoint:
DELETE /etf/{id}
Returns a list of all available types of investments.
Endpoint:
GET /assets
Creates a new investment based on the provided data.
Endpoint:
POST /assets/register
Responses:
200: Successful registration
Deletes a specific investment based on the provided ID.
Endpoint:
DELETE /assets/{id}
Responses:
200: Successful deletion
Retrieve all registered real estate funds.
Endpoint:
GET /ref
Retrieve details of a specific real estate fund based on ID.
Endpoint:
GET /ref/{id}
Register a new real estate fund based on the provided data.
Endpoint:
POST /ref/register
Update details of a specific real estate fund based on ID.
Endpoint:
PUT /ref/{id}
Delete a specific real estate fund based on ID.
Endpoint:
DELETE /ref/{id}
Responses:
200: Successful deletion
Returns an array of objects with all records in the table.
Endpoint:
GET /stocks
Returns the specified record object.
Endpoint:
GET /stocks/{id}
Returns the object with the sent data.
Endpoint:
POST /stocks
Request Body:
{
"symbol": "BBAS3",
"companyName": "Banco do Brasil SA",
"price": 56.97
}
Returns the object with the sent data
Endpoint:
PUT /stocks/{id}
Request Body:
{
"symbol": "BBAS3",
"companyName": "Banco do Brasil SA",
"price": 56.97
}
No return.
Endpoint:
DELETE /stocks/{id}
Get all assets.
Endpoint:
GET /treasury
Get details of a specific asset based on the ID.
Endpoint:
GET /treasury/{id}
Register a new asset based on the provided data.
Endpoint:
POST /treasury/register
Update details of a specific asset based on the ID.
Endpoint:
PUT /treasury
Delete a specific asset based on the ID.
Endpoint:
DELETE /treasury/{id}
Logs in a user based on the provided information.
Endpoint:
POST /user/login
Responses:
200: Successful login
400: User not registered
401: Invalid credentials
Registers a new user based on the provided information.
Endpoint:
POST /user/register
Responses:
200: Successful registration
409: Username already in use
Updates the information of a specific user based on the provided ID.
Endpoint:
PUT /user/{id}
Responses:
200: Successful update
404: User not found
Deletes a specific user based on the provided ID.
Endpoint:
DELETE /user/{id}
Responses:
200: Successful deletion
404: User not found
The following collection includes all configured routes, along with their corresponding API tests already implemented.
Swagger is an open-source tool that enables clear and interactive documentation of APIs. This interface simplifies understanding and integration with the Mandacaru Broker API.
http://localhost:8080/swagger-ui/index.html#/
This repository has undergone static analysis using Checkstyle, SonarQube, and SonarLint tools. Additionally, it has unit test cases organized by classes, as well as an integration test that verifies the CRUD operations of the API.
-
Clone the repository:
git clone /~https://github.com/I-Lima/Mandacaru-Broker-API.git
-
Import the project into your preferred IDE.
-
To run the database in Docker, use the following command:
docker-compose up -d
-
Run the Spring Boot application.
-
Access the API at
http://localhost:8080
.
- Java 11 or higher
- Maven
- Banco de dados
- Docker
- Spring Boot
- Spring Data JPA
- Maven
- JUnit
- Mockito
- JaCoCo
- Checkstyle
- SonarQube
- SonarLint
- PostgresSQL
- Docker
- Docker Compose
Contributions are welcome!
This project is licensed under the MIT License.