Quotas, limits and errors
How a request is admitted
Each customer request passes the same checks, in this order. The first one that fails answers.
Sessions of team members are also checked for a finished two-factor sign-in (401 two_factor_required), their role
(403 role_forbidden) and, when the package requires it, 2FA set-up (403 two_factor_setup_required); see
Authentication.
Requests per minute
A package may limit requests per minute. Every customer request counts, whatever the route (a request refused with 429 does not). Past the limit the API answers:
Code
Daily and monthly quotas
A package may also have a daily and a monthly quota (UTC day, UTC calendar month). Only metered routes count, one request each:
| Metered | Not metered |
|---|---|
GET /signals, GET /signals/{filingId} | account, billing, delivery, keys, usage, saved views |
GET /companies, GET /companies/{issuerId} | POST /stream/ticket |
GET /leaderboard | signals pushed on an open stream |
| opening the live stream (once per connection) | anything done with the sandbox key |
Sessions, the live key and named keys all count. The API reference marks each operation with x-metered.
Every metered answer carries the state of the quotas your package has (only those it has):
| Header | Meaning |
|---|---|
X-Quota-Limit-Day | requests per UTC day |
X-Quota-Remaining-Day | requests left today |
X-Quota-Reset-Day | when the day's count starts again (Unix seconds) |
X-Quota-Limit-Month, X-Quota-Remaining-Month, X-Quota-Reset-Month | the same for the calendar month |
Over a quota the answer is a 429 with a code and Retry-After in seconds until the reset:
Code
Counting is exact: parallel requests cannot pass a quota together, and a refused request is not counted.
GET /api/v1/customer/usage (and the portal's Usage page) shows today and this month against the quotas,
refusals, and requests per day and per endpoint for the last 30 days.
Handling 429 well
- Read
Retry-Afterand wait at least that long before the next request of that kind. - For
quota_day_exceededandquota_month_exceeded, stop the job until the reset; retrying sooner only gets the same answer. - Watch
X-Quota-Remaining-Dayand slow down before you reach zero. - Prefer webhooks or the stream over polling: pushed signals cost nothing.
Code
Other limits
| What | Limit | Answer |
|---|---|---|
Page size (limit) | 1–200 (leaderboard 1–100) | 400 |
| Named API keys | 20 active per account | 409 api_key_limit |
| Saved views | 50 per account | 409 saved_view_limit |
| Open streams | 5 per account | 429 stream_limit, Retry-After: 30 |
| Stream client messages | 20 per 10 seconds, 4 KiB each | close 1008 |
| Sign-in | 8 wrong passwords per address and place, 15 minutes | 429 throttled |
| Push test | 5 per hour | 429 |
| Chat | per package, per month and per minute | 429 chat_quota_exceeded, chat_rate_limited |
| Followed companies, alert rules | per package; 20 rules | 409 follow_limit, rule_limit |
Errors
Every error is JSON with a human sentence in error and, where your code may want to branch, a stable code:
Code
Branch on the status and code, never on the wording of error.
| Status | code | Meaning |
|---|---|---|
| 400 | (none) | A parameter or body field is invalid; error names it |
| 401 | (none) | No credential, or not a valid one (error: "unauthorized") |
| 401 | two_factor_required | The session waits for the 2FA code |
| 401 | code_invalid, token_invalid | A wrong 2FA code, or a used or expired mailed link |
| 402 | checkout | Sign-up payment not finished |
| 402 | canceled | The subscription ended |
| 402 | payment_overdue | A payment failed and the grace period (7 days by default) is over |
| 402 | subscription_expired | A paid period ended without renewal |
| 403 | (error: "paused") | The account is suspended; contact RiskPilot |
| 403 | sandbox_read_only | The sandbox key on a route other than the signals routes |
| 403 | key_not_allowed | A named key on a route that is not a data route |
| 403 | key_scope | A named key without the scope |
| 403 | session_required | A route that needs a signed-in person, called with a key |
| 403 | role_forbidden | A team member's role does not allow it |
| 403 | two_factor_setup_required | The package requires 2FA and the person has none |
| 403 | email_unverified | Sign-in before the address was confirmed |
| 404 | (none) | Not found, or outside your package (the two look the same) |
| 409 | various | A limit or a state, for example api_key_limit, follow_limit, ticket_closed |
| 429 | (none) | Requests per minute; Retry-After: 60 |
| 429 | quota_day_exceeded, quota_month_exceeded | A quota is used up; Retry-After to the reset |
| 429 | stream_limit, throttled, chat_rate_limited, chat_quota_exceeded | Other limits |
| 502 | chat_model_failed and others | An upstream service (payments, the chat model) failed |
| 503 | stream_off, stream_busy, push_unavailable, chat_unavailable | A feature is off or busy right now |
While billing does not allow access, the billing and account routes stay open (GET /customer/billing shows
access and, for past_due, graceUntil), so an app can send the person to pay.
Every answer carries an X-Request-Id header; quote it when you contact support.