-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathtest-api.http
More file actions
58 lines (43 loc) · 1.02 KB
/
Copy pathtest-api.http
File metadata and controls
58 lines (43 loc) · 1.02 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
### Create Portfolio
POST http://localhost:3000/api/portfolio
Content-Type: application/json
{
"name": "My Tech Portfolio",
"description": "Long-term tech investments"
}
###
### List Portfolios
GET http://localhost:3000/api/portfolio
###
### Create Watchlist
POST http://localhost:3000/api/watchlist
Content-Type: application/json
{
"name": "Tech Stocks to Watch"
}
###
### List Watchlists
GET http://localhost:3000/api/watchlist
###
### Add Holding (replace {portfolio_id} with actual ID from create response)
POST http://localhost:3000/api/portfolio/{portfolio_id}/holdings
Content-Type: application/json
{
"symbol": "AAPL",
"assetType": "stock",
"quantity": 10,
"purchasePrice": 150.50,
"purchaseDate": "2024-01-15",
"notes": "Bought on dip"
}
###
### Add Asset to Watchlist (replace {watchlist_id} with actual ID)
POST http://localhost:3000/api/watchlist/{watchlist_id}
Content-Type: application/json
{
"symbol": "TSLA",
"assetType": "stock",
"notes": "Waiting for better entry",
"alertPrice": 200
}
###