{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/cryptodataapi-com/json-schema/cryptodataapi-com-signum-rgg-detail-response-schema.json",
  "title": "SignumRggDetailResponse",
  "x-generated": "2026-10-30",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/cryptodataapi-com-openapi.json#/components/schemas/SignumRggDetailResponse",
  "properties": {
    "symbol": {
      "type": "string",
      "title": "Symbol"
    },
    "source": {
      "type": "string",
      "enum": [
        "binance_spot",
        "hyperliquid_perp"
      ],
      "title": "Source"
    },
    "color": {
      "type": "string",
      "enum": [
        "red",
        "grey",
        "green"
      ],
      "title": "Color"
    },
    "days_in_color": {
      "type": "integer",
      "title": "Days In Color"
    },
    "flipped_at": {
      "type": "string",
      "title": "Flipped At"
    },
    "pct_change_since_flip": {
      "type": "number",
      "title": "Pct Change Since Flip"
    },
    "range": {
      "$ref": "#/$defs/SignumRange",
      "nullable": true
    },
    "adx": {
      "type": "number",
      "title": "Adx"
    },
    "plus_di": {
      "type": "number",
      "title": "Plus Di"
    },
    "minus_di": {
      "type": "number",
      "title": "Minus Di"
    },
    "price": {
      "type": "number",
      "title": "Price"
    },
    "intraday_color": {
      "title": "Intraday Color",
      "type": [
        "string",
        "null"
      ],
      "enum": [
        "red",
        "grey",
        "green"
      ]
    },
    "intraday_timeframe": {
      "title": "Intraday Timeframe",
      "type": [
        "string",
        "null"
      ]
    },
    "intraday_adx": {
      "title": "Intraday Adx",
      "type": [
        "number",
        "null"
      ]
    },
    "intraday_plus_di": {
      "title": "Intraday Plus Di",
      "type": [
        "number",
        "null"
      ]
    },
    "intraday_minus_di": {
      "title": "Intraday Minus Di",
      "type": [
        "number",
        "null"
      ]
    },
    "flip_alert": {
      "type": "boolean",
      "title": "Flip Alert",
      "default": false
    },
    "color_live": {
      "title": "Color Live",
      "description": "Colour including the forming UTC bar (the pre-2026-09-09 read)",
      "type": [
        "string",
        "null"
      ],
      "enum": [
        "red",
        "grey",
        "green"
      ]
    },
    "adx_live": {
      "title": "Adx Live",
      "type": [
        "number",
        "null"
      ]
    },
    "days_in_color_live": {
      "title": "Days In Color Live",
      "type": [
        "integer",
        "null"
      ]
    },
    "is_final": {
      "type": "boolean",
      "title": "Is Final",
      "description": "Always true: headline fields are from completed bars",
      "default": true
    },
    "computed_from": {
      "title": "Computed From",
      "description": "YYYY-MM-DD of the last completed daily bar the headline fields use",
      "type": [
        "string",
        "null"
      ]
    },
    "pegged": {
      "type": "boolean",
      "title": "Pegged",
      "description": "Stablecoin / $1-pinned token; excluded from breadth + top lists",
      "default": false
    },
    "intraday_disagrees": {
      "type": "boolean",
      "title": "Intraday Disagrees",
      "description": "Alias of flip_alert: last 4 closed 1h bars all disagree with color",
      "default": false
    },
    "recent_flip": {
      "type": "boolean",
      "title": "Recent Flip",
      "description": "days_in_color <= 3",
      "default": false
    },
    "flip_alert_reason": {
      "title": "Flip Alert Reason",
      "description": "\"intraday_disagrees\" when flip_alert is true, else null",
      "type": [
        "string",
        "null"
      ]
    },
    "h4_color": {
      "title": "H4 Color",
      "description": "4h SIGNUM colour, completed 4h bars only",
      "type": [
        "string",
        "null"
      ],
      "enum": [
        "red",
        "grey",
        "green"
      ]
    },
    "h4_adx": {
      "title": "H4 Adx",
      "type": [
        "number",
        "null"
      ]
    },
    "h4_plus_di": {
      "title": "H4 Plus Di",
      "type": [
        "number",
        "null"
      ]
    },
    "h4_minus_di": {
      "title": "H4 Minus Di",
      "type": [
        "number",
        "null"
      ]
    },
    "h4_bars_in_color": {
      "title": "H4 Bars In Color",
      "description": "Completed 4h bars since the 4h colour last changed",
      "type": [
        "integer",
        "null"
      ]
    },
    "h4_computed_from": {
      "title": "H4 Computed From",
      "description": "ISO open time of the last completed 4h bar used",
      "type": [
        "string",
        "null"
      ]
    },
    "history": {
      "items": {
        "$ref": "#/$defs/SignumHistoryEntry"
      },
      "type": "array",
      "title": "History"
    },
    "intraday_history": {
      "items": {
        "$ref": "#/$defs/SignumIntradayHistoryEntry"
      },
      "type": "array",
      "title": "Intraday History",
      "default": []
    },
    "h4_history": {
      "items": {
        "$ref": "#/$defs/SignumIntradayHistoryEntry"
      },
      "type": "array",
      "title": "H4 History",
      "default": []
    },
    "rule_params": {
      "$ref": "#/$defs/SignumRuleParams"
    },
    "timestamp": {
      "type": "string",
      "title": "Timestamp"
    }
  },
  "type": "object",
  "required": [
    "symbol",
    "source",
    "color",
    "days_in_color",
    "flipped_at",
    "pct_change_since_flip",
    "adx",
    "plus_di",
    "minus_di",
    "price",
    "history",
    "rule_params",
    "timestamp"
  ],
  "$defs": {
    "SignumHistoryEntry": {
      "properties": {
        "date": {
          "type": "string",
          "title": "Date"
        },
        "color": {
          "type": "string",
          "enum": [
            "red",
            "grey",
            "green"
          ],
          "title": "Color"
        }
      },
      "type": "object",
      "required": [
        "date",
        "color"
      ],
      "title": "SignumHistoryEntry"
    },
    "SignumIntradayHistoryEntry": {
      "properties": {
        "ts": {
          "type": "string",
          "title": "Ts"
        },
        "color": {
          "type": "string",
          "enum": [
            "red",
            "grey",
            "green"
          ],
          "title": "Color"
        },
        "adx": {
          "type": "number",
          "title": "Adx"
        },
        "plus_di": {
          "type": "number",
          "title": "Plus Di"
        },
        "minus_di": {
          "type": "number",
          "title": "Minus Di"
        }
      },
      "type": "object",
      "required": [
        "ts",
        "color",
        "adx",
        "plus_di",
        "minus_di"
      ],
      "title": "SignumIntradayHistoryEntry"
    },
    "SignumRange": {
      "properties": {
        "low": {
          "type": "number",
          "title": "Low"
        },
        "high": {
          "type": "number",
          "title": "High"
        },
        "width_pct": {
          "type": "number",
          "title": "Width Pct"
        }
      },
      "type": "object",
      "required": [
        "low",
        "high",
        "width_pct"
      ],
      "title": "SignumRange"
    },
    "SignumRuleParams": {
      "properties": {
        "period": {
          "type": "integer",
          "title": "Period"
        },
        "upper": {
          "type": "number",
          "title": "Upper"
        },
        "lower": {
          "type": "number",
          "title": "Lower"
        },
        "range_lookback": {
          "type": "integer",
          "title": "Range Lookback"
        }
      },
      "type": "object",
      "required": [
        "period",
        "upper",
        "lower",
        "range_lookback"
      ],
      "title": "SignumRuleParams"
    }
  }
}