Endpoint
{did} accepts either a full (did:peaq:0xabc...) or a raw 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 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 , 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 is unavailable, 400 for malformed inputs. Bodies are JSON with a detail field carrying the upstream message.
If you call through the (queryMcr(client, did) in JS / query_mcr(client, did) in Python), 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

