# settledOutcomesByTime - Settled HIP-4 Outcomes by Time

Use `settledOutcomesByTime` to backfill HIP-4 settlements by settlement event time.

## 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

`settledOutcomesByTime` 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 settledOutcomesByTime for /info REST requests. Omit this field for JSON-RPC.
- `name` (`string, optional`): Optional exact outcome name filter.
- `class` (`string, optional`): Optional class filter, for example priceBinary.
- `underlying` (`string, optional`): Optional underlying asset filter, for example BTC.
- `period` (`string, optional`): Optional recurrence filter, for example 1d.
- `startTime` (`number, optional`): Inclusive settlement timestamp in Unix milliseconds. Required unless cursor is supplied.
- `endTime` (`number, optional`): Exclusive settlement timestamp in Unix milliseconds.
- `cursor` (`string, optional`): Pagination cursor in time_outcomeId format.
- `limit` (`number, optional`): Maximum rows to return, capped at 50.

## Request Example

```bash
curl -X POST "https://api-hyperliquid-index.n.dwellir.com/YOUR_API_KEY/info" \
  -H "content-type: application/json" \
  -d '{
  "type": "settledOutcomesByTime",
  "underlying": "BTC",
  "startTime": 1772604000000,
  "endTime": 1772690400000,
  "limit": 50
}'
```

## 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`.
