{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/coinxview-com/json-schema/coinxview-com-coin-detail-schema.json",
  "title": "CoinDetail",
  "x-generated": "2026-11-29",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/coinxview-com-openapi.json#/components/schemas/CoinDetail",
  "allOf": [
    {
      "$ref": "#/$defs/Coin"
    },
    {
      "type": "object",
      "properties": {
        "high_24h_usd": {
          "type": [
            "number",
            "null"
          ],
          "description": "24h high in USD."
        },
        "low_24h_usd": {
          "type": [
            "number",
            "null"
          ],
          "description": "24h low in USD."
        },
        "change_30d": {
          "type": [
            "number",
            "null"
          ],
          "description": "Price change over 30 days, percent."
        },
        "total_supply": {
          "type": [
            "number",
            "null"
          ],
          "description": "Total supply."
        },
        "max_supply": {
          "type": [
            "number",
            "null"
          ],
          "description": "Maximum supply."
        },
        "risk_score": {
          "type": [
            "integer",
            "null"
          ],
          "description": "Same value as risk (kept for compatibility)."
        },
        "markets": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/Market"
          }
        }
      }
    }
  ],
  "$defs": {
    "Coin": {
      "type": "object",
      "properties": {
        "rank": {
          "type": [
            "integer",
            "null"
          ],
          "description": "Display rank by market cap (null for wrapped coins and tokenized stocks)."
        },
        "symbol": {
          "type": "string",
          "description": "Ticker symbol."
        },
        "name": {
          "type": "string",
          "description": "Coin name."
        },
        "price_usd": {
          "type": [
            "number",
            "null"
          ],
          "description": "Volume-weighted price across tracked exchanges, in USD."
        },
        "change_1h": {
          "type": [
            "number",
            "null"
          ],
          "description": "Price change over 1 hour, percent."
        },
        "change_24h": {
          "type": [
            "number",
            "null"
          ],
          "description": "Price change over 24 hours, percent."
        },
        "change_7d": {
          "type": [
            "number",
            "null"
          ],
          "description": "Price change over 7 days, percent."
        },
        "market_cap_usd": {
          "type": [
            "number",
            "null"
          ],
          "description": "Market cap in USD."
        },
        "volume_24h_usd": {
          "type": [
            "number",
            "null"
          ],
          "description": "24h trading volume in USD."
        },
        "circulating_supply": {
          "type": [
            "number",
            "null"
          ],
          "description": "Circulating supply."
        },
        "ath_usd": {
          "type": [
            "number",
            "null"
          ],
          "description": "All-time high on the exchanges CoinXview tracks, in USD."
        },
        "ath_change_pct": {
          "type": [
            "number",
            "null"
          ],
          "description": "Percent below (negative) the all-time high."
        },
        "exchanges": {
          "type": [
            "integer",
            "null"
          ],
          "description": "Number of exchanges listing the coin."
        },
        "stablecoin": {
          "type": "boolean",
          "description": "True for stablecoins."
        },
        "wrapped": {
          "type": "boolean",
          "description": "True for wrapped / staked derivative tokens."
        },
        "url": {
          "type": "string",
          "description": "Coin page on coinxview.com.",
          "format": "uri"
        },
        "risk": {
          "type": [
            "integer",
            "null"
          ],
          "description": "CoinXview Risk Score, 0-100 (higher = riskier).",
          "minimum": 0,
          "maximum": 100
        },
        "risk_level": {
          "type": [
            "string",
            "null"
          ],
          "enum": [
            "low",
            "medium",
            "high",
            "very_high",
            null
          ],
          "description": "low <= 40, medium <= 60, high <= 80, otherwise very_high."
        }
      }
    },
    "Market": {
      "type": "object",
      "properties": {
        "exchange": {
          "type": "string",
          "description": "Exchange name."
        },
        "quote": {
          "type": "string",
          "description": "Quote currency of the pair, e.g. USDT."
        },
        "price_usd": {
          "type": [
            "number",
            "null"
          ],
          "description": "Price on this exchange in USD."
        },
        "volume_24h_usd": {
          "type": [
            "number",
            "null"
          ],
          "description": "24h volume on this exchange in USD."
        },
        "share_pct": {
          "type": [
            "number",
            "null"
          ],
          "description": "Share of the coin's total volume, percent."
        }
      }
    }
  }
}