Market open interest (onchain)
curl --request GET \
--url https://api.polynode.dev/v2/onchain/markets/{condition_id}/oiimport requests
url = "https://api.polynode.dev/v2/onchain/markets/{condition_id}/oi"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.polynode.dev/v2/onchain/markets/{condition_id}/oi', 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.polynode.dev/v2/onchain/markets/{condition_id}/oi",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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.polynode.dev/v2/onchain/markets/{condition_id}/oi"
req, _ := http.NewRequest("GET", url, nil)
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.polynode.dev/v2/onchain/markets/{condition_id}/oi")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.polynode.dev/v2/onchain/markets/{condition_id}/oi")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_bodyOnchain V2 (legacy)
Market Open Interest
Onchain open interest for a specific market.
GET
/
v2
/
onchain
/
markets
/
{condition_id}
/
oi
Market open interest (onchain)
curl --request GET \
--url https://api.polynode.dev/v2/onchain/markets/{condition_id}/oiimport requests
url = "https://api.polynode.dev/v2/onchain/markets/{condition_id}/oi"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.polynode.dev/v2/onchain/markets/{condition_id}/oi', 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.polynode.dev/v2/onchain/markets/{condition_id}/oi",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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.polynode.dev/v2/onchain/markets/{condition_id}/oi"
req, _ := http.NewRequest("GET", url, nil)
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.polynode.dev/v2/onchain/markets/{condition_id}/oi")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.polynode.dev/v2/onchain/markets/{condition_id}/oi")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_bodyReturns the current open interest for a specific market, sourced from onchain data. Enriched with market metadata.
Request
GET /v2/onchain/markets/{condition_id}/oi
| Parameter | Type | Location | Description |
|---|---|---|---|
condition_id | string | path | Market condition ID (0x-prefixed, 64 hex chars) |
Response
{
"condition_id": "0x8180fee481707671aa45de84a9c3740ab607f3f2643b456e0380afb02d12cf7d",
"source": "onchain",
"found": true,
"market": "Bitcoin Up or Down - March 28, 10:55AM-11:00AM ET",
"slug": "btc-updown-5m-1774709700",
"image": "https://polymarket-upload.s3.us-east-2.amazonaws.com/BTC+fullsize.png",
"open_interest_usdc": 393.153937
}
| Field | Type | Description |
|---|---|---|
found | boolean | Whether the market was found onchain |
market | string | Market question |
slug | string | Market slug |
image | string | Market image URL |
open_interest_usdc | number | Current open interest in USDC |
Example
curl "https://api.polynode.dev/v2/onchain/markets/0x8180fee481707671aa45de84a9c3740ab607f3f2643b456e0380afb02d12cf7d/oi" \
-H "x-api-key: YOUR_KEY"
Path Parameters
Market condition ID
Response
Open interest
⌘I

