Skip to main content

Trader Long/Short Ratio

Top-trader (large-account) long/short positioning ratio for a stock symbol.

Endpoint

GET /stock/v1/topLongShortRatio

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

Response — 200 OK

[
{
"symbol": "AAPL",
"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/stock/v1/topLongShortRatio?symbol=AAPL&period=1d&limit=30" \
-H "X-Primit-API-Key: $PRIMIT_API_KEY"