# Outcome Detail

**Tier:** Dev

`GET /hip4-analytics/outcome/{outcome_id}`

Scoped dashboard bundle for one HIP-4 outcome market — nested summary metrics, per-coin breakdowns, trading timeseries, settlement data, and stacked chart data specific to that outcome.

---

## Authentication

Requires Dev tier or higher.

## Path parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `outcome_id` | integer | Yes | Outcome market ID. Must be a non-negative integer. |

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `range` | string | No | `4h`, `1d`, `7d`, `30d`, or `all`. Defaults to `1d`. Legacy `period` remains supported as a compatibility alias. |

## Example request

```bash
curl -H "X-Api-Key: lk_live_your_key_here" \
  "https://api.loris.tools/hip4-analytics/outcome/1?range=7d"
```

## Count semantics

The `summary`, `by_coin`, and trading `timeseries` objects use these definitions:

| Field | Meaning |
|------|---------|
| `trade_count` | Atomic matched executions, identified by one crossed Buy/Sell participant per match. |
| `protocol_trade_count` | Distinct outcome-leg records, deduplicated by `(block_number, coin, tid)`. |
| `orderbook_fill_count` | Raw Buy/Sell rows. |
| `fill_count` | All raw non-settlement rows, including Buy/Sell rows and manual Split/Merge lifecycle rows. |

`trade_mechanics` contains `standard`, `split`, `merge`, and `other`. Every entry reports `trade_count`, `protocol_trade_count`, `fill_count`, `volume`, and `total_fees`. The labels classify observed Buy+Sell, Buy-only, Sell-only, and other execution shapes; they do not claim an officially documented cross-outcome matching design.

`lifecycle_mechanics` reports explicit manual operations separately: `split` and `merge` each contain `operation_count` and `fill_count`, while `other_fill_count` covers other non-settlement lifecycle rows.

## Example response

```json
{
  "success": true,
  "outcome_id": 1,
  "range": "7d",
  "period": "1w",
  "computed_through_ms": 1788221100000,
  "summary": {
    "volume": 8400000,
    "fill_count": 5840,
    "orderbook_fill_count": 5680,
    "trade_count": 2840,
    "protocol_trade_count": 4120,
    "unique_traders": 420,
    "total_fees": 4200,
    "liquidation_count": 0,
    "total_priority_gas": 0,
    "priority_gas_usdc": 0,
    "priority_gas_usdh": 0,
    "trade_mechanics": {
      "standard": { "trade_count": 1560, "protocol_trade_count": 1560, "fill_count": 3120, "volume": 4700000, "total_fees": 2350 },
      "split": { "trade_count": 720, "protocol_trade_count": 1440, "fill_count": 1440, "volume": 2100000, "total_fees": 1050 },
      "merge": { "trade_count": 560, "protocol_trade_count": 1120, "fill_count": 1120, "volume": 1600000, "total_fees": 800 },
      "other": { "trade_count": 0, "protocol_trade_count": 0, "fill_count": 0, "volume": 0, "total_fees": 0 }
    },
    "lifecycle_mechanics": {
      "split": { "operation_count": 45, "fill_count": 90 },
      "merge": { "operation_count": 35, "fill_count": 70 },
      "other_fill_count": 0
    }
  },
  "by_coin": [
    { "coin": "#10", "encoding": 10, "outcome_id": 1, "outcome_side": 0, "volume": 4400000, "trade_count": 1480, "protocol_trade_count": 2060, "orderbook_fill_count": 2960, "fill_count": 3040 }
  ],
  "timeseries": [
    { "date": "2026-06-01", "volume": 1200000, "trade_count": 410, "protocol_trade_count": 590, "orderbook_fill_count": 820, "fill_count": 846 },
    { "date": "2026-06-02", "volume": 1400000, "trade_count": 480, "protocol_trade_count": 690, "orderbook_fill_count": 960, "fill_count": 982 }
  ],
  "settlement": { "volume": 620000, "fill_count": 310, "trade_count": 0, "unique_traders": 240, "total_fees": 0 },
  "settlement_timeseries": []
}
```

Entries in `by_coin` and trading `timeseries` also include the full `trade_mechanics` and `lifecycle_mechanics` objects. A manual lifecycle operation is counted for every outcome leg it touches in `by_coin`, so `lifecycle_mechanics.*.operation_count` is not additive across coins. The payload additionally returns `timeseries_stacked*` and `settlement_timeseries_stacked*` fields for chart rendering; `timeseries_stacked_by_metric.protocol_trade_count` contains the outcome-side trade series.

## Errors

- `400` — `outcome_id` must be a non-negative integer.

## Related

- [Dashboard](/docs/api/hip4-analytics/dashboard)
- [Trader Leaderboard](/docs/api/hip4-analytics/leaderboard)
- [EOD OI](/docs/api/hip4-analytics/oi-eod)
