Skip to content

Errors & Rate Limits

Error format

json
{ "detail": "Human-readable error message" }

Validation errors (422) return a structured array:

json
{
  "detail": [
    {
      "loc": ["query", "window_hours"],
      "msg": "value is not a valid integer",
      "type": "type_error.integer"
    }
  ]
}

HTTP status codes

CodeNameWhen
200OKSuccessful response
400Bad RequestUnknown product_key or invalid parameter
401UnauthorizedMissing or invalid API key
403ForbiddenValid key, method not permitted
422Unprocessable EntityQuery parameter type or range violation
429Too Many RequestsRate limited
500Internal Server ErrorOracle computation failure
502Bad GatewayUpstream data source error
503Service UnavailableDatabase unreachable

Rate limits

Developer pricing routes share a rate-limit bucket. Limits are enforced per IP.

Handling 429s

Use exponential backoff:

python
import time
import httpx

def fetch_with_retry(url: str, headers: dict, max_retries: int = 5) -> dict:
    delay = 1.0
    for attempt in range(max_retries):
        r = httpx.get(url, headers=headers)
        if r.status_code == 429:
            time.sleep(delay)
            delay *= 2
            continue
        r.raise_for_status()
        return r.json()
    raise RuntimeError("max retries exceeded")

Common issues

401 - missing API key

bash
curl https://api.coda-tech.net/api/v1/developer/pricing/some-product-key
# returns 401

Add -H "X-API-Key: your_key" to the request.


400 - unknown product key

Product keys follow the pattern {game}-{set_code}-{card-name-slug}. Verify the key exists in the catalog before retrying.


422 - parameter out of range

Keep window_hours between 1 and 72, and outlier_stddevs between 1 and 10.


503 - database unreachable

Transient issue. Retry with backoff. If it persists, contact andrew@coda-tech.co.

Coda - price settlement infrastructure.