Alpaca-API icon indicating copy to clipboard operation
Alpaca-API copied to clipboard

Paper api "watchlists" endpoint doesn't return assets

Open pererasys opened this issue 4 years ago • 3 comments

When retrieving all watchlists no assets are returned, is this the expected behavior?

pererasys avatar Nov 05 '20 05:11 pererasys

Please give an example snippet or API call

ZippeyKeys12 avatar Nov 13 '20 00:11 ZippeyKeys12

GET https://paper-api.alpaca.markets/v2/watchlists

Response:

[ { "id": "956d1ec3-83ba-4198-af2c-c39a285a48be", "account_id": "account id", "created_at": "2020-10-31T23:00:25.175753Z", "updated_at": "2020-10-31T23:00:25.175753Z", "name": "Tech" } ]

GET https://paper-api.alpaca.markets/v2/watchlists/956d1ec3-83ba-4198-af2c-c39a285a48be

{ "id": "956d1ec3-83ba-4198-af2c-c39a285a48be", "account_id": "account id", "created_at": "2020-10-31T23:00:25.175753Z", "updated_at": "2020-10-31T23:00:25.175753Z", "name": "Tech", "assets": [ { "id": "b0b6dd9d-8b9b-48a9-ba46-b9d54906e415", "class": "us_equity", "exchange": "NASDAQ", "symbol": "AAPL", "name": "Apple Inc. Common Stock", "status": "active", "tradable": true, "marginable": true, "shortable": true, "easy_to_borrow": true }, { "id": "4ce9353c-66d1-46c2-898f-fce867ab0247", "class": "us_equity", "exchange": "NASDAQ", "symbol": "NVDA", "name": "NVIDIA Corporation Common Stock", "status": "active", "tradable": true, "marginable": true, "shortable": true, "easy_to_borrow": true }, { "id": "8ccae427-5dd0-45b3-b5fe-7ba5e422c766", "class": "us_equity", "exchange": "NASDAQ", "symbol": "TSLA", "name": "Tesla, Inc. Common Stock", "status": "active", "tradable": true, "marginable": true, "shortable": true, "easy_to_borrow": true } ] }

pererasys avatar Nov 14 '20 01:11 pererasys

I believe that is the design. Get Watchlists will only retrieve Watchlists and Get Watchlist will return the Assets.

ravivamsi avatar Jan 12 '21 22:01 ravivamsi