Skip to main content

Error format

All errors return a JSON response with a detail field:
{
  "detail": "Insufficient balance"
}
Some errors include a structured code for programmatic handling:
{
  "detail": {
    "error": {
      "code": "INSUFFICIENT_BALANCE",
      "message": "Not enough TRX balance"
    }
  }
}

HTTP Status Codes

CodeMeaning
200Success
400Bad request — invalid parameters
401Unauthorized — missing or invalid API key
403Forbidden — key disabled or action not allowed
404Not found
409Conflict — duplicate request or resource conflict
422Validation error — check request body
429Rate limit exceeded
500Server error

Common error codes

CodeDescription
INSUFFICIENT_BALANCEAccount balance too low for this operation
ADDRESS_ALREADY_ACTIVESmart Mode already active for this address
ORDER_NOT_FOUNDOrder ID does not exist
INVALID_ADDRESSNot a valid TRON address
RATE_LIMITEDToo many requests, retry after cooldown
PASSKEY_REQUIREDWithdrawal requires passkey verification
2FA_REQUIREDWithdrawal requires 2FA code

Retry strategy

For 429 and 5xx errors, implement exponential backoff:
import time
import requests

def api_call_with_retry(url, **kwargs):
    for attempt in range(3):
        resp = requests.get(url, **kwargs)
        if resp.status_code == 429 or resp.status_code >= 500:
            time.sleep(2 ** attempt)
            continue
        return resp
    raise Exception("Max retries exceeded")