Errors
Errors use RFC 7807 application/problem+json with an extra machine-readable code:
{ "status": 403, "title": "This API key lacks the required 'trade' scope.", "code": "api_key.insufficient_scope"}Always branch on code, not on the human-readable title.
Common codes
Section titled “Common codes”| HTTP | code |
Meaning |
|---|---|---|
| 400 | order.invalid |
Invalid order/automation parameters (volume, duration, address) |
| 401 | unauthorized |
Missing or invalid key |
| 402 | wallet.insufficient_balance |
Not enough TRX on balance |
| 403 | api_key.insufficient_scope |
Key’s scope is below what the endpoint requires |
| 403 | api_key.spend_limit_exceeded |
Would exceed the key’s daily spend limit |
| 429 | rate_limited |
Too many requests |
| 502 | feesaver.upstream_error |
Upstream provider error (any charge is refunded) |
Validation errors (bad request bodies) use the standard ValidationProblemDetails shape with an errors
object keyed by field.