Skip to content
Docs
Get API Access
Browse the Documentation

API Reference

Key

The calling key's plan, limits and usage.

Read from the running API at , version 1.0.0, and read again every 5 minutes.

Every endpoint here authenticates with X-API-Key, answers in the standard envelope and fails with the standard error body.

Get the API key's plan, limits and usage

GEThttps://api.cantoncap.cc/v1/key/info
getKeyInfo

The calling key's plan, its per-minute, monthly credit and connection limits, and its account's usage, in the shape of CoinMarketCap's /v1/key/info with CantonCap's additions: plan_id, version, status, paid_through, connection_limit, key_limit, connections and keys. Every key of an account shares these limits and this usage. The minute figures come from the same window as the X-RateLimit headers and include this request. Credits used today count from 00:00 UTC; credits used this period are the counter that admission checks, which can pass the limit by the cost of requests in flight when the allowance ran out, so credits_left never goes below 0. Open connections are the account's live WebSocket leases. Costs 0 credits, so it stays available once the monthly credits are used up; it counts toward the minute limit and is never cached. A key with limits of its own has no monthly allowance: its credit limit, reset and usage are null, and no credit counter is read for it. No secret, principal or party identifier is returned. No query parameters.

Credits: 0 credits.

Parameters

This endpoint takes no parameters.

Request

curl -s "https://api.cantoncap.cc/v1/key/info" \
  -H "X-API-Key: $CANTONCAP_API_KEY"

Response

200 The calling key's plan, limits and usage.

Example Response
{
  "status": {
    "timestamp": "2026-10-11T14:00:00.000Z",
    "elapsed_ms": 18,
    "error_code": 0,
    "error_message": null,
    "request_id": "req_7Hk2pQ9xLm"
  },
  "data": {
    "plan": {
      "plan_id": "developer",
      "version": "2026-11",
      "status": "active",
      "paid_through": null,
      "credit_limit_monthly": 150000,
      "credit_limit_monthly_reset": "In 28 days, 14 hours, 45 minutes",
      "credit_limit_monthly_reset_timestamp": "2026-12-01T00:00:00.000Z",
      "rate_limit_minute": 300,
      "connection_limit": 0,
      "key_limit": 5
    },
    "usage": {
      "current_minute": {
        "requests_made": 4,
        "requests_left": 296
      },
      "current_day": {
        "credits_used": 2
      },
      "current_month": {
        "credits_used": 42,
        "credits_left": 149958
      },
      "connections": {
        "open": 0,
        "left": 0
      },
      "keys": {
        "count": 2,
        "left": 3
      }
    }
  }
}
  • dataobject

    The calling key's plan, limits and usage, shared by every key of its account. The credit fields are null for a key with limits of its own, which has no monthly allowance.

    26 child fields
    • planobject

      The plan the key is held to and its limits, shared by every key of the account.

      10 child fields
      • plan_idstring

        The plan, such as free, developer or pro.

      • versionstringnullable

        The plan catalogue version, such as 2026-11; null for a key with limits of its own.

      • statusenum

        The account's status. Only an active account is served; keys of other accounts are refused with 402 or 403.

        One ofactivenot_activatedpayment_expiredsuspended
      • paid_throughdate-timenullable

        When paid access ends; null when nothing is prepaid.

      • credit_limit_monthlyintegernullable

        Credits the account may use each period; null when it has no monthly allowance.

      • credit_limit_monthly_resetstringnullable

        Time until the credits reset, rounded up to the minute, such as In 28 days, 14 hours, 45 minutes.

      • credit_limit_monthly_reset_timestampdate-timenullable

        When the next period starts and the credits reset, 00:00 UTC on the 1st.

      • rate_limit_minuteinteger

        Requests per minute, shared by the account's keys.

      • connection_limitinteger

        Concurrent WebSocket connections per account; 0 when the plan does not stream.

      • key_limitinteger

        Keys an account may hold.

    • usageobject

      What the account has used, counted from the same state admission checks.

      14 child fields
      • current_minuteobject

        The account's requests in the current minute window, which the X-RateLimit headers also report.

        2 child fields
        • requests_madeinteger

          Requests this minute, this one included, as X-RateLimit-Remaining counts them.

        • requests_leftinteger
      • current_dayobject

        Credits used in the current UTC day. Only reported; no daily limit applies.

        1 child field
        • credits_usedintegernullable

          Credits used since 00:00 UTC; null without a monthly allowance.

      • current_monthobject

        Credits used and left in the current credit period, which CoinMarketCap calls the month.

        2 child fields
        • credits_usedintegernullable

          Credits used this period; it can pass the limit by the cost of requests in flight when the allowance ran out.

        • credits_leftintegernullable
      • connectionsobject

        The account's open WebSocket connections and the slots left under connection_limit.

        2 child fields
        • openinteger

          Open WebSocket connections of the account.

        • leftinteger
      • keysobject

        The account's keys and how many more it may hold under key_limit.

        2 child fields
        • countinteger

          The account's keys, disabled ones included.

        • leftinteger

Headers

  • X-RateLimit-Limit Maximum requests admitted in the current plan window, which every key of an account shares.
  • X-RateLimit-Remaining Requests remaining in the current plan window, across every key of the account.
  • X-RateLimit-Reset Unix timestamp in seconds when the current plan window resets.
  • Cache-Control private, no-store Prevents every cache, private or shared, from storing the response. Every error response carries it.

Errors

StatusCodeWhenerror_code todayFrom launch
400invalid_requestA parameter, body or cursor is invalid.1000400
401unauthenticatedThe X-API-Key header is missing or empty.10011002
401unauthenticatedThe API key is unknown, malformed or deleted.10011001
402payment_requiredThe account is not activated.4021003
402payment_requiredThe account's paid period has ended unpaid.4021004
403forbiddenThe API key is disabled or does not resolve to an active plan.10021007
403forbiddenThe API key's account is suspended.10021007
403forbiddenThe API key lacks a permission the operation needs.10021006
403plan_not_authorizedThe API plan does not include the operation.4031006
403quota_exceededThe requested history or page size exceeds the API plan.10061006
404not_foundThe resource does not exist or is not published.1003404
429rate_limitedThe account's per-minute request limit is used up.10051008
429credit_limit_reachedThe account's monthly credits are used up.4291010
429ip_rate_limitedToo many requests without a valid API key came from this address.4291011
500internal_errorThe server failed unexpectedly.1009500
503source_unavailableA data or quota store is unavailable, or the service is at capacity.1008503
Esc
navigateopenEscclose