Whale Long/Short Ratio
Whale (smart-money) long/short positioning ratio for a commodity symbol.
Endpoint
GET /commodity/v1/whaleLongShortRatio
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 | — | e.g. XAU. |
period | string | No | 1d | One of 1h, 4h, 1d, 1w. |
limit | integer | No | 30 | Number of data points to return. |
Response — 200 OK
[
{
"symbol": "XAU",
"longShortRatio": "1.18",
"longAccount": "0.5413",
"shortAccount": "0.4587",
"timestamp": 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/commodity/v1/whaleLongShortRatio?symbol=XAU&period=1d&limit=30" \
-H "X-Primit-API-Key: $PRIMIT_API_KEY"