Skip to main content

Open Interest

Open interest for the options/futures associated with a US-listed symbol.

Endpoint

GET /stock/v1/openInterest

Authentication: Standard plan. Requires a valid platform API key (X-Primit-API-Key) tied to an active Standard plan (标准套餐) subscription or above. See Authentication.

Query parameters

NameTypeRequiredDefaultNotes
symbolstringYesUnderlying ticker, e.g. AAPL.
periodstringNo1dAggregation period.
limitintegerNo30Number of data points to return.

Response — 200 OK

{
"symbol": "AAPL",
"openInterest": "1843221",
"time": 1745884800000
}

Errors

HTTPCause
401Missing or invalid X-Primit-API-Key.
403No active Standard plan (subscription expired or never purchased).
404symbol not found.
422Missing symbol.

Example

curl -s "https://api.pipai.org/stock/v1/openInterest?symbol=AAPL" \
-H "X-Primit-API-Key: $PRIMIT_API_KEY"