Error handling

Errors use a consistent JSON shape with a machine-readable code — over HTTP for REST, and as inline frames on an open stream connection.

REST errors

HTTP responses include a status code and a JSON body:

{
  "error": {
    "code": "unauthorized",
    "message": "Invalid or missing API key."
  }
}
StatusCodeMeaning
400invalid_requestBad mint, param, source, batch size, or cursor.
401unauthorizedMissing or invalid API key.
404not_foundUnknown token or no price for mint.
429rate_limitedPer-key burst limit exceeded.
429quota_exceededPer-user monthly request quota exceeded.
500internalUnexpected server failure.
503upstream_unavailableDependency unavailable (e.g. metadata resolve).

Stream errors

Subscription rejections and protocol errors arrive as JSON frames on the WebSocket without closing the connection (unless the error is fatal, such as an invalid API key on connect):

{
  "type": "error",
  "code": "forbidden",
  "channel": "trades",
  "message": "Your plan doesn't include this stream."
}
CodeMeaning
bad_requestMalformed subscribe message or filters.
unauthorizedInvalid or missing API key on connect.
forbiddenPlan doesn't include this stream or feature.
rate_limitedToo many subscribe/unsubscribe messages.

Connection-level failures use WebSocket close codes — see Close codes on the Streams page.