Skip to main content
EchoZero REST responses use a consistent envelope. MCP protocol errors use JSON-RPC 2.0 format on /mcp routes.

REST response envelope

Success

Paginated endpoints wrap items in data with meta (page, limit, total).

Error

The code field is derived from the HTTP status: Validation errors on 400 may include a comma-joined message from field validators.

Common HTTP statuses

Authentication errors

Inbound agent webhook errors return the same envelope with 401 for invalid X-EZ-Signature or clock skew.

Rate limits

Authenticated requests include rate limit headers:

Tiers

Rate limits apply per API key or OAuth user id.

MCP JSON-RPC errors

MCP routes (POST /mcp, GET /mcp/sse) return JSON-RPC errors instead of the REST envelope:

MCP session errors

Signal ingestion outcomes

Inbound signal webhooks return 200 with an outcome field even when no trade executes: Treat skipped and unmatched as non-retryable unless you change the payload.

Signal validation errors (HTTP 400)

skipReason dictionary (selected)

Execution error tags (in executionResult.errorMessage)

Full registry: see ingestReasons.ts in the backend.

Retry guidance

Debugging tips

  • Compare your string-to-sign against the SDK’s signRestRequest output for REST HMAC.
  • For inbound webhooks, verify canonical JSON key ordering matches stableJson in echozero-sdk.
  • Check X-RateLimit-Remaining before bulk operations.
  • Use GET /status to verify OAuth tokens without hitting scoped routes.