> For the complete documentation index, see [llms.txt](https://docs.hydromancer.xyz/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.hydromancer.xyz/readme/rest-api/outcomes/settledoutcome.md).

# settledOutcome

Returns the settlement spec and result for a single outcome by its outcome index. Returns `null` if the outcome is unknown or not yet settled.

<table><thead><tr><th width="115">Field</th><th width="177">Type</th><th>Description</th></tr></thead><tbody><tr><td><code>type</code></td><td>string</td><td>Must be <code>"settledOutcome"</code></td></tr><tr><td><code>outcome</code></td><td>int</td><td>Outcome index (required)</td></tr></tbody></table>

## Request

{% 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": "settledOutcome",
    "outcome": 0
  }'
```

{% endtab %}

{% tab title="Python" %}

```python
import requests
import os
import json

response = requests.post(
    'https://api.hydromancer.xyz/info',
    json={
        'type': 'settledOutcome',
        'outcome': 0
    },
    headers={
        'Authorization': f'Bearer {os.environ["HYDROMANCER_API_KEY"]}',
        'Content-Type': 'application/json'
    }
)
print(json.dumps(response.json(), indent=2))
```

{% endtab %}

{% tab title="Javascript" %}

```javascript
import axios from 'axios';

const response = await axios.post(
  'https://api.hydromancer.xyz/info',
  {
    type: 'settledOutcome',
    outcome: 0
  },
  {
    headers: {
      'Authorization': `Bearer ${process.env.HYDROMANCER_API_KEY}`,
      'Content-Type': 'application/json'
    }
  }
);

console.log(JSON.stringify(response.data, null, 2));
```

{% endtab %}
{% endtabs %}

***

## Response Fields

Returns `null` if the outcome is unknown or not yet settled.

| Field              | Type   | Description                                                                                                           |
| ------------------ | ------ | --------------------------------------------------------------------------------------------------------------------- |
| `spec.outcome`     | int    | Outcome index                                                                                                         |
| `spec.name`        | string | Outcome name                                                                                                          |
| `spec.description` | string | Encoded outcome spec (e.g. `"class:priceBinary\|underlying:BTC\|expiry:20260503-0600\|targetPrice:78213\|period:1d"`) |
| `spec.sideSpecs`   | array  | List of `{ name }` objects, one per side (e.g. `Yes`/`No`)                                                            |
| `spec.quoteToken`  | string | Quote token for the outcome market                                                                                    |
| `settleFraction`   | string | Settlement fraction for the winning side                                                                              |
| `details`          | string | Settlement details (e.g. `"price:78212.4"`)                                                                           |

<details>

<summary>Response</summary>

```json
{
  "spec": {
    "outcome": 0,
    "name": "Recurring",
    "description": "class:priceBinary|underlying:BTC|expiry:20260503-0600|targetPrice:78213|period:1d",
    "sideSpecs": [
      { "name": "Yes" },
      { "name": "No" }
    ],
    "quoteToken": "USDH"
  },
  "settleFraction": "0.0",
  "details": "price:78212.4"
}
```

</details>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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/settledoutcome.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.
