# A used-up API allowance now returns 429

October 2026 · API

When a token uses its monthly allowance, the API now answers HTTP 429 with the time the count resets, instead of 401.

## What's new

When a token uses its monthly allowance, the API now answers HTTP 429 instead of 401. The body is unchanged: the same `error` text, with `code: quota_exceeded`, `limit` and `resets_at` beside it.

The 429 carries four new headers:

- `Retry-After`: whole seconds until the count resets.
- `X-RateLimit-Limit`: the monthly allowance of the token.
- `X-RateLimit-Remaining`: always `0` on this response.
- `X-RateLimit-Reset`: the moment the count resets, as Unix seconds.

The count resets on the first day of each month at 00:00 UTC. A successful response carries none of these headers.

A 401 no longer means a used-up allowance. It points to the token, or to something the account may not use. A 429 with no `code` is the short request-rate limit, not the monthly allowance, so branch on `code` when you tell them apart.

## Related

- [Errors and plan limits](https://docs.newhedge.io/api#errors)
