Quota API
Check your rate limits and how much of them you have used.
Endpoint
GET /public/portfolio-analysis/quotacurl https://api.sharegain.com/public/portfolio-analysis/quota \
-H "X-SG-Authorization: your-api-key"Response
{
"requestsPerMinute": {
"current": 1,
"max": 6
},
"requestsPerDay": {
"current": 12,
"max": 50
},
"requestItemsPerDay": {
"current": 2400,
"max": 50000
}
}| Field | Description |
|---|---|
requestsPerMinute | Requests in the last 60 seconds (rolling window). Counts Portfolio Analysis and Hot Stocks calls |
requestsPerDay | Portfolio Analysis requests since 00:00 UTC |
requestItemsPerDay | Securities requested since 00:00 UTC |
Each entry has current (used so far) and max (your limit).
New accounts start at 6 requests per minute, 50 requests per day and 50,000 securities per day, as in the example above. Sharegain can raise these for your account: contact your account manager. This endpoint always shows the limits that apply to you.
Calls to the quota endpoint don't count toward your limits. If the Portfolio Analysis API isn't enabled for your account, this endpoint returns 400 with a permissions message.
Limits
| Limit | Rule |
|---|---|
| Items per request | 200, for every account |
| Requests per minute | Rolling 60-second window |
| Requests per day | Resets at 00:00 UTC |
| Items per day | Resets at 00:00 UTC. A request is rejected in full if its items would take you over the limit |
Only Portfolio Analysis requests are rejected when a limit is reached. Hot Stocks calls are never rate-limited, but they are included in the per-minute count.
When a limit is reached, the API returns 429 with an errorMessage. There is no Retry-After header: per-minute limits clear within 60 seconds, and daily limits clear at 00:00 UTC.