Skip to main content

Rate Limits

Asterwise has three limits:

  1. Monthly calls: your plan's call budget for a monthly period that starts on your own day: the day you signed up (Sandbox) or your billing day (paid plans).
  2. Calls per minute: your plan's limit for each UTC clock minute.
  3. Address limit: 60 calls a minute per network address, for calls without a valid API key.

The first two belong to your account. Every key on the account shares them, and they count your calls wherever they come from, so apps that share one network address (Cloudflare Workers, for example) never use up each other's limits.

Each refusal is a 429 with the standard error envelope and its own error code. The per-minute and address refusals also carry an HTTP Retry-After header, which standard retry tools (urllib3 Retry, axios-retry, fetch-retry) follow without extra code.

Plan quotas​

PlanMonthly callsPriceTier burst limit (per minute)
Sandbox500Free10
Builder10,000$1060
Launch50,000$30200
Scale300,000$100500
EnterpriseCustomCustomCustom

Only successful (2xx) answers count toward the month. Calls that fail with a 4xx or 5xx status code are not counted.

Monthly limit​

When your account has used its monthly calls, the response is:

HTTP/1.1 429 Too Many Requests
X-Request-Id: <uuid>

{
"success": false,
"error": "monthly_usage_limit_exceeded",
"message": "Monthly API call limit reached. Upgrade your plan to continue.",
"details": [],
"retry_after": null,
"doc_url": "https://docs.asterwise.com/reference/errors/monthly_usage_limit_exceeded/",
"request_id": "<uuid>",
"timestamp": "<ISO 8601 UTC>"
}

On the free Sandbox plan the message names the plan: "You have reached the 500 call limit on the free Sandbox plan. Upgrade at asterwise.com/dashboard to get more calls."

retry_after is null and there is no Retry-After header, because the wait is days, not seconds. Your quota period is monthly and starts on your own day: the day of the month you signed up (Sandbox) or your billing day (paid plans), at 00:00 UTC; the 29th to 31st fall on the last day of shorter months. The X-RateLimit-Reset header and GET /v1/keys/me/usage give the exact reset time. Payments and renewals never reset the count early.

Per-minute limit​

Calls with a valid API key are limited per minute by your plan:

TierBurst limit (per minute)
Sandbox10
Builder60
Launch200
Scale500

Enterprise limits are set by agreement.

Minutes are UTC clock minutes, so the count starts again at the top of each minute. All keys on an account share one count.

Two inputs are far heavier than the rest and count extra toward this limit: a dasha request with levels: 4 counts as 3 calls, and one with levels: 5 (about 133,000 periods, a ~21 MB answer) as 10. Send both from_date and to_date no more than 10 years apart and either counts as 1 call: one year of five levels is about 110 KB. Your monthly count and billing still count each call once.

When exceeded:

HTTP/1.1 429 Too Many Requests
Retry-After: 30
X-Request-Id: <uuid>

{
"success": false,
"error": "burst_limit_exceeded",
"message": "Too many requests per minute. Please slow down.",
"details": [],
"retry_after": 30,
"doc_url": "https://docs.asterwise.com/reference/errors/burst_limit_exceeded/",
"request_id": "<uuid>",
"timestamp": "<ISO 8601 UTC>"
}

Retry-After and retry_after are the seconds left in the current minute, from 1 to 60. This example was refused 30 seconds into a minute.

Address limit (calls without a valid key)​

Calls without a valid API key (no key, a mistyped key or a revoked key) are limited to 60 a minute per network address, across all endpoints. Calls with a valid key are not counted here.

When exceeded:

HTTP/1.1 429 Too Many Requests
Retry-After: 30
X-Request-Id: <uuid>

{
"success": false,
"error": "ip_rate_limit_exceeded",
"message": "Too many requests from this IP address. Please slow down.",
"details": [],
"retry_after": 30,
"doc_url": "https://docs.asterwise.com/reference/errors/ip_rate_limit_exceeded/",
"request_id": "<uuid>",
"timestamp": "<ISO 8601 UTC>"
}

If you see this from code that sends a key, check the key: a revoked or mistyped key counts as no key.

Usage reads​

GET /v1/keys/me/usage and GET /v1/keys/me are not billed and do not use your plan's limits. Each key may make them 60 times a minute in total. Past that they return 429 burst_limit_exceeded with Retry-After, and the message "This key has read its own record and usage more than 60 times this minute. Try again when the minute ends."

Response headers​

HeaderValueWhen set
Retry-AfterInteger secondsOn a per-minute or address 429: seconds until the current UTC minute ends (1 to 60). Conforms to RFC 9110 §10.2.3.
X-Request-IdUUIDAlways. Use for support tracing.
X-RateLimit-LimitIntegerYour monthly call budget.
X-RateLimit-PlanStringYour plan name (sandbox, builder, launch, scale).
X-RateLimit-RemainingIntegerCalls left this period.
X-RateLimit-ResetIntegerUnix time (seconds) when your monthly count resets: your sign-up day (Sandbox) or billing day (paid plans).
X-RateLimit-Burst-LimitIntegerCalls a minute your plan allows.
X-RateLimit-Burst-RemainingIntegerCalls left in the current UTC minute.

The X-RateLimit-* headers are on every answer to a call with a valid key, cache hits and refusals included. Check Your Usage explains each one and the free usage endpoint.

Subscription expiry​

Distinct from rate limits but on the same code path: if your subscription expires, requests return subscription_expired with a 402 status code. The message includes the upgrade URL. No Retry-After — renew your subscription at the dashboard.

Best practices​

Honor Retry-After​

Most HTTP clients respect Retry-After automatically:

import requests
from requests.adapters import HTTPAdapter
from urllib3.util.retry import Retry

session = requests.Session()
retry_strategy = Retry(
total=3,
backoff_factor=1,
status_forcelist=[429, 500, 502, 503, 504],
respect_retry_after_header=True, # default in urllib3 1.26+
)
session.mount("https://", HTTPAdapter(max_retries=retry_strategy))

response = session.get(
"https://api.asterwise.com/v1/astro/ayanamsha",
headers={"Authorization": "Bearer YOUR_KEY"},
)

Distribute calls across the minute​

For high-throughput applications, smooth your request rate. If you have a daily batch of 1,000 charts to compute on the Builder plan (60 calls a minute), distribute them across the day rather than firing them all at once.

Use idempotency for retry safety​

GET requests are idempotent by definition. POST endpoints are also idempotent on Asterwise — sending the same payload twice produces the same chart, no duplicate side effects. Safe to retry POSTs without idempotency keys.

Watch X-RateLimit-Remaining​

Track X-RateLimit-Remaining (or call GET /v1/keys/me/usage, which is not billed) so you can upgrade before you hit the quota wall. The dashboard at asterwise.com/dashboard shows real-time usage.

What happens during a Redis outage​

Asterwise keeps its rate-limit counters in Redis. If Redis is briefly unreachable:

  • The monthly limit is still enforced, counted from our database of billed calls. Calls already in progress when the limit is reached can go slightly over it.
  • The per-minute and address limits are paused until Redis is back.
  • Calls served during that time count and are billed exactly as usual, never more.
  • A rate-limit header is left out when its count could not be read, rather than guessed.