Skip to content
Get started

Delete Watchlist

JsonValue v1().watchlist().deleteWatchlist(WatchlistDeleteWatchlistParamsparams = WatchlistDeleteWatchlistParams.none(), RequestOptionsrequestOptions = RequestOptions.none())
DELETE/v1/watchlists/{watchlist_id}

Delete a watchlist and all its items

ParametersExpand Collapse
WatchlistDeleteWatchlistParams params
Optional<String> watchlistId
ReturnsExpand Collapse
class WatchlistDeleteWatchlistResponse:

Delete Watchlist

package com.clear_street.api.example;

import com.clear_street.api.client.ClearStreetClient;
import com.clear_street.api.client.okhttp.ClearStreetOkHttpClient;
import com.clear_street.api.models.v1.watchlist.WatchlistDeleteWatchlistParams;
import com.clear_street.api.models.v1.watchlist.WatchlistDeleteWatchlistResponse;

public final class Main {
    private Main() {}

    public static void main(String[] args) {
        ClearStreetClient client = ClearStreetOkHttpClient.builder()
            .fromEnv()
            .apiKey("My API Key")
            .build();

        WatchlistDeleteWatchlistResponse response = client.v1().watchlist().deleteWatchlist("550e8400-e29b-41d4-a716-446655440000");
    }
}
{
  "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"
  }
}