← tanukitrade.com Open WebApp (opens in a new tab) Start 7-day free trial

Reference

Errors

Failures use one envelope. Branch on error.code. The HTTP status is the class. The message is for a person. request_id is safe to send to support. Do not send the token with it.

application/json
{
  "ok": false,
  "error": {
    "code": "UNKNOWN_EXPIRY",
    "message": "Unknown expiry.",
    "details": [{"available": ["2026-10-19", "2026-10-20"]}],
    "request_id": "req_example_01"
  }
}

error.details is present when the validator or the expiry check has a field to name. There is no stack trace. meta.rate_limit is added only when a rate-limit gate is the thing that answered.

Validation details

Every VALIDATION_ERROR names the field. The message is one sentence about the first problem. error.details lists every bad field, up to 20.

application/json
{
  "ok": false,
  "error": {
    "code": "VALIDATION_ERROR",
    "message": "Invalid expiry: \"2026-13-01\". Expected YYYY-MM-DD or an alias (0, 1, w1-w4, M1-M3, ALL).",
    "details": [
      {
        "field": "expiry",
        "problem": "format",
        "expected": "YYYY-MM-DD or an alias (0, 1, w1-w4, M1-M3, ALL)",
        "received": "2026-13-01"
      }
    ],
    "request_id": "req_example_01"
  }
}
FieldMeaning
fieldThe request field. An array item has its index: symbols[3]. The whole body is body; the header is content-type.
problemOne of unknown, missing, require_any, type, format, range, enum, duplicate, too_many, empty. The list is closed.
expectedWhat the field takes, in the same words as the parameter table. Missing on body-level problems.
receivedWhat you sent, as text, at most 64 characters, cut with …, control characters removed. An object is "object", an array is "array".

Body-level sentences: Duplicate field "symbol"., Body must be a JSON object., Body is not valid JSON at position N., Content-Type must be application/json., Unknown query parameter "x". Send parameters in the JSON body. On MCP the same details are in structuredContent.error and the text content is the message. Auth, rate-limit and unknown-path errors have no details.

What the client should do

HTTPCodeDo this
422VALIDATION_ERRORFix the body. Unknown field, nested object, repeated key, bad JSON, bad alias, integer outside signed 64-bit, or a cursor that does not match. Do not retry the same body.
422UNKNOWN_SYMBOLThe required symbol is not in the universe. Call list_symbols. Do not retry.
422UNKNOWN_EXPIRYYou sent a symbol and an expiry that symbol does not have. Use a date from error.details. The same bad expiry with no symbol is an empty 200, not this error.
422RESULT_TOO_LARGEThe uncompressed JSON would exceed 512 KiB. Narrow with symbol, or symbol and expiry, as the message says. Do not retry the wide call.
404NOT_FOUNDThat path is not a route. It looks the same as any other unknown path, and it is decided before auth. Stop. Do not hunt for another version prefix.
401AUTH_REQUIREDNo bearer token. The response includes WWW-Authenticate: Bearer. Add the header. Do not retry in a loop.
401INVALID_CREDENTIALSThe token is malformed or not recognized. Fix the secret. Failed auths from this address share a counter.
429RATE_LIMIT_EXCEEDEDThe ET-minute budget is spent. Sleep for Retry-After seconds, then continue. The window ends at the next America/New_York minute, not 60 seconds after your first call.
429AUTH_RATE_LIMITEDToo many auth failures from this address. Wait Retry-After. Default budget is 60 per ET minute.
429NOT_FOUND_RATE_LIMITEDToo many unknown paths from this address. Wait Retry-After. Default budget is 30 per ET minute.
503DATA_WARMINGThe datapoint is not built yet. Retry-After is 1. Wait, then retry the same read.
503OVERLOADEDThe process shed load, or every Redis slot is busy. Retry-After is 1. No usage is counted. Wait, then retry.
503STATE_UNAVAILABLEShared state cannot be reached: the connection failed, timed out, or the process ran out of file descriptors. Retry-After is 1. Wait, then retry.
413PAYLOAD_TOO_LARGEA market JSON body is over 4 KiB at the app, an account JSON body is over 1024 bytes, or any body is over 64 KiB at the proxy. Shrink the body. A symbol list of 300 tickers still fits the 4 KiB cap if the tickers are short; a pasted chain will not.

Other statuses

HTTPCodeWhen
403ENDPOINT_NOT_ENABLEDThe route is outside this token's explicit group list. A default PRO token can call every group, so this code is not returned for a catalog route. On MCP the HTTP status is still 403, and the body is a tool result with isError true and this code inside structuredContent. It is not a JSON-RPC error. Do not retry until the group is on the list.
403API_USER_INACTIVEThe key exists and is not allowed to call.
403API_USER_SUSPENDEDThe key is suspended.
403DISCORD_REQUIREDOnly when a Discord requirement is enabled for the account and no Discord user is linked. This is not a general requirement for PRO API or MCP access.
429ACCOUNT_RATE_LIMITEDToo many /api/v1/account/* reads this ET minute. Default budget is 30, on top of the shared user budget. Wait Retry-After. meta.rate_limit.scope is account. The RateLimit-* headers still describe the shared budget. See Account.
403IP_BLOCKEDThis source address is blocked.
405METHOD_NOT_ALLOWEDAllow names POST. OPTIONS is this, because there is no CORS.
431HEADERS_TOO_LARGEHeaders over 16 KiB, rejected at the proxy.
503AUTH_UNAVAILABLEThe auth store cannot be reached. No attempt is counted.
503MAINTENANCERetry-After is the remaining window when one is known.
503DATA_BUSYThis slice is already being built. Retry-After is 1.
503DATA_NOT_READY / DATA_UNAVAILABLEThe generation cannot be served yet. Retry-After is 5.

MCP

A tool’s domain error uses the same envelope inside structuredContent, with isError: true. It is not a JSON-RPC error. A disabled group is the same shape at HTTP 403, code ENDPOINT_NOT_ENABLED. JSON-RPC errors are a broken body, an unknown method, or an unknown tool. Auth and rate limits are HTTP responses before the body is read as JSON-RPC.

TanukiTrade API and MCP. Derived options analytics for your code and for agents. Not investment advice. tanukitrade.com