# Open Interest (/scripting-v2/data-types/oi)



| Key                | Type             | Meaning                                   |
| ------------------ | ---------------- | ----------------------------------------- |
| `t`                | integer          | Unix timestamp in milliseconds.           |
| `value`            | number           | Current normalized OI value.              |
| `o`, `h`, `l`, `c` | number           | Period OHLC or normalized snapshot value. |
| `n`                | integer          | Sample count.                             |
| `mark_price`       | number, optional | Current mark price.                       |
| `notional`         | number, optional | Current OI notional.                      |

```python
current = history.source("btc@oi@binancef@mmt:timeframe=60", 0)
previous = history.source("btc@oi@binancef@mmt:timeframe=60", 1)

if current is not None and previous is not None:
    change = current["value"] - previous["value"]
```

Open interest is available only for futures markets. See [Open Interest Source](/scripting-v2/sources/oi).
