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
| Name | Type | Required | Default | Notes |
|---|---|---|---|---|
symbol | string | Yes | — | Underlying ticker, e.g. AAPL. |
period | string | No | 1d | Aggregation period. |
limit | integer | No | 30 | Number of data points to return. |
Response — 200 OK
{
"symbol": "AAPL",
"openInterest": "1843221",
"time": 1745884800000
}
Errors
| HTTP | Cause |
|---|---|
401 | Missing or invalid X-Primit-API-Key. |
403 | No active Standard plan (subscription expired or never purchased). |
404 | symbol not found. |
422 | Missing symbol. |
Example
curl -s "https://api.pipai.org/stock/v1/openInterest?symbol=AAPL" \
-H "X-Primit-API-Key: $PRIMIT_API_KEY"