Skip to content

umitishere/brokage-backend

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Brokage Backend

Running the Project

  1. Start PostgreSQL with Docker

    docker-compose up -d
  2. Build the project

    mvn clean install
  3. Run the application

    mvn spring-boot:run
  4. Run tests

    mvn test
  5. Access Swagger UI

    http://localhost:8080/api/swagger-ui.html
    

Endpoints

Authentication (Public)

  • POST /api/v1/auth/login - Login with username and password

Stock Orders

Customer Endpoints

  • POST /api/v1/customer/stock-order - Create a new stock order
  • GET /api/v1/customer/stock-order - List your stock orders (filter by status, side, dates)
  • DELETE /api/v1/customer/stock-order/{orderId}/cancel - Cancel your pending order

Admin Endpoints

  • POST /api/v1/admin/stock-order - Create stock order for any customer
  • GET /api/v1/admin/stock-order - List all stock orders (filter by customer, status, side, dates)
  • DELETE /api/v1/admin/stock-order/{orderId}/cancel - Cancel any order
  • PUT /api/v1/admin/stock-order/match-all - Match all pending buy/sell orders

Assets

Customer Endpoints

  • GET /api/v1/asset/customer - View your assets
  • POST /api/v1/asset/customer/topup - Deposit fiat money (TRY)
  • POST /api/v1/asset/customer/sell-all - Sell all your stock assets for TRY

Admin Endpoints

  • GET /api/v1/asset/admin - View any customer's assets (filter by asset name)

Authentication

All endpoints except /api/v1/auth/login require a JWT token in the Authorization header:

Authorization: Bearer <your-token>

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages