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
https://api.cantoncap.cc/v1/key/infoThe 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.
{
"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
}
}
}
}dataobjectThe 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
planobjectThe plan the key is held to and its limits, shared by every key of the account.
10 child fields
plan_idstringThe plan, such as free, developer or pro.
versionstringnullableThe plan catalogue version, such as 2026-11; null for a key with limits of its own.
statusenumThe account's status. Only an active account is served; keys of other accounts are refused with 402 or 403.
paid_throughdate-timenullableWhen paid access ends; null when nothing is prepaid.
credit_limit_monthlyintegernullableCredits the account may use each period; null when it has no monthly allowance.
credit_limit_monthly_resetstringnullableTime until the credits reset, rounded up to the minute, such as In 28 days, 14 hours, 45 minutes.
credit_limit_monthly_reset_timestampdate-timenullableWhen the next period starts and the credits reset, 00:00 UTC on the 1st.
rate_limit_minuteintegerRequests per minute, shared by the account's keys.
connection_limitintegerConcurrent WebSocket connections per account; 0 when the plan does not stream.
key_limitintegerKeys an account may hold.
usageobjectWhat the account has used, counted from the same state admission checks.
14 child fields
current_minuteobjectThe account's requests in the current minute window, which the X-RateLimit headers also report.
2 child fields
requests_madeintegerRequests this minute, this one included, as X-RateLimit-Remaining counts them.
requests_leftinteger
current_dayobjectCredits used in the current UTC day. Only reported; no daily limit applies.
1 child field
credits_usedintegernullableCredits used since 00:00 UTC; null without a monthly allowance.
current_monthobjectCredits used and left in the current credit period, which CoinMarketCap calls the month.
2 child fields
credits_usedintegernullableCredits used this period; it can pass the limit by the cost of requests in flight when the allowance ran out.
credits_leftintegernullable
connectionsobjectThe account's open WebSocket connections and the slots left under connection_limit.
2 child fields
openintegerOpen WebSocket connections of the account.
leftinteger
keysobjectThe account's keys and how many more it may hold under key_limit.
2 child fields
countintegerThe account's keys, disabled ones included.
leftinteger
Headers
X-RateLimit-LimitMaximum requests admitted in the current plan window, which every key of an account shares.X-RateLimit-RemainingRequests remaining in the current plan window, across every key of the account.X-RateLimit-ResetUnix timestamp in seconds when the current plan window resets.Cache-Controlprivate, no-store Prevents every cache, private or shared, from storing the response. Every error response carries it.
Errors
| Status | Code | When | error_code today | From launch |
|---|---|---|---|---|
| 400 | invalid_request | A parameter, body or cursor is invalid. | 1000 | 400 |
| 401 | unauthenticated | The X-API-Key header is missing or empty. | 1001 | 1002 |
| 401 | unauthenticated | The API key is unknown, malformed or deleted. | 1001 | 1001 |
| 402 | payment_required | The account is not activated. | 402 | 1003 |
| 402 | payment_required | The account's paid period has ended unpaid. | 402 | 1004 |
| 403 | forbidden | The API key is disabled or does not resolve to an active plan. | 1002 | 1007 |
| 403 | forbidden | The API key's account is suspended. | 1002 | 1007 |
| 403 | forbidden | The API key lacks a permission the operation needs. | 1002 | 1006 |
| 403 | plan_not_authorized | The API plan does not include the operation. | 403 | 1006 |
| 403 | quota_exceeded | The requested history or page size exceeds the API plan. | 1006 | 1006 |
| 404 | not_found | The resource does not exist or is not published. | 1003 | 404 |
| 429 | rate_limited | The account's per-minute request limit is used up. | 1005 | 1008 |
| 429 | credit_limit_reached | The account's monthly credits are used up. | 429 | 1010 |
| 429 | ip_rate_limited | Too many requests without a valid API key came from this address. | 429 | 1011 |
| 500 | internal_error | The server failed unexpectedly. | 1009 | 500 |
| 503 | source_unavailable | A data or quota store is unavailable, or the service is at capacity. | 1008 | 503 |