{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/tickerz-com/json-schema/tickerz-com-receipt-proof-schema.json",
  "title": "ReceiptProof",
  "x-generated": "2026-11-26",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/tickerz-com-openapi.json#/components/schemas/ReceiptProof",
  "type": "object",
  "properties": {
    "event_id": {
      "type": "string",
      "format": "uuid"
    },
    "horizon": {
      "type": "string",
      "enum": [
        "open",
        "24h",
        "7d",
        "30d"
      ],
      "description": "open is the event as called at open; 24h, 7d and 30d are the resolved receipts"
    },
    "digest_sha256": {
      "type": "string",
      "description": "SHA-256 of canonical_json"
    },
    "canonical": {
      "type": "object",
      "description": "The stamped record. Receipts: event_id, symbol, opened_at, open_price, horizon, resolved_at, ret_pct. Open: event_id, symbol, opened_at, open_price, horizon, score_at_open, trigger_z_vol, trigger_z_move. Stored as jsonb, so key order here is not the hashed order; use canonical_json open_price is the price the event opened at, fixed and hashed at open; it is served here only as part of the stamped record, so the digest can be checked."
    },
    "canonical_json": {
      "type": [
        "string",
        "null"
      ],
      "description": "The exact bytes that were hashed: compact JSON with keys in the documented order. sha256(canonical_json) equals digest_sha256"
    },
    "bitcoin_height": {
      "type": [
        "integer",
        "null"
      ],
      "description": "Bitcoin block height once the stamp upgrades, else null"
    },
    "bitcoin_block_time": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "stamped_at": {
      "type": "string",
      "format": "date-time"
    },
    "upgraded_at": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "ots_url": {
      "type": "string",
      "description": "Same endpoint with format=ots"
    },
    "verify": {
      "type": "string",
      "format": "uri"
    }
  }
}