# Signal Filtering

Signal Filtering allows you to automatically filter incoming trading signals based on specific criteria before your strategy executes. You define rules that determine which tokens are worth trading.

When a token signal arrives from your data sources (Telegram channels, Discord servers etc), Tradecraft evaluates it against your filtering rules. Only tokens that pass all criteria will trigger your trading strategy.

<figure><img src="https://3175477167-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FYCh2t4HDhRRiAIqY93vK%2Fuploads%2FUj72uuZOQwdpzMZZfRFa%2Fimage.png?alt=media&#x26;token=3237a721-f96d-4965-921d-e12decfa9bec" alt="" width="563"><figcaption><p>Filter that accept tokens that have a Market Cap below $100,000 and were created in the past 15 minutes.</p></figcaption></figure>

### How It Works

Signal filtering uses **AND logic** - all active criteria must be satisfied for a token to pass:

```
Token passes filtering = Criterion 1 AND Criterion 2 AND Criterion 3
```

If any criterion fails, the token is rejected and your strategy won't execute for that signal.

### Available Filter Criteria

#### Token Metrics

**Market Cap**

* Filter tokens based on their market capitalization in USD
* Useful for avoiding tokens that are too small or too large
* Example: `Market Cap > $100,000`

**Token Age**

* Filter by how long ago the token was created (in minutes)
* Ideal for targeting new tokens or avoiding brand new launches
* Example: `Token Age < 120` (less than 2 hours old)

**Token Address**

* Filter for a specific Solana token contract address (exact match)
* Useful when you want to trade only one specific token
* Example: `Token Address = EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v`

#### Live Stream Detection

**Live Streaming** (Pump.fun only)

* Boolean filter to check if a pump.fun live stream is currently active
* Useful for capitalizing on live stream momentum
* Example: `Live Streaming = True`

**Viewers** (Pump.fun only)

* Filter by the number of live stream viewers on pump.fun
* Indicates current interest and engagement
* Example: `Viewers > 100`

#### Signal Source Filtering

**From User**

* Filter tokens based on which Telegram or Discord user posted the signal
* Only accept signals from trusted sources
* Supports filtering by:
  * User ID (numeric)
  * Username (text)
  * Display name (text, partial match)
* Example: Only execute trades for tokens posted by specific alpha callers
