Errors and limits
Every error has the same shape and a fixed message. Retry a 429 or a 503; fix anything else.
The shape
An error answers with its HTTP status and a JSON body holding a stable code and a fixed message. Messages never carry upstream text, so match on the code.
{
"error": {
"code": "UNAUTHORIZED",
"message": "This needs a Memeputer API key that may use it, sent as Authorization: Bearer <your mpk_ key>"
}
}Answers every operation can give
| Status and code | Message | When | Retry? |
|---|---|---|---|
400 INVALID_REQUEST | Query parameters are not supported | The URL has a query string. No operation takes one; inputs go in the path or the JSON body. | No: fix the request. |
401 UNAUTHORIZED | This needs a Memeputer API key that may use it, sent as Authorization: Bearer <your mpk_ key> | The key is missing, malformed, unknown or revoked, or the operation acts for a signed-in person and does not take a key. | No: check the key. |
405 METHOD_NOT_ALLOWED | Method not allowed | The wrong HTTP method; the Allow header names the right one. | No: use the method in Allow. |
429 RATE_LIMITED | Too many requests | Over the key's limit, or over the operation's limit for requests without a key. | Yes, after Retry-After seconds. |
503 API_KEYS_UNAVAILABLE | API keys cannot be checked right now; try again shortly | Memeputer cannot check keys right now. It never means the key is bad. | Yes, shortly, with backoff. |
Each operation adds its own codes. Input its schema refuses is a 400, nothing found is usually a 404, and a backend that failed is a 503 worth retrying. The reference lists every code under its operation, with the Cache-Control each answer carries.
A key's limits
Each key has its own limits, by default 120 requests a minute and 5,000 a day, in fixed UTC windows shared by every server, counting REST requests and MCP tool calls together. Over either, the answer is 429 RATE_LIMITED with Retry-After: the seconds until that window ends. A request refused before it reached the operation (a bad key, a query string) does not count.
Above the key's limits sits a flood guard of 600 requests a minute from one IP on each server instance, checked before the key is looked up.
Without a key
The public coin reads need no key on REST. Without one, each is limited per IP on each server instance; with a key, only the key's limits apply.
token.get: 600 requests a minutetoken.recent: 300 requests a minutetoken.top: 300 requests a minutetoken.candles: 120 requests a minutetoken.trades: 120 requests a minutewallet.profiles: 60 requests a minutecomments.list: 600 requests a minuteprofiles.search: 120 requests a minutetoken.holders: 120 requests a minutewallet.holdings: 60 requests a minute
On MCP
A tool's errors come back as a normal result with isError: true and the same {"error":{"code","message"}} in its text block, RATE_LIMITED and UNAUTHORIZED included. Requests the server refuses before any tool runs are JSON-RPC errors: -32001 with 401 for a missing or bad key, -32002 with 503 when keys cannot be checked. The endpoint's own HTTP answers are 403 FORBIDDEN_ORIGIN for a foreign Origin, 405 for anything but POST, 413 PAYLOAD_TOO_LARGE over 64 KiB, 400 BATCH_NOT_SUPPORTED for a JSON-RPC batch and 429 over its 300 requests a minute per IP. A request for another host gets 404, the server answers 503 MCP_UNAVAILABLE when it cannot start, and a tool name it does not have is an isError result with UNKNOWN_TOOL.