Three requests per hour: what a strict free tier taught me
A developer built a crypto dashboard against the Coin Analysis API, whose free tier allows only three requests per hour. The limits forced a shift from per‑item requests to bulk queries, timed caching, and server‑side key handling. These techniques improve performance even on generous APIs.
When you start a project that relies on a public API, the first thing you check is the pricing plan. Most tutorials assume a generous free tier that lets you make dozens or hundreds of calls per minute. In reality, a handful of developers hit the other end of the spectrum: an API that only permits three requests per hour, per endpoint. That was the case for the Coin Analysis public price API, and it taught me a lesson that applies to any service where the number of calls is the scarce resource.
One Call, the Whole Universe
The instinct when you’re building a dashboard is to pull data one token at a time: request the price of Bitcoin, then Ethereum, then Solana, and so on. With a three‑request limit, that pattern quickly leads to a 429 error and a locked‑out user. The solution is to ask for everything you need in a single request. The Coin Analysis API lets you specify a page size that covers the entire market. For example:
curl "https://www.thecoinanalysis.com/api/public/v1/prices?perPage=250&order=market_cap" -H "x-api-key:$KEY"
This single call returns 220 tokens and indicates that the data is contained in one page. The cost of filtering on the client side is zero, and you avoid hitting the rate limit entirely.
Targeted Queries Over Loops
If you only care about a handful of coins, request them by symbol instead of looping through each one:
curl "https://www.thecoinanalysis.com/api/public/v1/prices?symbols=BTC,ETH,SOL" -H "x-api-key:$KEY"
Again, a single request fetches the data you need. The rule is simple: every loop that contains an HTTP request is a potential 429 bug. By batching requests, you keep the application responsive and compliant with the API’s limits.
Timer‑Based Refreshes, Not User‑Triggered Calls
With a three‑request‑per‑hour quota, you can only refresh data once every twenty minutes. If you trigger a refresh when a user clicks a button, the third visitor of the hour will receive an error page. The correct approach is to schedule a background refresh on a timer and serve the cached data to users. A minimal example in JavaScript looks like this:
let cache = { at: 0, data: null }; const WINDOW = 20 * 60 * 1000; // 20 minutes async function fetchPrices() { if (Date.now() - cache.at < WINDOW) return cache.data; const response = await fetch(BASE + "/prices", { headers: { "x-api-key": KEY } }); if (response.status === 429) throw new Error("rate limited"); cache = { at: Date.now(), data: await response.json() }; return cache.data; }
By keeping the cache fresh only when the timer allows, you avoid unnecessary requests and ensure every user sees the latest data without hitting the quota.
Protecting Your API Key
The Coin Analysis API returns access-control-allow-origin: *, which means browsers will happily call it from the front end. That convenience is a double‑edged sword: exposing your key in client‑side code lets anyone see it in devtools and potentially exhaust your quota. The safest practice is to keep the key on a server or an edge function, cache the response there, and expose only your own endpoint to the browser. With a single call feeding every visitor for twenty minutes, the strict tier becomes irrelevant.
In short, a tight free tier forced me to adopt practices that make any API—whether generous or stingy—more efficient. Batching, timed caching, and server‑side key management are not just workarounds; they are best practices that improve performance, reliability, and security.
What I Would Keep
- Batch requests instead of looping over individual items.
- Cache data on a timer that respects the rate limit.
- Prefer computed answers over raw series when possible.
- Scope backoff logic to specific routes, not globally.
- Keep API keys on the server side and expose only sanitized endpoints.
These techniques are valuable regardless of the quota size, and they turned a strict free tier into a teaching moment for building robust, scalable applications.
Why it matters
Rate limits can cripple a project if not handled properly. By learning to batch, cache, and secure API keys, developers can build resilient applications that respect provider constraints and deliver a smooth user experience.
Key points
- Batching requests reduces API calls and avoids 429 errors.
- Use a timer‑based cache to refresh data within rate limits.
- Keep API keys server‑side to prevent quota exhaustion.
- Scope backoff logic to the specific route that fails.
- A strict free tier can teach best practices that benefit any API usage.
Frequently asked questions
How many requests does the Coin Analysis free tier allow?
Three requests per hour, per endpoint.
Can I expose the API key in front‑end code?
No. The key should stay on the server or an edge function to avoid abuse.
What happens if I exceed the limit?
The API returns a 429 status code, indicating you must wait before making more requests.




