HTTP Status & Rate Limits — API Response Codes Reference
A robust integration handles HTTP status codes and rate limits gracefully. This reference explains the common codes you will see and gives practical caching and back-off guidance.
Success and client errors
200 OK — the request succeeded and the body contains the result. 400 Bad Request — the request was malformed, such as invalid JSON or bad parameters. 401 Unauthorized — the API key is missing or invalid; check that you are sending the correct credential.
Credit and rate-limit codes
402 Payment Required and 429 Too Many Requests indicate you have hit a credit or rate limit. 402 typically signals exhausted credits or quota, while 429 signals you are sending requests too quickly. Both mean the request was understood but throttled rather than malformed.
Server errors
5xx codes indicate a server-side problem rather than a fault in your request. These are generally transient. A 500 through 504 warrants a retry with back-off rather than a change to the request itself.
Caching and back-off guidance
Cache cheap, frequently repeated reads — such as a token's decimals or a finalized block — so you avoid spending calls on data that does not change. On a 429, back off before retrying, ideally with exponential back-off and jitter, and honor any Retry-After hint. This keeps you under the limit and smooths out bursts.
Preguntas frecuentes
What does a 401 versus a 429 mean?
401 Unauthorized means the API key is missing or invalid — an authentication problem. 429 Too Many Requests means the key is valid but you are sending requests too fast and are being rate-limited. Fix credentials for 401; back off for 429.
How should I handle a 429 response?
Stop hammering the endpoint and retry with exponential back-off and jitter, honoring any Retry-After header. Cache repeated reads of unchanging data such as decimals or finalized blocks so you make fewer requests in the first place.
Herramientas relacionadas
Recarga, obtén tu clave y publica.
Autoservicio. Paga en cripto o con tarjeta. Medido por créditos: las primitivas pesadas cuestan más, las simples son baratas.
Obtener clave API