Skip to content
Get started

Create Watchlist

v1.watchlist.create_watchlist(WatchlistCreateWatchlistParams**kwargs) -> WatchlistCreateWatchlistResponse
POST/v1/watchlists

Create Watchlist

ParametersExpand Collapse
name: str

The desired watchlist name.

ReturnsExpand Collapse
class WatchlistCreateWatchlistResponse:

Represents a user watchlist.

id: str

The unique identifier for the watchlist.

formatuuid
created_at: datetime

The timestamp when the watchlist was created.

formatdate-time
name: str

The user-provided watchlist name.

Create Watchlist

from clear_street import ClearStreet

client = ClearStreet(
    api_key="My API Key",
)
response = client.v1.watchlist.create_watchlist(
    name="name",
)
print(response)
{
  "data": {
    "created_at": "2025-01-23T12:00:00.000000000Z",
    "id": "770e8400-e29b-41d4-a716-446655440002",
    "name": "Growth Stocks"
  },
  "error": null,
  "metadata": {
    "request_id": "b2c3d4e5-f6a7-8901-2345-678901bcdefg"
  }
}
{
  "error": {
    "code": 400,
    "message": "Failed to parse the request body as JSON: trailing comma at line 3 column 1"
  },
  "metadata": {
    "request_id": "72348112-c92d-4610-829a-f769c82a9a0f"
  }
}
{
  "error": {
    "code": 409,
    "message": "Resource already exists"
  },
  "metadata": {
    "request_id": "0efec74c-7d58-4fef-b73b-df50731e4f6b"
  }
}
Returns Examples
{
  "data": {
    "created_at": "2025-01-23T12:00:00.000000000Z",
    "id": "770e8400-e29b-41d4-a716-446655440002",
    "name": "Growth Stocks"
  },
  "error": null,
  "metadata": {
    "request_id": "b2c3d4e5-f6a7-8901-2345-678901bcdefg"
  }
}
{
  "error": {
    "code": 400,
    "message": "Failed to parse the request body as JSON: trailing comma at line 3 column 1"
  },
  "metadata": {
    "request_id": "72348112-c92d-4610-829a-f769c82a9a0f"
  }
}
{
  "error": {
    "code": 409,
    "message": "Resource already exists"
  },
  "metadata": {
    "request_id": "0efec74c-7d58-4fef-b73b-df50731e4f6b"
  }
}