Get User's Watchlists
List a user's watchlists
Overview
This GET endpoint enables you to retrieve the list of watchlists of a user whose ID is provided in the request's path. The watchlists can be retrieved either with only information about the watchlists or including the list of securities in every watchlist.
There are five required parameters that must be provided in the request:
Authorization (header). This is the authorization token from the very first token request. The value of this header must have the following format:
Bearer BQ898r9fefi
(Bearer
+ 1 space + the token).API version (path). Unless necessary, leave it at "1.0".
userID (path). This is the ID of the user whose watchlists need to be retrieved.
includeSecurities (query). This field indicates if the retrieved watchlists should include their corresponding stocks.
Here's the final template for this API request:
Response
In response to this API request, you'll receive a JSON file that lists the user's watchlists:
If the includeSecurities query parameter is set to true, the retrieved watchlists will include their corresponding securities:
Watchlist Parameters
Parameter | Description |
---|---|
Id | This is the internal identifier of the watchlist in AutoShares. |
Name | This is the name of the watchlist in AutoShares. |
Type | This is the type of the watchlist. It could either be a user-created watchlist or a default watchlist provided by the system. |
CreateDate | This is the date on which the watchlist was created. |
ModifyDate | This is the date on which the watchlist was last modified. |
ReadOnly | This field indicates if the watchlist is modifiable. |
SecurityList | This is a collection of securities in the watchlist. |
Common Mistakes
Here are some of the common mistakes that developers make when attempting to retrieve a user's watchlists.
Failing to Specify the Query Parameter
It's crucial to understand that the includeSecurities parameter must be indicated in the request; otherwise you'll receive the 404 status code and the following message:
The following article covers the syntax for this API request in detail.
Last updated