Paginación y errores

Convenciones de paginación, cuerpos de error estándar y códigos HTTP.

Pagination

List endpoints support pagination:

  • Default page size: 50
  • Maximum page size: 100
  • Query string: ?page=2&limit=25

Pagination object

{
  "data": [],
  "pagination": {
    "page": 2,
    "limit": 25,
    "total": 250,
    "totalPages": 10
  }
}

Some list responses may include extra fields (for example has_more on trades). Always read pagination from the pagination object when present.

Standard error body

{
  "error": "Error message here",
  "code": "ERROR_CODE"
}

HTTP status codes

CodeMeaning
200Successful GET
201Successful POST (resource created)
204Successful DELETE (no body)
400Invalid body or query parameters
401Missing or invalid API key
403Valid key but not allowed (for example free tier)
404Resource missing or not owned
500Server error

Common error codes

CodeWhen it appears
INVALID_API_KEYMalformed key or unknown key
SUBSCRIPTION_REQUIREDPaid subscription required for API use
VALIDATION_ERRORZod / input validation failed
NOT_FOUNDResource does not exist
UNAUTHORIZEDAuthentication failed