Skip to content
Get started

Delete Watchlist Item

client.V1.Watchlist.DeleteWatchlistItem(ctx, itemID, body) (*V1WatchlistDeleteWatchlistItemResponse, error)
DELETE/v1/watchlists/{watchlist_id}/items/{item_id}

Delete an instrument from a watchlist

ParametersExpand Collapse
itemID string
body V1WatchlistDeleteWatchlistItemParams
WatchlistID param.Field[string]

Watchlist ID

formatuuid
ReturnsExpand Collapse
type V1WatchlistDeleteWatchlistItemResponse interface{…}

Delete Watchlist Item

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.DeleteWatchlistItem(
    context.TODO(),
    "660e8400-e29b-41d4-a716-446655440001",
    clearstreet.V1WatchlistDeleteWatchlistItemParams{
      WatchlistID: "550e8400-e29b-41d4-a716-446655440000",
    },
  )
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", response)
}
{
  "data": null,
  "metadata": {
    "request_id": "5b0709e3-5868-4116-9a84-26f1b8c30503"
  }
}
{
  "error": {
    "code": 404,
    "message": "Some requested entity was not found"
  },
  "metadata": {
    "request_id": "8462e079-739c-421b-b2d2-35cf007b4fc7"
  }
}
Returns Examples
{
  "data": null,
  "metadata": {
    "request_id": "5b0709e3-5868-4116-9a84-26f1b8c30503"
  }
}
{
  "error": {
    "code": 404,
    "message": "Some requested entity was not found"
  },
  "metadata": {
    "request_id": "8462e079-739c-421b-b2d2-35cf007b4fc7"
  }
}