This GET endpoint enables you to retrieve information about a specific watchlist of a user whose internal ID is provided in the request's path. The watchlist can be retrieved either with only information about the watchlists or including the list of securities in every watchlist.
There are six required parameters that must be provided in the request:
Et-App-Key (header). This is the unique key of your app that identifies your app when communicating with our service. Contact your administrator to get this key.
Authorization (header). This is the authorization token from the very first .
API version (path). Unless necessary, leave it at "1.0".
userID (path). This is the ID of the user whose particular watchlist need to be retrieved.
watchlistID (path). This is the internal identifier of the watchlist whose information must be retrieved.
includeSecurities (query). This field indicates if the retrieved watchlist should include its corresponding stocks.
This is the internal identifier of the watchlist in Autoshares Trader.
Name
This is the name of the watchlist in Autoshares Trader.
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 specific watchlist.
Failing to Specify the Et-App-Key Parameter
If you specify the wrong Et-App-Key parameter or fail to include it in the header altogether, you'll get the following error:
{
"error": "Application key is not defined or does not exist"
}
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:
{
"Message": "No HTTP resource was found that matches the request URI 'https://pub-api-et-demo-prod.etnasoft.us/api/v1.0/users/@me/watchlists'."
}
The following article covers the syntax for this API request in detail.