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.
| HTTP | code | Meaning |
|---|---|---|
| 400 | invalid_request | Invalid data or business rule not met (balance, minimum, expired quote…). |
| 401 | unauthorized | Missing, invalid, revoked or expired key. |
| 403 | forbidden | Missing scope, IP outside the allowlist, operation not enabled or outside trading hours. |
| 404 | not_found | The resource does not exist in this account. |
| 409 | conflict / idempotency_in_progress | State conflict, fee changed or request in progress. |
| 422 | idempotency_key_reused | Idempotency-Key already used with a different body. |
| 429 | rate_limited | Limit exceeded. |
| 502 | quote_unavailable | No quote right now; try again shortly. |
| 502 | execution_uncertain | Conversion result not confirmed. Do not retry. |
| 5xx | internal_error / upstream_error | Temporary 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/quotesand 20 per minute onPOST /v1/conversions. - Responses include
X-RateLimit-LimitandX-RateLimit-Remaining. When exceeded, the API responds429 rate_limitedwithRetry-After(in seconds).
When to retry
| Situation | Retry? |
|---|---|
| Timeout or network failure | Yes, with the same Idempotency-Key. |
429 rate_limited | Yes, after Retry-After seconds. |
409 idempotency_in_progress | Yes, after a few seconds. |
502 quote_unavailable | Yes, requesting a new quote. |
5xx (internal_error, upstream_error) | Yes, with the same Idempotency-Key and increasing backoff. |
502 execution_uncertain | No. Check GET /v1/conversions?quote_id=<id>. |
Validation 4xx | No. Fix the request. |