# Resolution

Check market resolution status and oracle assertion details.

## Get Resolution Status

Returns the resolution status for a market, including any active UMA oracle assertion.

```
GET /api/v1/resolution/{marketId}
```

### Path Parameters

| Parameter  | Type    | Description       |
| ---------- | ------- | ----------------- |
| `marketId` | bytes32 | Market identifier |

### Response (Unresolved, No Assertion)

```json
{
  "marketId": "0x1234...abcd",
  "expired": false,
  "resolved": false
}
```

### Response (Assertion Active)

```json
{
  "marketId": "0x1234...abcd",
  "expired": true,
  "resolved": false,
  "assertion": {
    "id": "0xAssertionId...",
    "proposer": "0xProposerAddress...",
    "proposedOutcome": true,
    "bondAmount": "5000000",
    "assertionTime": 1735689000,
    "expirationTime": 1735696200,
    "settled": false,
    "settlementResolution": false,
    "disputed": false
  }
}
```

### Response (Resolved)

```json
{
  "marketId": "0x1234...abcd",
  "expired": true,
  "resolved": true,
  "winningOutcome": 0
}
```

### Fields

| Field            | Type   | Description                                              |
| ---------------- | ------ | -------------------------------------------------------- |
| `marketId`       | string | Market identifier                                        |
| `expired`        | bool   | Whether the market expiration time has passed            |
| `resolved`       | bool   | Whether the market has been settled                      |
| `winningOutcome` | int    | `0` = YES won, `1` = NO won (only present when resolved) |

### Assertion Fields

| Field                  | Type   | Description                                            |
| ---------------------- | ------ | ------------------------------------------------------ |
| `id`                   | string | UMA assertion identifier                               |
| `proposer`             | string | Address that proposed the resolution                   |
| `proposedOutcome`      | bool   | `true` = YES, `false` = NO                             |
| `bondAmount`           | string | UMA bond amount in USDC                                |
| `assertionTime`        | int64  | When the assertion was made                            |
| `expirationTime`       | int64  | When the dispute window ends (2 hours after assertion) |
| `settled`              | bool   | Whether the assertion has been settled                 |
| `settlementResolution` | bool   | Final resolution after settlement                      |
| `disputed`             | bool   | Whether the assertion was disputed                     |

### Resolution Flow

{% stepper %}
{% step %}

### Market expires

The market expiration time passes (`expired: true`).
{% endstep %}

{% step %}

### Proposer submits assertion

A proposer submits a resolution assertion with a UMA bond (`assertion` present).
{% endstep %}

{% step %}

### Dispute window opens

A 2-hour dispute window opens (`expirationTime` set).
{% endstep %}

{% step %}

### Undisputed: assertion settles

If undisputed, assertion settles and market resolves (`resolved: true`, `winningOutcome` set).
{% endstep %}

{% step %}

### Disputed: UMA arbitrates

If disputed, UMA oracle arbitrates the outcome.
{% endstep %}
{% endstepper %}
