Skip to content
Docs
Get API Access
Browse the Documentation

API Reference

Simple

Convenience price lookups.

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

Get latest prices for stable asset IDs

GEThttps://api.cantoncap.cc/v1/simple/price
getSimplePriceETag

Parameters

idsstringqueryrequired

One to 100 distinct stable CantonCap asset IDs, comma-separated. Unknown and unpublished IDs are omitted without revealing private records.

Comma-separated, up to 100 values, each distinct
convertstringqueryoptional

One ISO-style quote currency code, or a comma-delimited set where the operation explicitly documents a bounded collection.

DefaultUSDComma-separated, up to 3 values, each distinct
If-None-Matchstringheaderoptional

Return 304 when this entity tag matches the current representation.

Request

curl -s "https://api.cantoncap.cc/v1/simple/price?ids=ast_515c3eaa72bd4a8b9403297879d78ef6,ast_2d9c41e0b7a64f1e9c3b5a8d7e6f1c20&convert=USD" \
  -H "X-API-Key: $CANTONCAP_API_KEY"

Response

200 Latest prices keyed by stable asset ID. 304 when If-None-Match matches.

Example Response
{
  "status": {
    "timestamp": "2026-10-11T14:00:00.000Z",
    "elapsed_ms": 18,
    "error_code": 0,
    "error_message": null,
    "request_id": "req_7Hk2pQ9xLm"
  },
  "data": {
    "ast_515c3eaa72bd4a8b9403297879d78ef6": {
      "USD": {
        "price": "0.1584",
        "last_updated_at": "2026-10-11T14:00:00.000Z"
      }
    }
  }
}
  • datamap
    3 child fields
    • {asset_id}map

      One entry per requested asset ID the API can price, keyed by currency code. IDs it cannot answer for are left out.

      2 child fields
      • pricedecimal string

        Price as an exact decimal string.

      • last_updated_atdate-time

        Time of the latest represented update. For calculated asset prices it is the stored calculation time. Decide acceptable age from it.

Headers

  • X-RateLimit-Limit Requests allowed in the current one-minute window.
  • X-RateLimit-Remaining Requests left in the window.
  • X-RateLimit-Reset Unix time, in seconds, when the window resets.
  • ETag Entity tag of this representation. Send it back in If-None-Match.
  • Cache-Control private, no-cache: shared caches must not store the answer.
  • Vary X-API-Key: the answer varies by key.

Errors

StatusCodeWhen
400invalid_requestRequest validation failedA parameter is malformed, out of bounds or not one of its allowed values.
401unauthenticatedA valid API key is requiredX-API-Key is missing or unknown.
403forbiddenThe API key does not resolve to an active planThe key expired, was suspended or has not started.
429rate_limitedThe request rate limit was exceededThe key's one-minute window is used up. Retry after Retry-After seconds.
Esc
navigateopenEscclose