Skip to content

Quota API ​

Check your rate limits and how much of them you have used.

Endpoint ​

http
GET /public/portfolio-analysis/quota
bash
curl https://api.sharegain.com/public/portfolio-analysis/quota \
  -H "X-SG-Authorization: your-api-key"

Response ​

json
{
  "requestsPerMinute": {
    "current": 1,
    "max": 6
  },
  "requestsPerDay": {
    "current": 12,
    "max": 50
  },
  "requestItemsPerDay": {
    "current": 2400,
    "max": 50000
  }
}
FieldDescription
requestsPerMinuteRequests in the last 60 seconds (rolling window). Counts Portfolio Analysis and Hot Stocks calls
requestsPerDayPortfolio Analysis requests since 00:00 UTC
requestItemsPerDaySecurities 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 ​

LimitRule
Items per request200, for every account
Requests per minuteRolling 60-second window
Requests per dayResets at 00:00 UTC
Items per dayResets 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.

Sharegain API Documentation