> ## Documentation Index
> Fetch the complete documentation index at: https://docs.hyperoru.com/llms.txt
> Use this file to discover all available pages before exploring further.

# News Intelligence

> AI-powered news collection, classification, and trading integration

The news intelligence system collects cryptocurrency news from multiple sources, classifies sentiment using AI, and integrates insights into trading strategies.

## News collection

Hyperoru aggregates news from multiple sources on a configurable schedule:

| Source          | Type                    | Coverage                                   |
| --------------- | ----------------------- | ------------------------------------------ |
| **CryptoPanic** | News aggregator         | Broad crypto news, social media signals    |
| **Finnhub**     | Financial data provider | Market news, company events, economic data |
| **RSS Feeds**   | Custom sources          | User-configured feeds for niche coverage   |

<Steps>
  <Step title="Configure news sources">
    Enable and configure each news source through the API:

    ```bash theme={null}
    curl -X POST https://api.production.hyperoru.com/api/news/sources \
      -H "Authorization: Bearer $TOKEN" \
      -H "Content-Type: application/json" \
      -d '{
        "provider": "cryptopanic",
        "api_key": "your-cryptopanic-key",
        "enabled": true,
        "fetch_interval_minutes": 5
      }'
    ```
  </Step>

  <Step title="Add custom RSS feeds">
    ```bash theme={null}
    curl -X POST https://api.production.hyperoru.com/api/news/sources \
      -H "Authorization: Bearer $TOKEN" \
      -H "Content-Type: application/json" \
      -d '{
        "provider": "rss",
        "url": "https://blog.example.com/crypto/rss.xml",
        "name": "Example Crypto Blog",
        "enabled": true,
        "fetch_interval_minutes": 15
      }'
    ```
  </Step>

  <Step title="Verify collection">
    ```bash theme={null}
    curl "https://api.production.hyperoru.com/api/news?limit=10" \
      -H "Authorization: Bearer $TOKEN"
    ```
  </Step>
</Steps>

## AI classification

Each collected article is automatically classified by an LLM for sentiment and relevance:

| Field          | Values                          | Description                               |
| -------------- | ------------------------------- | ----------------------------------------- |
| **Sentiment**  | `bullish`, `bearish`, `neutral` | Overall market sentiment                  |
| **Confidence** | `0.0` – `1.0`                   | Model confidence in the classification    |
| **Relevance**  | `high`, `medium`, `low`         | Relevance to active trading symbols       |
| **Symbols**    | List of tickers                 | Specific symbols mentioned in the article |
| **Summary**    | Text                            | AI-generated one-sentence summary         |

```json theme={null}
{
  "title": "Bitcoin ETF Inflows Hit Record $2B in Single Day",
  "source": "cryptopanic",
  "sentiment": "bullish",
  "confidence": 0.92,
  "relevance": "high",
  "symbols": ["BTC"],
  "summary": "Record institutional inflows into Bitcoin spot ETFs signal strong demand.",
  "published_at": "2025-07-15T10:00:00Z"
}
```

<Tip>
  News classification uses the platform's shared classification model. The result is automatically attached to every article so your strategies can filter on sentiment and relevance without doing the work themselves.
</Tip>

## Integration with trading strategies

News data flows into prompt strategies through the `{news_context}` template variable:

```
Recent news for your watchlist symbols:

1. [BULLISH - 0.92] Bitcoin ETF Inflows Hit Record $2B in Single Day
   Symbols: BTC | Source: CryptoPanic | 2h ago

2. [BEARISH - 0.78] SEC Delays Ethereum Futures ETF Decision
   Symbols: ETH | Source: Finnhub | 4h ago

3. [NEUTRAL - 0.65] Solana DEX Volume Surpasses Ethereum for Third Week
   Symbols: SOL, ETH | Source: RSS | 6h ago
```

This gives the LLM awareness of recent events when making trading decisions, enabling news-driven strategies.

### Filtering news by symbol

```bash theme={null}
curl "https://api.production.hyperoru.com/api/news?symbol=BTC&sentiment=bullish&limit=20" \
  -H "Authorization: Bearer $TOKEN"
```

### Filtering by time range

```bash theme={null}
curl "https://api.production.hyperoru.com/api/news?from=2025-07-14T00:00:00Z&to=2025-07-15T00:00:00Z" \
  -H "Authorization: Bearer $TOKEN"
```

## Source management

<CardGroup cols={2}>
  <Card title="Enable/disable sources" icon="toggle-on">
    Toggle individual sources without removing their configuration.
  </Card>

  <Card title="Adjust fetch frequency" icon="clock">
    Set per-source fetch intervals from 1 minute to 24 hours.
  </Card>

  <Card title="Filter by relevance" icon="filter">
    Configure minimum relevance thresholds to reduce noise.
  </Card>

  <Card title="Symbol mapping" icon="link">
    Map source-specific ticker formats to Hyperoru's standard symbol names.
  </Card>
</CardGroup>

```bash theme={null}
curl -X PUT https://api.production.hyperoru.com/api/news/sources/{source_id} \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "enabled": true,
    "fetch_interval_minutes": 10,
    "min_relevance": "medium"
  }'
```

<Warning>
  News API providers typically have rate limits. Set fetch intervals that respect your plan's limits. CryptoPanic free tier allows 5 requests per minute.
</Warning>
