Rate limits
Protect platform stability with per-key request quotas.
Default quota
Each API key has a configurable rate_limit (default 100 requests per minute). Upgrade tiers in the developer dashboard.
Inspect headers on any response
curl -i "https://api.midasai.tech/v1/listings?limit=1" \
-H "Authorization: YOUR_API_KEY"
# Response includes:
# X-RateLimit-Limit: 100
# X-RateLimit-Remaining: 99
# X-RateLimit-Reset: 1719345678Handle 429 responses
When you exceed the limit, back off until the reset timestamp in X-RateLimit-Reset.
Exponential backoff (TypeScript)
async function fetchWithRetry(url: string, init: RequestInit, attempt = 0) {
const res = await fetch(url, init)
if (res.status !== 429 || attempt >= 5) return res
const reset = Number(res.headers.get("X-RateLimit-Reset") ?? 0)
const waitMs = reset
? Math.max(0, reset * 1000 - Date.now())
: Math.min(30_000, 500 * 2 ** attempt)
await new Promise((r) => setTimeout(r, waitMs))
return fetchWithRetry(url, init, attempt + 1)
}v1 performance notes
Cached listing reads
# GET /v1/listings responses are cached ~30s
# Auth is cached ~60s per key for lower latency
# Safe to poll listings every 30s+ without hammering the API