Skip to main content
client.data.misc.getOpenInterest returns open interest metrics for one or more markets. When no filter is supplied, the API also includes a GLOBAL aggregate.

Request

const entries = await client.data.misc.getOpenInterest(params);

Parameters

NameTypeRequiredNotes
marketstring[]Optional condition IDs (0x + 64 hex).

Response

type OpenInterest = {
  market: string; // condition ID or "GLOBAL"
  value: number;
};

Usage example

const entries = await client.data.misc.getOpenInterest({
  market: ["0x49252732f0bfe99f2ab09366230607eb9562fa6a56557a10ddcd7dd2198cf588"],
});

entries.forEach((entry) => {
  console.log(`${entry.market}: ${entry.value}`);
});

Failure modes

  • Condition IDs must be 0x-prefixed 64-hex strings; invalid ones trigger validation errors.