Smallcase Backend Task
API Endppoints
-
GET http://3.141.32.29:8080/v1/trades/fetch/all - to fetch all trades
-
GET http://3.141.32.29:8080/v1/portfolios/fetch/all - to fetch all portfolios
-
POST http://3.141.32.29:8080/v1/trades/create - to create a new trade Request payload:
BUY
{ "ticker_symbol": "REL", "shares": 8, "trade_type": "BUY", "price": 45 }
SELL
{ "ticker_symbol": "REL", "shares": 8, "trade_type": "SELL", "price": 45 }
-
PUT http://3.141.32.29:8080/v1/trades/update/60585861fb5aab1af5ecd576 - to update a trade with trade id Request payload:
{ "ticker_symbol": "REL", "shares": 8, "trade_type": "BUY", "price": 45 }
-
GET http://3.141.32.29:8080/v1/portfolios/fetch/returns - to fetch returns
-
DELETE http://3.141.32.29:8080/v1/trades/update/60585861fb5aab1af5ecd576 - to delete a trade