# Filtering

Almost every page on TradeStream has filters. Currently we allow for the following types of filtering:

<figure><img src="/files/QpBio7QzoroK5JHF6svY" alt=""><figcaption><p>The filter bar</p></figcaption></figure>

* **Status Filtering (Win or Loss)**
* **Filter by Symbol/Ticker**
* **Filter by Date & Time**
  * You can choose if the filtering should be based on open time or close time
    * Range (all trades within a certain boundary)
    * After (all trades after a certain date and time)
    * Before (all trades before a certain date and time
* **Filter by side (buy=long, short=sell)**
* **Filter by exchange**
* **Filter by holdtime**

***

## Using Filters

<figure><img src="/files/2M0R0uH6yXnytJrPmRAI" alt=""><figcaption><p>Filters go brrrrr</p></figcaption></figure>

You can add however many filters you want. Currently there are two filter types:

* Inclusive (Only show trades **WITH** this attribute i.e: Trades for BTCUSDT)
* Exclusive (Only show trades **WITHOUT** this attribute i.e: Trades not for BTCUSDT)

<figure><img src="/files/NpImjl9pojmpJdkFrQmD" alt=""><figcaption><p>In this example we exclude all trades that are Buys/Longs, so only shorts will be shown</p></figcaption></figure>

{% hint style="info" %}
If you filter by for example tags we use "OR" logic. This means if you search for trades that use the tag "bull" and "big win" you will get trades that have either one of these two tags or both. In the future we will add "AND" logic so that you can filter for trades that have certain combinations of tags or other attributes.
{% endhint %}

***

### Date & Time Filtering

<figure><img src="/files/cSrUsCvHjIKjrPj9KU0L" alt=""><figcaption><p>Date &#x26; Time Filter</p></figcaption></figure>

Like previously mentioned, for date & time filtering you can either decide if the filter should be based on the open or close time of the trade.

Then from there you can choose three modes:

* Before (all trades before a certain date and time
* After (all trades after a certain date and time)
* Range (all trades within a certain boundary)

{% hint style="warning" %}
You need to press ![](/files/6BhY8mP5MY4XmQKWI7rg) after selecting your filter in order to have it set
{% endhint %}

You can either choose filter by pressing one of the presets in the left-side menu or manually select the dates you want to filter by

<figure><img src="/files/fKZZE0Z0i74mfhri75qz" alt=""><figcaption></figcaption></figure>

<br>


---

# 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.tradestream.xyz/general/filtering.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.
