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

# Source Analytics

> Source signal quality and reliability endpoints

## List Source Scores

<ParamField path="GET" method="/api/analytics/source-scores">
  Get signal quality scores for news and data sources.
</ParamField>

### Query Parameters

<ParamField query="limit" type="number" default="50">
  Maximum results (max: 200)
</ParamField>

### Response

```json theme={null}
{
  "success": true,
  "data": [
    {
      "sourceAuthor": "Adam Schefter",
      "source": "ESPN",
      "totalEvents": 250,
      "eventsWithWindows": 200,
      "metrics": {
        "hitRate": 0.82,
        "speedAlpha": 0.90,
        "directionalAccuracy": 0.78,
        "rumorConversionRate": 0.65,
        "persistenceScore": 0.88,
        "reversalRate": 0.05
      },
      "overallSignalScore": 0.85,
      "currentRegime": "reliable",
      "categories": ["sports", "nfl"],
      "computedAt": "2025-01-28T10:00:00Z"
    }
  ]
}
```

<CodeGroup>
  ```bash cURL theme={null}
  curl "https://api.marketmotion.xyz/api/analytics/source-scores?limit=20"
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch(
    'https://api.marketmotion.xyz/api/analytics/source-scores?limit=20'
  );
  const { data } = await response.json();

  // Sort by signal score
  const ranked = data.sort((a, b) => b.overallSignalScore - a.overallSignalScore);
  ```
</CodeGroup>

***

## Get Source Detail

<ParamField path="GET" method="/api/analytics/source-scores/:author">
  Get detailed analytics for a specific source author, including Markov transitions and recent events.
</ParamField>

### Path Parameters

<ParamField path="author" type="string" required>
  Source author name (URL-encoded if needed)
</ParamField>

### Response

```json theme={null}
{
  "success": true,
  "data": {
    "score": {
      "sourceAuthor": "Adam Schefter",
      "overallSignalScore": 0.85,
      "metrics": { ... }
    },
    "markovTransitions": {
      "rumor_to_confirmed": 0.65,
      "confirmed_to_reversed": 0.05,
      "rumor_to_denied": 0.15
    },
    "recentEvents": [
      {
        "title": "Mahomes injury update",
        "happenedAt": "2025-01-28T10:00:00Z",
        "outcome": "confirmed"
      }
    ]
  }
}
```

<CodeGroup>
  ```bash cURL theme={null}
  curl "https://api.marketmotion.xyz/api/analytics/source-scores/Adam%20Schefter"
  ```
</CodeGroup>

***

## Predict Source

<ParamField path="GET" method="/api/analytics/source-scores/:author/predict">
  Predict the reliability of a source author's next report, optionally filtered by category.
</ParamField>

### Path Parameters

<ParamField path="author" type="string" required>
  Source author name
</ParamField>

### Query Parameters

<ParamField query="category" type="string">
  Category to predict for (e.g., `sports`, `politics`)
</ParamField>

### Response

```json theme={null}
{
  "success": true,
  "data": {
    "sourceAuthor": "Adam Schefter",
    "predictedReliability": 0.85,
    "confidence": 0.90,
    "basedOn": 250,
    "category": "sports"
  }
}
```

<CodeGroup>
  ```bash cURL theme={null}
  curl "https://api.marketmotion.xyz/api/analytics/source-scores/Adam%20Schefter/predict?category=sports"
  ```
</CodeGroup>
