Skip to main content

Retail Long/Short Ratio

Retail (all-account, equal-weight) long/short positioning ratio for a index symbol.

Endpoint

GET /index/v1/retailLongShortRatio

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
symbolstringYese.g. SPY.
periodstringNo1dOne of 1h, 4h, 1d, 1w.
limitintegerNo30Number of data points to return.

Response — 200 OK

[
{
"symbol": "SPY",
"longShortRatio": "1.18",
"longAccount": "0.5413",
"shortAccount": "0.4587",
"timestamp": 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/index/v1/retailLongShortRatio?symbol=SPY&period=1d&limit=30" \
-H "X-Primit-API-Key: $PRIMIT_API_KEY"