# Like/Dislike feature

Tree Terminal allows users to interact with news headlines by sending likes or dislikes. This feature not only helps prioritize important news but also contributes to the community by surfacing valuable insights.

{% hint style="info" %}
This feature is directly setup on the website <https://news.treeofalpha.com/>
{% endhint %}

<figure><img src="/files/6pkLvhlyXXUGnD7vtPWl" alt=""><figcaption></figcaption></figure>

## **How It Works**

1. **Liking News**:
   * Users can upvote a piece of news they find important or actionable.
   * **First Upvote**:
     * Pings all Discord users subscribed to the feed.
   * **High-Engagement News**:
     * If a headline receives enough votes, it will be pushed to the public Twitter account: [News of Alpha](https://twitter.com/News_Of_Alpha).
2. **Disliking News**:
   * Dislikes help filter out irrelevant or misleading news from the feed.

## **Guidelines**

* Only upvote news if you are confident in its relevance and value to the community.
* Misuse of the feature (e.g., spamming likes or dislikes) may result in the loss of privileges.

## **API Endpoints**

You can interact with this feature programmatically using your unique **API Key** and the **\_id** of the[ news item.](/websockets/response.md)

1. **Get Like/Dislike History**:
   * **Endpoint**:

     ```bash
     GET /api/mylikes?api_key=yourApiKey
     ```
   * **Purpose**: Retrieve your like/dislike history.
2. **Like a News Item**:
   * **Endpoint**:

     ```bash
     POST /api/like?id=newsId&api_key=yourApiKey
     ```
   * **Purpose**: Add a like to the specified news item.
3. **Dislike a News Item**:
   * **Endpoint**:

     ```bash
     POST /api/dislike?id=newsId&api_key=yourApiKey
     ```
   * **Purpose**: Add a dislike to the specified news item.
4. **Remove a Like/Dislike**:
   * **Endpoint**:

     ```bash
     POST /api/unlike?id=newsId&api_key=yourApiKey
     ```
   * **Purpose**: Remove your like or dislike from a specific news item.
5. **Stream Live Likes/Dislikes**:
   * **WebSocket Endpoint**:

     ```bash
     WS /ws/likes
     ```
   * **Purpose**: Stream live updates of likes/dislikes directly to your terminal UI.

## **Why Use This Feature?**

* **Community-Driven Insights**: Highlight important news for the community.
* **Real-Time Feedback**: Help the platform improve by flagging irrelevant or low-quality news.
* **Streamlined Notifications**: Ensure valuable news reaches platforms like Discord and Twitter for broader visibility.

By using this feature responsibly, you contribute to a more efficient and effective news trading environment.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.treeofalpha.com/websockets/like-dislike-feature.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
