Remove Security From Watchlist by ID
Remove a particular security from a watchlist by providing the security's internal ID
Overview
This DELETE endpoint enables you to remove a particular security from a particular watchlist by providing the security's ID in the request's path.
There are six 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".
watchlistID (path). This is the ID of the watchlist from which a security must be removed.
userID (path). This is the ID of the user whose particular watchlist should have the specified security removed.
securityID (path). This is the ID of the security that must be removed from a particular watchlist. You can fetch the ID of a particular security with this method.
The final template for this request is as follows:
Response
In response to this API request, you'll receive the updated watchlist with the specified security removed. In this example we've removed the Apple stock from a tech-oriented watchlist.
Watchlist Parameters
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 remove a particular security from a watchlist.
Specifying the Security's Ticker Symbol Instead of its Internal ID
Another common mistake when making this API request is specifying the ticker symbol of the to-be-added security instead of its internal ID — for this purpose, there's a separate API request. If you specify the security's ticker symbol in this request, you'll receive the 400 status code and the following error message:
The following article covers the syntax for this API request in detail.
Last updated