---
title: "Market open interest"
method: GET
path: "/timeseries-stream/market-openinterest"
tags: ["Timeseries stream"]
---

# Market open interest

`GET /timeseries-stream/market-openinterest`

## Request

- Base URL: `wss://api.coinmetrics.io/v4`
- URL: `wss://api.coinmetrics.io/v4/timeseries-stream/market-openinterest`
- Auth: API key in query parameter `api_key`
- TypeScript: <https://skmtc.dev/coinmetrics/apis/coin-metrics-api-v4/docs/timeseries-stream/market-openinterest/get.ts> (a function with typed inputs; its response is checked against the schema)

Returns a WebSocket stream of open interests for specified markets.<br/> If you are falling behind (slow client) you will get `warning` message first, then `error` message and disconnection will happen.

## Query parameters

- `markets` string[], required
- `backfill` 'latest' | 'none'
- `pretty` boolean

## Response `default`

Open Interest WebSocket message.

- StreamingMarketOpenInterest: Market open interest WebSocket message.
  - `market` string, required: Unique name of the market.
  - `time` string, required: The time in ISO 8601 date-time format. Always with nanoseconds precision.
  - `contract_count` string, required: Number of contracts.
  - `value_usd` string, required: Contract value in USD.
  - `exchange_time` string: Time corresponding to open interest data point, according to the exchange. Can be NULL, if exchange doesn't support it.
  - `cm_sequence_id` string, required: The monotonically increasing message number, resets on disconnection.

## Other responses

- `401`: Requested resource requires authorization.
- `403`: Requested resource is not available with supplied credentials.
- `414`: Provided URI is too long. It must not be greater than 10000 symbols.

---

[API](https://skmtc.dev/coinmetrics/apis/coin-metrics-api-v4.md) - [All operations](https://skmtc.dev/coinmetrics/apis/coin-metrics-api-v4/llms.txt) - [OpenAPI document](https://skmtc.dev/coinmetrics/apis/coin-metrics-api-v4/revisions/774268c0a4fe?raw)
