-
Notifications
You must be signed in to change notification settings - Fork 0
Backend Routes
keely-lee edited this page Jun 9, 2020
·
6 revisions
- GET / StaticPagesController#root
-
POST /api/users
- user enrollment
-
POST /api/session
- user login -
DELETE /api/session
- user logout
-
GET /api/stocks
- returns the stocks owned by the logged in user (filtered by params) -
GET /api/stocks/:id
- returns selected stock -
POST /api/stocks/
- adds a (new) purchased stock to user's list -
PATCH /api/stocks/:id
- adds/subtracts previously owned stock on user's list -
DELETE /api/stocks/:id
- removes (if sell out) stock owned by user
-
GET /api/transactions
- returns list of user's transactions (may be filtered for the past 30 days) -
POST /api/transactions/:id
- adds buy/sell transactions
Note:
- Users does not need a GET route
- Watchlist does not need a route
- Users' portfolios will be rendered via the /api/users/stock/ route