# settledOutcomesById

Returns metadata and stats for one or more settled prediction market outcomes. Outcomes with missing name, description, or side specs are excluded from the response.

## POST Request

<table><thead><tr><th width="161">Field</th><th width="119">Type</th><th>Description</th></tr></thead><tbody><tr><td><code>type</code></td><td>string</td><td>Must be <code>"settledOutcomesById"</code></td></tr><tr><td><code>outcome_ids</code></td><td>integer[]</td><td>Array of outcome IDs (optional)</td></tr><tr><td><code>asset_ids</code></td><td>string[]</td><td>Array of asset IDs prefixed with <code>#</code>, e.g. <code>"#90"</code> (optional)</td></tr></tbody></table>

At least one of `outcome_ids` or `asset_ids` must be provided and non-empty. Both can be provided in the same request — the results are merged and deduplicated. The combined number of unique IDs must not exceed 50.

{% tabs %}
{% tab title="cURL" %}

```bash
curl -X POST https://api.hydromancer.xyz/info \
  -H "Authorization: Bearer $HYDROMANCER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "type": "settledOutcomesById",
    "outcome_ids": [9],
    "asset_ids": ["#30800"]
  }'
```

{% endtab %}

{% tab title="Python" %}

```python
import requests
import os

response = requests.post(
    'https://api.hydromancer.xyz/info',
    json={
        'type': 'settledOutcomesById',
        'outcome_ids': [9],
        'asset_ids': ['#30800']
    },
    headers={
        'Authorization': f'Bearer {os.environ.get("HYDROMANCER_API_KEY")}',
        'Content-Type': 'application/json'
    }
)

print(response.json())
```

{% endtab %}

{% tab title="Javascript" %}

```javascript
import axios from 'axios';

try {
    const response = await axios.post('https://api.hydromancer.xyz/info', {
        type: 'settledOutcomesById',
        outcome_ids: [9],
        asset_ids: ['#30800']
    }, {
        headers: {
            'Authorization': `Bearer ${process.env.HYDROMANCER_API_KEY}`,
            'Content-Type': 'application/json'
        }
    });

    console.log(response.data);
} catch (error) {
    console.error('Error:', error.message);
}
```

{% endtab %}
{% endtabs %}

***

## Response Fields

Returns an array of settled outcome objects. Each object has the following fields:

| Field            | Type    | Description                                                 |
| ---------------- | ------- | ----------------------------------------------------------- |
| `outcomeId`      | integer | The outcome ID                                              |
| `name`           | string? | Outcome name from register event                            |
| `description`    | string? | Outcome description from register event                     |
| `sideSpecs`      | array?  | Side specifications (e.g. `[{"name":"Yes"},{"name":"No"}]`) |
| `class`          | string? | Outcome class (e.g. `"priceBinary"`)                        |
| `underlying`     | string? | Underlying asset (e.g. `"HYPE"`)                            |
| `expiry`         | string? | Expiry timestamp (e.g. `"20260404-0815"`)                   |
| `targetPrice`    | string? | Target price                                                |
| `period`         | string? | Period (e.g. `"15m"`)                                       |
| `quoteToken`     | string? | Quote token ID                                              |
| `yesAssetId`     | string? | Yes-side asset ID                                           |
| `noAssetId`      | string? | No-side asset ID                                            |
| `settleFraction` | string? | Settle fraction                                             |
| `settlePrice`    | string? | Settlement price                                            |
| `yesStats`       | object? | Market stats for the yes-side asset                         |
| `noStats`        | object? | Market stats for the no-side asset                          |

<details>

<summary>Response</summary>

```json
[
  {
    "outcomeId": 9,
    "name": "Who will win the HL 100 meter dash?",
    "description": "This race is yet to be scheduled.",
    "sideSpecs": [
      { "name": "Hypurr" },
      { "name": "Usain Bolt" }
    ],
    "class": null,
    "underlying": null,
    "expiry": null,
    "targetPrice": null,
    "period": null,
    "quoteToken": "1452",
    "yesAssetId": "#90",
    "noAssetId": "#91",
    "settleFraction": "0",
    "settlePrice": "0.5",
    "yesStats": {
      "coin": "#90",
      "trades": 217,
      "uniqueTraders": 22,
      "volumeNotional": "66028.93986",
      "volumeContracts": "91326.00",
      "lastPrice": "0.95",
      "vwap": 0.72,
      "minPrice": "0.2775",
      "maxPrice": "0.98",
      "avgTradeNotional": 304.28,
      "medianTradeNotional": 68.55,
      "largestTrade": "20047.9929",
      "firstTrade": 1775047830221,
      "lastTrade": 1775289697740
    },
    "noStats": {
      "coin": "#91",
      "trades": 63,
      "uniqueTraders": 12,
      "volumeNotional": "18525.49478",
      "volumeContracts": "67728.00",
      "lastPrice": "0.28375",
      "vwap": 0.27,
      "minPrice": "0.03865",
      "maxPrice": "0.7225",
      "avgTradeNotional": 294.06,
      "medianTradeNotional": 54.28,
      "largestTrade": "1426.2428",
      "firstTrade": 1775047830221,
      "lastTrade": 1775282974739
    }
  }
]
```

</details>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.hydromancer.xyz/readme/rest-api/outcomes/settledoutcomesbyid.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
