Add Security to Watchlist by ID
Add a security to an existing watchlist by providing the security's internal ID
Overview
This PUT endpoint enables you to add a specific security to a specific watchlist of the user whose id is provided 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".
userID (path). This is the ID of the user whose particular watchlist needs to be appended by a new security.
watchlistID (path). This is the internal identifier of the watchlist that needs to be appended by a new security. You can retrieve the list of a user's watchlists with this method.
securityID (path). This is the internal identifier if the security that needs to be added to the watchlist. You can find the ID of a particular security with this method.
Here's the final template for this API request:
Response
In response to this API request, you'll receive a JSON file with the updated watchlist. In this sample request we added the Ford stock to the watchlist:
Common Mistakes
Here are some of the common mistakes that developers make when attempting to add a particular security to a specific 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 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