The MCR API returns a machine’s credit rating along with event counts, revenue trend, and bond status. It’s a public read API. No authentication required.Documentation Index
Fetch the complete documentation index at: https://docs.peaq.xyz/llms.txt
Use this file to discover all available pages before exploring further.
Endpoint
{did} accepts either a full DID (did:peaq:0xabc...) or a raw EVM address (0xabc...). Set PEAQOS_MCR_API_URL to the root of the MCR API server. The public peaq-hosted MCR is at https://mcr.peaq.xyz. Self-hosted deployments default to http://127.0.0.1:8000.
Fetch the MCR
Response shape
total_revenue and average_revenue_per_event are USD cents. Divide by 100 for display (50 in this example).
A newly registered machine that hasn’t accumulated enough history returns mcr: "Provisioned" with mcr_score: 0. Unbonded machines return mcr: "NR" with mcr_score: 0. See GET /mcr/{did} for the full field reference.
Query an operator’s fleet
Use the operator endpoint to list all machines registered under a proxy operator, paginated with MCR scores per machine.Caching
The server applies a 1-hour TTL on MCR responses by default, configurable via theMCR_CACHE_TTL env var (0 to disable). Repeat requests within the window return cached values. The last_updated field tells you when the underlying events were most recently added.
Error handling
The MCR API returns standard HTTP status codes:404 when the DID is unregistered, 503 when the chain is unavailable, 400 for malformed inputs. Bodies are JSON with a detail field carrying the upstream message.
If you call through the SDK (client.queryMcr / client.query_mcr), HTTP failures surface as RuntimeError (JS) or ApiError (Python). The code attribute carries NOT_FOUND, SERVICE_UNAVAILABLE, SERVER_ERROR, TIMEOUT, etc. See SDK errors reference for the full code map.
Next steps
- GET /mcr/{did}: full API reference for this endpoint
- GET /machine/{did}: full machine profile
- Machine Credit Rating concept: rating scale and lifecycle

