# outcomeFills - HIP-4 Outcome Fill History

Use `outcomeFills` for recent fills across all HIP-4 outcome coins, one `outcomeId`, or one encoded asset such as `#30`.

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

`outcomeFills` responses are billed by the number of fill objects returned, not as one response per HTTP request.
A response with `2,000` fills counts as `2,000` responses/API credits.

Requests that return an empty array are billed as `0` responses/API credits and do not count against usage. Error responses are not charged.

## Request Parameters

- `type` (`string, required`): Must be outcomeFills for /info REST requests. Omit this field for JSON-RPC.
- `coin` (`string, optional`): Exact outcome coin, such as
- `outcomeId` (`number, optional`): Outcome ID. When supplied without side, returns both Yes and No side fills.
- `side` (`string, optional`): Outcome side, one of yes, no, 0, or 1. Requires outcomeId.
- `limit` (`number, optional`): Maximum rows to return, capped at 2000.

## Request Example

```bash
curl -X POST "https://api-hyperliquid-index.n.dwellir.com/YOUR_API_KEY/info" \
  -H "content-type: application/json" \
  -d '{
  "type": "outcomeFills",
  "outcomeId": 3,
  "side": "yes",
  "limit": 100
}'
```

## Response Fields

- `fills` (`array, required`): Array of fill objects. /info returns this array directly; JSON-RPC returns it under result. Billing counts one response/API credit per fill object returned.
- `user` (`string, required`): User address that produced the fill.
- `coin` (`string, required`): Outcome coin, for example
- `px` (`string, required`): Execution price as a decimal string.
- `sz` (`string, required`): Fill size as a decimal string.
- `side` (`string, required`): B for bid/buy side, A for ask/sell side.
- `time` (`number, required`): Fill timestamp in Unix milliseconds.
- `txIndex` (`number, optional`): Block-local fill event index from node_fills_by_block.

## Successful Response

```json
[
  {
    "user": "0x1111111111111111111111111111111111111111",
    "coin": "#30",
    "px": "0.72",
    "sz": "10",
    "side": "B",
    "time": 1772604210000,
    "hash": "0xe7822040155eaa2e737e042854342401120052bbf063906ce8c8f3babe853a79",
    "oid": 121670079265,
    "crossed": true,
    "fee": "0.001",
    "feeToken": "USDC",
    "txIndex": 7
  }
]
```

## Error Responses

### Error

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

## Response

REST `/info` responses return an array directly. JSON-RPC responses return the same array under `result`. Empty matches return `[]`; they are not errors.
