Add Security to Watchlist by Ticker
Add a security to an existing watchlist by providing the security's ticker symbol
Overview
This PUT endpoint enables you to add a specific security (by its ticker symbol) 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.
symbolToExchange (body). This is a dictionary that contains the ticker symbol of the security.
Request Body Syntax
To add a new security by its ticker symbol, specify the following parameter in the request body:
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 Red Hat stock to the watchlist:
Common Mistakes
Here are some of the common mistakes that developers make when attempting to add a particular security by its ticker symbol to a specific watchlist.
Specifying the Security's Internal ID Instead of its Ticker Symbol
Another common mistake when making this API request is specifying the internal ID of the added security instead of its ticker symbol — for this purpose, there's a separate API request. If you specify the security's internal ID in this request, you'll receive the 409 status code.
The following article covers the syntax for this API request in detail.
Last updated