Backend Routes - 12Starlight/Godsend GitHub Wiki
-
GET /api/users/:id
~ returns the users information in a dashboard format with a list of stocks in a portfolio -
POST /api/users
~ sign up -
PATCH /api/users/:id
~ update user information -
DELETE /api/users/:id
~ delete user profile
-
POST /api/session
~ login -
DELETE /api/session
~ logout
-
GET /api/securities
~ returns relevent securites (filtered by data/params) -
GET /api/securities/:id
~ returns specific security -
POST /api/securities
~ picks security to put in portfolio
-
POST /api/trades/:buy
~ buys security to go long in the market -
POST /api/trades/:sell
~ sells security to go short in the market -
DELETE /api/trades/:id
~ closes trade
*Note: uses wildcard that is only identified in two distinct ways buy and sell
-
GET /api/watchlist
~ returns all stocks being watched -
POST /api/watchlist/:id
~ adds stock to the watchlist -
DELETE /api/watchlist/:id
~ removes stock from watchlist