Skip to main content
GET
GET /mcr/{did}

Endpoint

Returns the score, letter rating, , , revenue summary, and trend for a single machine. For a peaq-homed machine the server fetches new events from chain in batches of 100 and caches them in SQLite, so repeat requests read the cache. Responses are cached in memory for 3600 seconds. Responses are not cached when mcr_degraded is true: the server retries upstream FX sources on the next request rather than pinning a conservative score. Responses for a Solana-homed machine are not cached either.

Path parameters

string
required
Machine DID in the form did:peaq:<decimal machine id>, with no leading zeros. Address DIDs (did:peaq:0x...), raw addresses and bare machine IDs return 400.

Response

200 OK

Rating values

Unbonded machines return a rating of NR with mcr_score: 0. Bonded machines that have not yet accumulated enough history return a rating of Provisioned with mcr_score: 0. A Solana-homed machine is rated from its indexed event history. Until that history is complete, the response carries mcr_score: 0, mcr: "Provisioned", and a rating_unavailable reason. With any reason present, event_count, revenue_event_count, activity_event_count and total_revenue are 0, average_revenue_per_event, revenue_trend and last_updated are null, and mcr_degraded is false, even when the index already holds events for the machine: Once the history is complete, the server rates the machine with the same formula a peaq-homed machine gets and drops rating_unavailable. Branch on the field’s presence rather than on one value. The SDKs parse these fields from 0.8.0. See Machines and IDs.

Error responses

Example

Response (peaq-homed machine)
Response (Solana-homed machine, not rated yet)