{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/coinrithm-com/json-schema/coinrithm-com-public-instrument-markets-schema.json",
  "title": "PublicInstrumentMarkets",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/coinrithm-com-public-market-data-api-openapi.yml#/components/schemas/PublicInstrumentMarkets",
  "type": "object",
  "required": [
    "version",
    "instrument",
    "reference",
    "generatedAt",
    "horizon",
    "groups",
    "crossVenue",
    "shortTerm",
    "coverage",
    "disclaimer"
  ],
  "properties": {
    "version": {
      "type": "integer"
    },
    "instrument": {
      "type": "object",
      "required": [
        "type",
        "id",
        "symbol",
        "name"
      ],
      "properties": {
        "type": {
          "type": "string"
        },
        "id": {
          "type": "string"
        },
        "symbol": {
          "type": "string"
        },
        "name": {
          "type": "string"
        }
      }
    },
    "reference": {
      "type": "object",
      "description": "The live series to read for a current-price marker. The payload carries no price.",
      "required": [
        "kind",
        "key"
      ],
      "properties": {
        "kind": {
          "type": "string",
          "enum": [
            "coin_live_price",
            "tradfi_reference",
            "macro_proxy"
          ]
        },
        "key": {
          "type": "string"
        },
        "label": {
          "type": "string"
        }
      }
    },
    "generatedAt": {
      "type": "string",
      "format": "date-time"
    },
    "horizon": {
      "type": "string",
      "enum": [
        "hour",
        "day",
        "week",
        "month",
        "year",
        "all"
      ]
    },
    "groups": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/PublicInstrumentMarketGroup"
      }
    },
    "crossVenue": {
      "type": "array",
      "description": "Contracts with an equal equivalence key on two or more venues, traded on each leg.",
      "items": {
        "type": "object",
        "additionalProperties": true
      }
    },
    "shortTerm": {
      "type": "object",
      "required": [
        "upDownOpen"
      ],
      "properties": {
        "upDownOpen": {
          "type": "integer",
          "description": "Open short-term up/down markets on this instrument (not ladders)."
        },
        "nextExpiresAt": {
          "type": [
            "string",
            "null"
          ],
          "format": "date-time"
        },
        "venues": {
          "type": "object",
          "additionalProperties": {
            "type": "integer"
          }
        },
        "items": {
          "type": "array",
          "items": {
            "type": "object",
            "additionalProperties": true
          }
        }
      }
    },
    "coverage": {
      "type": "object",
      "required": [
        "venues",
        "ladders",
        "contracts",
        "truncated"
      ],
      "properties": {
        "venues": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "ladders": {
          "type": "integer"
        },
        "contracts": {
          "type": "integer"
        },
        "truncated": {
          "type": "boolean"
        },
        "degraded": {
          "type": "boolean",
          "description": "The contract read failed; render nothing rather than an error."
        },
        "excluded": {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      }
    },
    "disclaimer": {
      "type": "string"
    },
    "meta": {
      "type": "object",
      "properties": {
        "freshUntil": {
          "type": "string",
          "format": "date-time"
        }
      }
    }
  },
  "$defs": {
    "PublicInstrumentMarketContract": {
      "type": "object",
      "required": [
        "label",
        "comparator",
        "unit",
        "tradedRecently"
      ],
      "properties": {
        "outcomeId": {
          "type": [
            "integer",
            "string"
          ]
        },
        "externalMarketId": {
          "type": [
            "string",
            "null"
          ]
        },
        "label": {
          "type": "string",
          "description": "Display text; venue strike values are kept as given (81999.99 = $82,000 or above)."
        },
        "comparator": {
          "type": "string",
          "enum": [
            "gt",
            "gte",
            "lt",
            "lte",
            "between",
            "touch_up",
            "touch_down"
          ]
        },
        "strikeLow": {
          "type": [
            "number",
            "null"
          ]
        },
        "strikeHigh": {
          "type": [
            "number",
            "null"
          ]
        },
        "unit": {
          "type": "string"
        },
        "probability": {
          "type": [
            "number",
            "null"
          ],
          "minimum": 0,
          "maximum": 100
        },
        "bid": {
          "type": [
            "number",
            "null"
          ]
        },
        "ask": {
          "type": [
            "number",
            "null"
          ]
        },
        "contractVolume24h": {
          "type": [
            "number",
            "null"
          ],
          "description": "Kalshi only: contracts ($1 notional each)."
        },
        "contractOpenInterest": {
          "type": [
            "number",
            "null"
          ]
        },
        "tradedRecently": {
          "type": "boolean",
          "description": "False: show as no recent trading, never as a live price."
        },
        "equivalenceKey": {
          "type": [
            "string",
            "null"
          ]
        },
        "eventSlug": {
          "type": [
            "string",
            "null"
          ]
        },
        "parse": {
          "type": "object",
          "properties": {
            "method": {
              "type": "string"
            },
            "parserVersion": {
              "type": "string"
            },
            "confidence": {
              "type": "number"
            }
          }
        }
      }
    },
    "PublicInstrumentMarketGroup": {
      "type": "object",
      "required": [
        "expiresAt",
        "settlementSource",
        "settlementNote",
        "ladders"
      ],
      "properties": {
        "expiresAt": {
          "type": "string",
          "format": "date-time"
        },
        "settlementSource": {
          "type": "string"
        },
        "settlementNote": {
          "type": "string"
        },
        "ladders": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/PublicInstrumentMarketLadder"
          }
        }
      }
    },
    "PublicInstrumentMarketLadder": {
      "type": "object",
      "required": [
        "venue",
        "venueName",
        "series",
        "expiresAt",
        "observation",
        "settlementSource",
        "settlementNote",
        "referenceRelation",
        "monotonic",
        "contracts"
      ],
      "properties": {
        "venue": {
          "type": "string"
        },
        "venueName": {
          "type": "string"
        },
        "series": {
          "type": "string"
        },
        "expiresAt": {
          "type": "string",
          "format": "date-time"
        },
        "windowStartAt": {
          "type": [
            "string",
            "null"
          ],
          "format": "date-time",
          "description": "Null on a touch ladder means the venue's own window rules apply."
        },
        "observation": {
          "type": "string",
          "enum": [
            "at_time",
            "touch"
          ]
        },
        "metric": {
          "type": "string",
          "description": "For example `spot_price` or `futures_settle`."
        },
        "settlementSource": {
          "type": "string"
        },
        "settlementNote": {
          "type": "string"
        },
        "referenceRelation": {
          "type": "string",
          "description": "For example `same_asset_different_feed`, `futures_vs_spot`, `proxy_perp`."
        },
        "referenceNote": {
          "type": [
            "string",
            "null"
          ]
        },
        "asOf": {
          "type": [
            "string",
            "null"
          ],
          "format": "date-time",
          "description": "The venue lane's last observation time."
        },
        "asOfBasis": {
          "type": "string"
        },
        "monotonic": {
          "type": "boolean",
          "description": "False when the venue's traded prices disagree across strikes."
        },
        "events": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "source": {
                "type": "string"
              },
              "slug": {
                "type": "string"
              },
              "title": {
                "type": "string"
              },
              "path": {
                "type": "string"
              },
              "sourceUrl": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "volume24hUsd": {
                "type": [
                  "number",
                  "null"
                ]
              },
              "liquidityUsd": {
                "type": [
                  "number",
                  "null"
                ]
              },
              "openInterestUsd": {
                "type": [
                  "number",
                  "null"
                ]
              }
            }
          }
        },
        "contracts": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/PublicInstrumentMarketContract"
          }
        }
      }
    }
  }
}