{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/api-ninjas-com/json-schema/api-ninjas-com-crypto-treasury-response-schema.json",
  "title": "CryptoTreasuryResponse",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/api-ninjas-com-bitcoin-api-openapi.yml#/components/schemas/CryptoTreasuryResponse",
  "type": "object",
  "properties": {
    "results": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/CryptoTreasuryPosition"
      }
    },
    "count": {
      "type": "integer",
      "description": "Number of results returned."
    },
    "data_last_refreshed": {
      "type": "integer",
      "description": "Unix timestamp of the last successful ingestion run."
    },
    "note": {
      "type": "string",
      "description": "Present when unverified filings were excluded."
    },
    "disclosure": {
      "$ref": "#/$defs/CryptoTreasuryDisclosure"
    },
    "upgrade_hint": {
      "type": "string",
      "description": "Present on the Free tier."
    }
  },
  "$defs": {
    "CryptoTreasuryAttribution": {
      "type": "object",
      "description": "How each figure was derived, so callers can audit rather than trust.",
      "properties": {
        "asset_source": {
          "type": "string",
          "description": "dimensional_member when the filing tagged the asset explicitly; unit_string when the XBRL unit named it; valuation_inference when identified by matching implied unit price to the period-end market close; unknown when undetermined."
        },
        "units_basis": {
          "type": "string",
          "description": "How overlapping unit facts were collapsed: single_fact, stated_total, undimensioned_total, summed_components, labelled_total or max_of_ambiguous."
        },
        "units_facts_reconciled": {
          "type": "integer",
          "description": "How many raw XBRL facts were reconciled into this figure."
        },
        "recovered_from_instance_document": {
          "type": "boolean",
          "description": "True when recovered by parsing the filing's XBRL instance because SEC's JSON APIs do not expose it."
        },
        "quality": {
          "type": "string",
          "description": "consistent, unverified, scale_suspect or inconsistent."
        },
        "implied_unit_price_usd": {
          "type": [
            "number",
            "null"
          ],
          "description": "Reported fair value divided by reported units."
        },
        "market_price_at_period_end_usd": {
          "type": [
            "number",
            "null"
          ],
          "description": "Market close for the asset on the period end date."
        },
        "warning": {
          "type": "string",
          "description": "Present when quality is scale_suspect or inconsistent."
        }
      }
    },
    "CryptoTreasuryDisclosure": {
      "type": "object",
      "properties": {
        "source": {
          "type": "string"
        },
        "license": {
          "type": "string",
          "description": "Grants storage, redistribution and commercial display."
        },
        "not_advice": {
          "type": "string"
        }
      }
    },
    "CryptoTreasuryPosition": {
      "type": "object",
      "properties": {
        "entity_name": {
          "type": "string",
          "description": "Filer name as it appears in EDGAR."
        },
        "ticker": {
          "type": [
            "string",
            "null"
          ],
          "description": "Stock ticker."
        },
        "cik": {
          "type": "string",
          "description": "SEC Central Index Key, zero-padded to 10 digits."
        },
        "entity_type": {
          "type": "string",
          "description": "OPERATING, ETP or PRIVATE."
        },
        "asset": {
          "type": "string",
          "description": "Canonical asset name, e.g. BITCOIN."
        },
        "units": {
          "type": "number",
          "description": "Number of coins held at the period end."
        },
        "fair_value_usd": {
          "type": [
            "number",
            "null"
          ],
          "description": "Value of THIS asset position."
        },
        "cost_usd": {
          "type": [
            "number",
            "null"
          ],
          "description": "Cost basis as reported."
        },
        "entity_total_crypto_fair_value_usd": {
          "type": [
            "number",
            "null"
          ],
          "description": "The filer's total crypto fair value across all assets."
        },
        "entity_holds_multiple_assets": {
          "type": "boolean",
          "description": "True when the filer reported more than one crypto asset for this period."
        },
        "period_end": {
          "type": "string",
          "description": "Reporting period end, YYYY-MM-DD. Positions are quarterly and may be materially stale."
        },
        "calendar_year": {
          "type": [
            "integer",
            "null"
          ],
          "description": "Calendar year of the reporting period. Not the filer's fiscal year."
        },
        "calendar_quarter": {
          "type": [
            "string",
            "null"
          ],
          "description": "Calendar quarter, Q1 to Q4. Not the filer's fiscal quarter."
        },
        "accession": {
          "type": [
            "string",
            "null"
          ],
          "description": "SEC accession number of the source filing."
        },
        "sec_filing_url": {
          "type": [
            "string",
            "null"
          ],
          "description": "Link to the source filing on EDGAR."
        },
        "attribution": {
          "$ref": "#/$defs/CryptoTreasuryAttribution"
        }
      }
    }
  }
}