Create New Watchlist
Create a new watchlist for a particular user
Last updated
Create a new watchlist for a particular user
Last updated
This POST endpoint enables you to create a new watchlist for a user whose internal ID is provided in the request's path. The newly created watchlist can initially have either no securities or it could have a list of initial securities provided as an array.
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 for whom a new watchlist will be created.
resultIncludeSecurities (query). This field indicates if the retrieved watchlist should include its corresponding stocks.
watchlist (body). This is the new watchlist.
All new watchlists must be of the application/json content type. The syntax for new watchlists is as follows:
Here's the final template for this API request:
In response to this API request, you'll receive a JSON file with the information about the newly created watchlist. If the resultIncludeSecurities is set to true, the response will contain the securities in this watchlist.
where:
Parameter
Description
Id
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.
Here are some of the common mistakes that developers make when attempting to create a new watchlist.
If you specify the wrong Et-App-Key parameter or fail to include it in the header altogether, you'll get the following error:
It's critical that you precisely follow the watchlist template at the beginning of this page and properly prepare the JSON with the new watchlist. Improperly specifying certain fields will lead to the 409 status code:
The following article covers the syntax for this API request in detail.
Internal ID of the required securities can be fetched using .