Skip to main content
GET
/
v2
/
polymarket
/
markets
/
{condition_id}
/
open_interest
Get Market Open Interest Time Series
curl --request GET \
  --url https://api.predexon.com/v2/polymarket/markets/{condition_id}/open_interest \
  --header 'x-api-key: <api-key>'
import requests

url = "https://api.predexon.com/v2/polymarket/markets/{condition_id}/open_interest"

headers = {"x-api-key": "<api-key>"}

response = requests.get(url, headers=headers)

print(response.text)
const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};

fetch('https://api.predexon.com/v2/polymarket/markets/{condition_id}/open_interest', options)
  .then(res => res.json())
  .then(res => console.log(res))
  .catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
  CURLOPT_URL => "https://api.predexon.com/v2/polymarket/markets/{condition_id}/open_interest",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_HTTPHEADER => [
    "x-api-key: <api-key>"
  ],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://api.predexon.com/v2/polymarket/markets/{condition_id}/open_interest"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("x-api-key", "<api-key>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.get("https://api.predexon.com/v2/polymarket/markets/{condition_id}/open_interest")
  .header("x-api-key", "<api-key>")
  .asString();
require 'uri'
require 'net/http'

url = URI("https://api.predexon.com/v2/polymarket/markets/{condition_id}/open_interest")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'

response = http.request(request)
puts response.read_body
{
  "condition_id": "<string>",
  "start_time": 123,
  "end_time": 123,
  "open_interest_over_time": [
    {
      "timestamp": 123,
      "open_interest_usd": 123
    }
  ],
  "market_id": "<string>"
}
{
  "error": "<string>",
  "message": "<string>"
}
{
  "detail": [
    {
      "loc": [
        "<string>"
      ],
      "msg": "<string>",
      "type": "<string>"
    }
  ]
}
{
  "error": "<string>",
  "message": "<string>"
}
Fetch historical open interest for a market. Open interest represents total outstanding positions (can increase or decrease, unlike cumulative volume).
Free & Unlimited. This endpoint does not count toward your monthly usage limits on any plan.

Authorizations

x-api-key
string
header
required

Path Parameters

condition_id
string
required

Condition ID for the market

Query Parameters

granularity
enum<string>
default:day

Time granularity

Available options:
day,
week,
month,
year,
all
start_time
integer | null

Unix timestamp (seconds) for start

Required range: x >= 0
end_time
integer | null

Unix timestamp (seconds) for end

Required range: x >= 0

Response

Successful Response

Market open interest time series endpoint response.

condition_id
string
required
granularity
enum<string>
required

PnL granularity enum.

Available options:
day,
week,
month,
year,
all
start_time
integer
required
end_time
integer
required
open_interest_over_time
OpenInterestDataPoint · object[]
required
market_id
string | null

Market ID