Skip to main content

Errors and limits

Error format​

Every error follows this format:

{
"error": {
"code": "invalid_request",
"message": "Saldo BRL insuficiente. Disponível: R$ 1.234,56",
"request_id": "req_3f2c9b1e8d7a4c6b9e0f1a2b3c4d5e6f"
}
}

Build your integration on code. message is human-readable text (in Portuguese) and may change. When there is more than one validation message, they all come in error.details.

HTTPcodeMeaning
400invalid_requestInvalid data or business rule not met (balance, minimum, expired quote…).
401unauthorizedMissing, invalid, revoked or expired key.
403forbiddenMissing scope, IP outside the allowlist, operation not enabled or outside trading hours.
404not_foundThe resource does not exist in this account.
409conflict / idempotency_in_progressState conflict, fee changed or request in progress.
422idempotency_key_reusedIdempotency-Key already used with a different body.
429rate_limitedLimit exceeded.
502quote_unavailableNo quote right now; try again shortly.
502execution_uncertainConversion result not confirmed. Do not retry.
5xxinternal_error / upstream_errorTemporary failure. Retry with the same Idempotency-Key.

Rate limits​

  • 120 requests per minute per key, across all routes.
  • On top of that, 20 per minute on POST /v1/conversions/quotes and 20 per minute on POST /v1/conversions.
  • Responses include X-RateLimit-Limit and X-RateLimit-Remaining. When exceeded, the API responds 429 rate_limited with Retry-After (in seconds).

When to retry​

SituationRetry?
Timeout or network failureYes, with the same Idempotency-Key.
429 rate_limitedYes, after Retry-After seconds.
409 idempotency_in_progressYes, after a few seconds.
502 quote_unavailableYes, requesting a new quote.
5xx (internal_error, upstream_error)Yes, with the same Idempotency-Key and increasing backoff.
502 execution_uncertainNo. Check GET /v1/conversions?quote_id=<id>.
Validation 4xxNo. Fix the request.