> ## Documentation Index
> Fetch the complete documentation index at: https://docs.0xarchive.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Hip4OpenInterestRecord Schema

> HIP-4 per-side open-interest record. Includes required fields, field types, schema references, and generated JSON details from the 0xArchive OpenAPI contract.

Source OpenAPI: 0xArchive API 1.5.0; 140 paths; 119 component schemas.

HIP-4 per-side open-interest record. Mirrors the HIP-3 OI shape and adds `outcome_id` and `side`. `oracle_price` is omitted for HIP-4 (outcomes have no oracle feed). Note: `mark_price` is an implied probability in \[0,1], not a USD price; same field name as perps because Hyperliquid upstream uses `markPx` for both.

## Required Fields

| Field           | Type             | Description                                          |
| --------------- | ---------------- | ---------------------------------------------------- |
| `coin`          | string           | `#`-prefixed per-side coin identifier                |
| `open_interest` | string           | Open interest in contracts (notional currency: USDH) |
| `outcome_id`    | integer:int64    | Numeric outcome identifier                           |
| `side`          | integer          | Side index: 0 = Yes, 1 = No                          |
| `symbol`        | string           | Same value as `coin`.                                |
| `timestamp`     | string:date-time | Snapshot timestamp (UTC)                             |

## JSON Schema

```json theme={"theme":"github-dark"}
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "Hip4OpenInterestRecord",
  "description": "HIP-4 per-side open-interest record. Mirrors the HIP-3 OI shape and adds `outcome_id` and `side`. `oracle_price` is omitted for HIP-4 (outcomes have no oracle feed). Note: `mark_price` is an implied probability in [0,1], not a USD price; same field name as perps because Hyperliquid upstream uses `markPx` for both.",
  "type": "object",
  "required": [
    "coin",
    "open_interest",
    "outcome_id",
    "side",
    "symbol",
    "timestamp"
  ],
  "properties": {
    "coin": {
      "description": "`#`-prefixed per-side coin identifier",
      "type": "string",
      "example": "#0"
    },
    "mark_price": {
      "description": "Implied probability in [0,1], NOT a USD price. Same field name as perps because Hyperliquid upstream uses `markPx` for both.",
      "type": "string",
      "nullable": true,
      "example": "0.6502"
    },
    "mid_price": {
      "description": "Mid price (probability in [0,1])",
      "type": "string",
      "nullable": true,
      "example": "0.65038"
    },
    "open_interest": {
      "description": "Open interest in contracts (notional currency: USDH)",
      "type": "string",
      "example": "568048"
    },
    "outcome_id": {
      "description": "Numeric outcome identifier",
      "type": "integer",
      "format": "int64",
      "example": 0
    },
    "side": {
      "description": "Side index: 0 = Yes, 1 = No",
      "type": "integer",
      "enum": [
        0,
        1
      ],
      "example": 0
    },
    "symbol": {
      "description": "Same value as `coin`. Provided for consistency with other venues.",
      "type": "string",
      "example": "#0"
    },
    "timestamp": {
      "description": "Snapshot timestamp (UTC)",
      "type": "string",
      "format": "date-time",
      "example": "2026-05-02T20:27:21Z"
    }
  }
}
```

## Referenced By

Use this shared schema with the generated component index and route-specific endpoint pages during implementation.
