# settledOutcomesById - Settled HIP-4 Outcomes by ID

Use `settledOutcomesById` when you already know the outcome ID or encoded asset ID and need the settlement record.

## Endpoints

REST-style Info API:

```text
POST https://api-hyperliquid-index.n.dwellir.com/YOUR_API_KEY/info
```

JSON-RPC:

```text
POST https://api-hyperliquid-index.n.dwellir.com/YOUR_API_KEY/jsonrpc
```

## Billing

`settledOutcomesById` responses are billed by the number of outcome objects returned. Empty arrays are billed as `0` responses/API credits.

## Request Parameters

- `type` (`string, required`): Must be settledOutcomesById for /info REST requests. Omit this field for JSON-RPC.
- `outcome_ids` (`array, optional`): Outcome IDs to fetch. Required unless asset_ids is supplied.
- `asset_ids` (`array, optional`): Outcome asset IDs such as

## Request Example

```bash
curl -X POST "https://api-hyperliquid-index.n.dwellir.com/YOUR_API_KEY/info" \
  -H "content-type: application/json" \
  -d '{
  "type": "settledOutcomesById",
  "outcome_ids": [3],
  "asset_ids": ["#30"]
}'
```

## Response Fields

- `outcomes` (`array, required`): Array of settled outcome objects. Billing counts one response/API credit per outcome object returned.
- `outcomeId` (`number, required`): Outcome ID.
- `settleFraction` (`string, optional`): Settlement fraction as a decimal string.
- `settlePrice` (`string, optional`): Settlement price as a decimal string.
- `yesAssetId` (`string, required`): Encoded Yes asset ID, for example
- `noAssetId` (`string, required`): Encoded No asset ID, for example

## Successful Response

```json
[
  {
    "outcomeId": 3,
    "name": "Recurring",
    "description": "class:priceBinary|underlying:BTC|expiry:20260506-0600|targetPrice:80930|period:1d",
    "class": "priceBinary",
    "underlying": "BTC",
    "expiry": "20260506-0600",
    "targetPrice": "80930",
    "period": "1d",
    "quoteToken": "150",
    "yesAssetId": "#30",
    "noAssetId": "#31",
    "settleFraction": "1",
    "settlePrice": "83500"
  }
]
```

## Error Responses

### Error

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "error": {
    "code": -32602,
    "message": "invalid request"
  }
}
```

## Response

Settled responses include registration metadata plus `settleFraction` and `settlePrice`. REST `/info` responses return an array directly. JSON-RPC responses return the same array under `result`.
