Skip to content
Get started

Delete Watchlist

client.V1.Watchlist.DeleteWatchlist(ctx, watchlistID) (*V1WatchlistDeleteWatchlistResponse, error)
DELETE/v1/watchlists/{watchlist_id}

Delete a watchlist and all its items

ParametersExpand Collapse
watchlistID string
ReturnsExpand Collapse
type V1WatchlistDeleteWatchlistResponse interface{…}

Delete Watchlist

package main

import (
  "context"
  "fmt"

  "github.com/clear-street/clear-street-go"
  "github.com/clear-street/clear-street-go/option"
)

func main() {
  client := clearstreet.NewClient(
    option.WithAPIKey("My API Key"),
  )
  response, err := client.V1.Watchlist.DeleteWatchlist(context.TODO(), "550e8400-e29b-41d4-a716-446655440000")
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", response)
}
{
  "data": null,
  "metadata": {
    "request_id": "cb824f1b-ea6e-4045-8169-9503be2b24d7"
  }
}
{
  "error": {
    "code": 404,
    "message": "Some requested entity was not found"
  },
  "metadata": {
    "request_id": "b8e5824d-391f-448c-a183-9d1582170a1c"
  }
}
Returns Examples
{
  "data": null,
  "metadata": {
    "request_id": "cb824f1b-ea6e-4045-8169-9503be2b24d7"
  }
}
{
  "error": {
    "code": 404,
    "message": "Some requested entity was not found"
  },
  "metadata": {
    "request_id": "b8e5824d-391f-448c-a183-9d1582170a1c"
  }
}