{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/tickerz-com/json-schema/tickerz-com-index-detail-response-schema.json",
  "title": "IndexDetailResponse",
  "x-generated": "2026-11-26",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/tickerz-com-openapi.json#/components/schemas/IndexDetailResponse",
  "allOf": [
    {
      "$ref": "#/$defs/IndexSummary"
    },
    {
      "type": "object",
      "properties": {
        "first_print": {
          "type": [
            "object",
            "null"
          ],
          "description": "The newest complete period as first recorded on-chain: final for settlement",
          "properties": {
            "period": {
              "type": "string"
            },
            "value": {
              "type": [
                "number",
                "null"
              ]
            },
            "sealed_day": {
              "type": [
                "string",
                "null"
              ]
            },
            "digest_sha256": {
              "type": [
                "string",
                "null"
              ]
            },
            "bitcoin_height": {
              "type": [
                "integer",
                "null"
              ]
            },
            "proof_url": {
              "type": [
                "string",
                "null"
              ]
            }
          }
        },
        "days": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "period": {
                "type": "string"
              },
              "value": {
                "type": [
                  "number",
                  "null"
                ]
              },
              "provisional": {
                "type": "boolean"
              },
              "change_pct": {
                "type": [
                  "number",
                  "null"
                ]
              },
              "band": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "z": {
                "type": [
                  "number",
                  "null"
                ]
              },
              "settlement_value": {
                "type": [
                  "number",
                  "null"
                ]
              },
              "revised": {
                "type": "string"
              },
              "note": {
                "type": "string",
                "description": "On jobs, unemp, cpi and corecpi only: set on a month loaded as history. Its value is the Bureau of Labor Statistics figure now, it is not the number as first published, and settlement_value is null."
              }
            }
          }
        },
        "round": {
          "type": [
            "object",
            "null"
          ],
          "description": "The open call, points only, no money"
        },
        "seal": {
          "type": [
            "object",
            "null"
          ],
          "properties": {
            "day": {
              "type": "string"
            },
            "digest_sha256": {
              "type": "string"
            },
            "stamped_at": {
              "type": "string"
            },
            "bitcoin_height": {
              "type": [
                "integer",
                "null"
              ]
            }
          }
        },
        "forecast": {
          "type": [
            "object",
            "null"
          ],
          "description": "Forecast v1: the next period's 80% range (p10 to p90) and its middle (p50), from the daily model run in tickerz-open. Display only, never a settled number. null when none.",
          "properties": {
            "period": {
              "type": "string"
            },
            "p10": {
              "type": "number"
            },
            "p50": {
              "type": "number"
            },
            "p90": {
              "type": "number"
            },
            "model": {
              "type": "string"
            },
            "generated_at": {
              "type": "string"
            },
            "backtest": {
              "type": "object",
              "properties": {
                "periods": {
                  "type": "integer"
                },
                "coverage_80": {
                  "type": "number"
                },
                "skill_vs_last_number": {
                  "type": [
                    "number",
                    "null"
                  ]
                }
              }
            },
            "live": {
              "type": "object",
              "properties": {
                "scored": {
                  "type": "integer"
                },
                "inside_80": {
                  "type": "integer"
                }
              }
            },
            "display_only": {
              "type": "boolean"
            },
            "record_url": {
              "type": "string"
            }
          }
        },
        "engine": {
          "type": [
            "object",
            "null"
          ],
          "description": "The engine's forecast and surprise for this index: the next period's 80% range (p10 to p90) and middle, and for the newest complete period the range given before it came in, p (how often a number that far from the middle comes in, two-sided), one_in (about 1 in N, rounded by the engine) and where it landed. Display only, never a settled number. null when the engine has no reading of the number this response carries.",
          "properties": {
            "version": {
              "type": "string"
            },
            "made_at": {
              "type": "string"
            },
            "period_kind": {
              "type": "string",
              "enum": [
                "day",
                "week",
                "month"
              ]
            },
            "next": {
              "type": [
                "object",
                "null"
              ],
              "properties": {
                "period": {
                  "type": "string"
                },
                "p10": {
                  "type": "number"
                },
                "p50": {
                  "type": "number"
                },
                "p90": {
                  "type": "number"
                }
              }
            },
            "newest": {
              "type": [
                "object",
                "null"
              ],
              "properties": {
                "period": {
                  "type": "string"
                },
                "value": {
                  "type": "number"
                },
                "expected": {
                  "type": [
                    "object",
                    "null"
                  ],
                  "properties": {
                    "p10": {
                      "type": "number"
                    },
                    "p50": {
                      "type": "number"
                    },
                    "p90": {
                      "type": "number"
                    }
                  }
                },
                "p": {
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "one_in": {
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "where": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "enum": [
                    "below",
                    "inside",
                    "above",
                    null
                  ]
                },
                "forecast_made_at": {
                  "type": [
                    "string",
                    "null"
                  ]
                }
              }
            },
            "record": {
              "type": "object",
              "properties": {
                "scored": {
                  "type": "integer"
                },
                "inside_80": {
                  "type": "integer"
                }
              }
            },
            "display_only": {
              "type": "boolean"
            }
          }
        },
        "integrity": {
          "type": "object",
          "description": "The source integrity guard: ok, held (a number the source gave waits to be checked; days keeps what was on file), flagged, not_checked or unknown. A held number is never printed until a person checks it.",
          "properties": {
            "status": {
              "type": "string",
              "enum": [
                "ok",
                "held",
                "flagged",
                "not_checked",
                "unknown"
              ]
            },
            "checked_at": {
              "type": [
                "string",
                "null"
              ]
            },
            "held": {
              "type": "array",
              "items": {
                "$ref": "#/$defs/IntegrityFlag"
              }
            },
            "flags": {
              "type": "array",
              "items": {
                "$ref": "#/$defs/IntegrityFlag"
              }
            }
          }
        }
      }
    }
  ],
  "$defs": {
    "IndexSummary": {
      "type": "object",
      "description": "One index as GET /indices serves it.",
      "properties": {
        "ticker": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "family": {
          "type": [
            "string",
            "null"
          ],
          "enum": [
            "vice",
            "hard-times",
            "mind",
            "streets",
            "wild",
            "net",
            "planet",
            "markets",
            "power",
            null
          ],
          "description": "The index's family on /x (tickerz.com/x?f={family})"
        },
        "counts": {
          "type": "string"
        },
        "unit": {
          "type": "string"
        },
        "cadence": {
          "type": "string"
        },
        "period": {
          "type": "string",
          "enum": [
            "day",
            "week",
            "month"
          ]
        },
        "source": {
          "type": "object",
          "properties": {
            "name": {
              "type": "string"
            },
            "url": {
              "type": "string"
            },
            "terms": {
              "type": "string"
            },
            "terms_url": {
              "type": [
                "string",
                "null"
              ]
            },
            "attribution": {
              "type": [
                "string",
                "null"
              ]
            }
          }
        },
        "latest": {
          "type": [
            "object",
            "null"
          ],
          "description": "The newest period read, provisional or not",
          "properties": {
            "period": {
              "type": "string"
            },
            "value": {
              "type": [
                "number",
                "null"
              ]
            },
            "provisional": {
              "type": "boolean"
            },
            "change_pct": {
              "type": [
                "number",
                "null"
              ]
            },
            "change_vs": {
              "type": [
                "string",
                "null"
              ]
            },
            "score": {
              "type": [
                "number",
                "null"
              ]
            },
            "z": {
              "type": [
                "number",
                "null"
              ]
            }
          }
        },
        "latest_complete": {
          "type": [
            "object",
            "null"
          ],
          "description": "The newest complete period",
          "properties": {
            "period": {
              "type": "string"
            },
            "value": {
              "type": [
                "number",
                "null"
              ]
            },
            "score": {
              "type": [
                "number",
                "null"
              ]
            },
            "z": {
              "type": [
                "number",
                "null"
              ]
            },
            "band": {
              "type": [
                "string",
                "null"
              ]
            }
          }
        },
        "settlement": {
          "type": "object",
          "description": "The settlement rule; see_only is true where a count of harm is published and never called",
          "properties": {
            "grade": {
              "type": "string",
              "enum": [
                "candidate",
                "reference",
                "display"
              ]
            },
            "see_only": {
              "type": "boolean"
            },
            "version": {
              "type": "string"
            }
          }
        },
        "url": {
          "type": "string",
          "format": "uri"
        },
        "spark": {
          "type": "array",
          "description": "The last 30 complete periods",
          "items": {
            "type": "object",
            "properties": {
              "period": {
                "type": "string"
              },
              "value": {
                "type": [
                  "number",
                  "null"
                ]
              },
              "band": {
                "type": [
                  "string",
                  "null"
                ]
              }
            }
          }
        }
      },
      "additionalProperties": true
    },
    "IntegrityFlag": {
      "type": "object",
      "description": "One integrity flag. read and on_file are left out where the source's terms keep levels out of the API.",
      "properties": {
        "kind": {
          "type": "string"
        },
        "period": {
          "type": "string"
        },
        "source": {
          "type": "string"
        },
        "code": {
          "type": [
            "string",
            "null"
          ]
        },
        "read": {
          "type": [
            "number",
            "null"
          ]
        },
        "on_file": {
          "type": [
            "number",
            "null"
          ]
        },
        "detail": {
          "type": "string"
        }
      }
    }
  }
}