Overview
Dancity enforces rate limits to ensure platform stability and fair use across all API clients.Limits
| Scope | Limit |
|---|---|
| Global (per API key) | 120 requests / minute |
| VAS purchases (airtime, data, electricity, cable) | 30 requests / minute |
| OTP requests | 5 requests / 10 minutes |
| Bulk operations (bulk airtime, bulk data) | 10 requests / minute |
Rate limit headers
Every response includes the following headers:| Header | Description |
|---|---|
X-RateLimit-Limit | Maximum requests allowed in the window |
X-RateLimit-Remaining | Requests remaining in the current window |
X-RateLimit-Reset | Unix timestamp when the window resets |
Handling 429 responses
When you exceed the limit, you receive:Best practices
Use the bulk endpoints
Use the bulk endpoints
For sending airtime or data to multiple recipients at once, use the bulk
endpoints (
POST /airtime/bulk, POST /buy-data/bulk). A single bulk
request counts as one request against your rate limit.Cache where possible
Cache where possible
Electricity meter and cable smartcard validation results can be cached
client-side for a short period. There’s no need to re-validate on every
page load.
Monitor X-RateLimit-Remaining
Monitor X-RateLimit-Remaining
Check
X-RateLimit-Remaining before making bursts of requests. If it drops
below 10, slow down or pause until X-RateLimit-Reset.