{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://trends.polyhelper.ai/api/v1/en/council.schema.json",
  "title": "Council 10 — Markets: /api/v1/<lang>/council.json",
  "description": "Schema 1 (16.10.2026). Times ISO UTC with Z, plus tz. null = not yet; missing:true = no forecast for this item (do not show it as hold). A field without a translation is absent, never English. Asset code UPPER case in the API, lower case in URLs and deeplink params. assets[].now.price and GET <quotes.live_url> give one and the same number. The full version (today's plans) is served with the header X-Poly-Client: app-v1; without it today's plans are cut (cut:true) as on the site's gated page.",
  "type": "object",
  "required": [
    "schema",
    "kind",
    "lang",
    "generated_at",
    "issue",
    "run_id",
    "tz",
    "status",
    "pinned",
    "gate",
    "modes_note",
    "modes",
    "quotes",
    "assets",
    "url"
  ],
  "properties": {
    "schema": {
      "const": 1
    },
    "kind": {
      "const": "council"
    },
    "lang": {
      "enum": [
        "en",
        "zh",
        "hi",
        "es",
        "fr",
        "pt",
        "ru",
        "de",
        "ja",
        "ko",
        "uk"
      ]
    },
    "generated_at": {
      "$ref": "#/$defs/time"
    },
    "etag_hint": {
      "type": "string"
    },
    "issue": {
      "type": "string",
      "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
    },
    "run_id": {
      "type": "string",
      "pattern": "^\\d{4}-\\d{2}-\\d{2}-(am|eve|btc|radar)$"
    },
    "tz": {
      "const": "America/New_York"
    },
    "next_at": {
      "$ref": "#/$defs/time_or_null"
    },
    "next_issue": {
      "description": "Which issue is next, by the schedule in council.json; label is in the language of the file.",
      "type": ["object", "null"],
      "properties": {
        "kind": {
          "enum": ["weekday", "btc_weekend", "radar"]
        },
        "label": {
          "type": "string"
        }
      }
    },
    "status": {
      "enum": [
        "asking",
        "morning",
        "late_added",
        "scored"
      ]
    },
    "pinned": {
      "type": "boolean"
    },
    "cut": {
      "type": "boolean",
      "description": "true: the version without X-Poly-Client: app-v1 — today's plans removed"
    },
    "gate": {
      "type": "object",
      "required": [
        "live"
      ],
      "properties": {
        "live": {
          "type": "object",
          "properties": {
            "android": {
              "type": [
                "string",
                "null"
              ]
            },
            "ios": {
              "type": [
                "string",
                "null"
              ]
            }
          }
        },
        "free_days": {
          "type": "integer"
        }
      }
    },
    "seal": {
      "type": [
        "object",
        "null"
      ],
      "properties": {
        "at": {
          "$ref": "#/$defs/time"
        },
        "hash": {
          "type": "string"
        },
        "proof": {
          "type": "string"
        },
        "ots": {
          "type": [
            "string",
            "null"
          ]
        }
      }
    },
    "modes_note": {
      "type": "string"
    },
    "modes": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "seat",
          "model",
          "mode"
        ],
        "properties": {
          "seat": {
            "type": "string"
          },
          "model": {
            "type": "string"
          },
          "mode": {
            "type": "string"
          },
          "deep": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      }
    },
    "digest": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "heat": {
      "type": [
        "object",
        "null"
      ],
      "properties": {
        "dispute_0_100": {
          "type": "integer",
          "minimum": 0,
          "maximum": 100
        },
        "mood": {
          "enum": [
            "bearish",
            "mildly_bearish",
            "neutral",
            "mildly_bullish",
            "bullish"
          ]
        }
      }
    },
    "dispute": {
      "type": [
        "object",
        "null"
      ],
      "properties": {
        "asset": {
          "$ref": "#/$defs/code"
        },
        "horizon": {
          "$ref": "#/$defs/horizon"
        },
        "title": {
          "type": "string"
        },
        "plain": {
          "type": "string"
        },
        "us_up": {
          "type": "integer"
        },
        "cn_up": {
          "type": "integer"
        },
        "duel_id": {
          "type": [
            "string",
            "null"
          ]
        },
        "event": {
          "$ref": "#/$defs/event"
        }
      }
    },
    "carousel": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/code"
      }
    },
    "free_asset": {
      "oneOf": [
        {
          "$ref": "#/$defs/code"
        },
        {
          "type": "null"
        }
      ]
    },
    "quotes": {
      "type": "object",
      "required": [
        "as_of",
        "delay_min",
        "live_url"
      ],
      "properties": {
        "as_of": {
          "$ref": "#/$defs/time_or_null"
        },
        "delay_min": {
          "type": "integer"
        },
        "source": {
          "type": "string"
        },
        "live_url": {
          "type": "string"
        }
      }
    },
    "assets": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/asset"
      }
    },
    "evening": {
      "type": [
        "object",
        "null"
      ],
      "properties": {
        "at": {
          "$ref": "#/$defs/time"
        },
        "rows": {
          "type": "array",
          "items": {
            "type": "object",
            "required": [
              "asset"
            ],
            "properties": {
              "asset": {
                "$ref": "#/$defs/code"
              },
              "1d": {
                "$ref": "#/$defs/evening_h"
              },
              "1w": {
                "$ref": "#/$defs/evening_h"
              },
              "1m": {
                "$ref": "#/$defs/evening_h"
              },
              "6m": {
                "$ref": "#/$defs/evening_h"
              }
            }
          }
        },
        "portfolio_changes": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "seat": {
                "type": "string"
              },
              "asset": {
                "$ref": "#/$defs/code"
              },
              "from": {
                "$ref": "#/$defs/action"
              },
              "to": {
                "$ref": "#/$defs/action"
              }
            }
          }
        },
        "session": {
          "type": "string"
        }
      }
    },
    "context": {
      "type": [
        "object",
        "null"
      ],
      "properties": {
        "futures": {
          "type": "object",
          "additionalProperties": {
            "type": [
              "number",
              "null"
            ]
          }
        },
        "RUT": {
          "type": [
            "number",
            "null"
          ]
        }
      }
    },
    "league": {
      "type": [
        "object",
        "null"
      ],
      "properties": {
        "url": {
          "type": "string"
        },
        "history": {
          "type": "string"
        },
        "top5": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "seat": {
                "type": "string"
              },
              "name": {
                "type": "string"
              },
              "dir_pct": {
                "type": [
                  "number",
                  "null"
                ]
              },
              "n": {
                "type": "integer"
              },
              "stars": {
                "type": [
                  "integer",
                  "null"
                ]
              }
            }
          }
        }
      }
    },
    "url": {
      "type": "string"
    },
    "deeplink": {
      "type": "string"
    },
    "share": {
      "type": [
        "object",
        "null"
      ],
      "properties": {
        "title": {
          "type": "string"
        },
        "image": {
          "type": [
            "string",
            "null"
          ]
        }
      }
    },
    "votes": {
      "type": "object",
      "properties": {
        "url": {
          "type": "string"
        },
        "post": {
          "type": "string"
        },
        "tally": {
          "type": "string"
        }
      }
    }
  },
  "$defs": {
    "time": {
      "type": "string",
      "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}Z$"
    },
    "time_or_null": {
      "oneOf": [
        {
          "$ref": "#/$defs/time"
        },
        {
          "type": "null"
        }
      ]
    },
    "code": {
      "enum": [
        "SPX",
        "NDX",
        "DJI",
        "SOX",
        "US10Y",
        "DXY",
        "VIX",
        "GOLD",
        "WTI",
        "BRENT",
        "COPPER",
        "BTC"
      ]
    },
    "horizon": {
      "enum": [
        "1d",
        "1w",
        "1m",
        "6m"
      ]
    },
    "action": {
      "enum": [
        "buy_strong",
        "buy_dips",
        "hold",
        "trim",
        "sell"
      ]
    },
    "plan": {
      "type": "object",
      "required": [
        "missing"
      ],
      "properties": {
        "action": {
          "oneOf": [
            {
              "$ref": "#/$defs/action"
            },
            {
              "type": "null"
            }
          ]
        },
        "hedge": {
          "type": [
            "boolean",
            "null"
          ]
        },
        "exp_pct": {
          "type": [
            "number",
            "null"
          ]
        },
        "prob_up": {
          "type": [
            "number",
            "null"
          ],
          "minimum": 0,
          "maximum": 100
        },
        "target": {
          "type": [
            "number",
            "null"
          ]
        },
        "invalidation": {
          "type": [
            "number",
            "null"
          ]
        },
        "revise_if": {
          "type": [
            "string",
            "null"
          ]
        },
        "reason": {
          "type": [
            "string",
            "null"
          ]
        },
        "own_view": {
          "type": [
            "string",
            "null"
          ]
        },
        "risk": {
          "type": [
            "string",
            "null"
          ]
        },
        "sources": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "rumor": {
          "type": [
            "boolean",
            "null"
          ]
        },
        "changed": {
          "type": [
            "boolean",
            "null"
          ]
        },
        "why_changed": {
          "type": [
            "string",
            "null"
          ]
        },
        "missing": {
          "type": "boolean"
        },
        "flags": {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      }
    },
    "consensus": {
      "type": "object",
      "properties": {
        "action": {
          "oneOf": [
            {
              "$ref": "#/$defs/action"
            },
            {
              "type": "null"
            }
          ]
        },
        "count": {
          "type": "integer"
        },
        "of": {
          "type": "integer"
        },
        "poly": {
          "type": "object",
          "properties": {
            "world": {
              "type": [
                "number",
                "null"
              ]
            },
            "us": {
              "type": [
                "number",
                "null"
              ]
            },
            "cn": {
              "type": [
                "number",
                "null"
              ]
            }
          }
        },
        "live": {
          "enum": [
            "on_track",
            "against",
            null
          ]
        }
      }
    },
    "asset": {
      "type": "object",
      "required": [
        "code",
        "class",
        "name",
        "unit",
        "snapshot",
        "now",
        "consensus",
        "models"
      ],
      "properties": {
        "code": {
          "$ref": "#/$defs/code"
        },
        "class": {
          "enum": [
            "index",
            "rate",
            "fx",
            "volatility",
            "commodity",
            "crypto"
          ]
        },
        "name": {
          "type": "string"
        },
        "what": {
          "type": "string"
        },
        "unit": {
          "type": "string"
        },
        "ref_rule": {
          "type": "string"
        },
        "close_rule": {
          "type": "string"
        },
        "tv_symbol": {
          "type": "string"
        },
        "proxy": {
          "type": "boolean"
        },
        "snapshot": {
          "type": [
            "object",
            "null"
          ],
          "properties": {
            "price": {
              "type": [
                "number",
                "null"
              ]
            },
            "at": {
              "$ref": "#/$defs/time_or_null"
            },
            "chg_day_pct": {
              "type": [
                "number",
                "null"
              ]
            },
            "source": {
              "type": "string"
            }
          }
        },
        "now": {
          "type": [
            "object",
            "null"
          ],
          "properties": {
            "price": {
              "type": [
                "number",
                "null"
              ]
            },
            "chg_day_pct": {
              "type": [
                "number",
                "null"
              ]
            },
            "chg_since_seal_pct": {
              "type": [
                "number",
                "null"
              ]
            },
            "at": {
              "$ref": "#/$defs/time_or_null"
            },
            "stale": {
              "type": "boolean"
            },
            "source": {
              "type": "string"
            },
            "delay_min": {
              "type": "integer"
            }
          }
        },
        "signal_1_10": {
          "type": [
            "integer",
            "null"
          ],
          "minimum": 1,
          "maximum": 10
        },
        "one_voice": {
          "type": "boolean"
        },
        "consensus": {
          "type": "object",
          "properties": {
            "1d": {
              "$ref": "#/$defs/consensus"
            },
            "1w": {
              "$ref": "#/$defs/consensus"
            },
            "1m": {
              "$ref": "#/$defs/consensus"
            },
            "6m": {
              "$ref": "#/$defs/consensus"
            }
          }
        },
        "models": {
          "type": "array",
          "items": {
            "type": "object",
            "required": [
              "seat",
              "name",
              "side",
              "plan"
            ],
            "properties": {
              "seat": {
                "type": "string"
              },
              "name": {
                "type": "string"
              },
              "side": {
                "enum": [
                  "US",
                  "CN"
                ]
              },
              "model": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "mode": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "at": {
                "$ref": "#/$defs/time_or_null"
              },
              "late": {
                "type": "boolean"
              },
              "plan": {
                "type": "object",
                "properties": {
                  "1d": {
                    "$ref": "#/$defs/plan"
                  },
                  "1w": {
                    "$ref": "#/$defs/plan"
                  },
                  "1m": {
                    "$ref": "#/$defs/plan"
                  },
                  "6m": {
                    "$ref": "#/$defs/plan"
                  }
                }
              },
              "year": {
                "type": [
                  "string",
                  "null"
                ]
              }
            }
          }
        },
        "yesterday": {
          "type": [
            "object",
            "null"
          ]
        },
        "duel_id": {
          "type": [
            "string",
            "null"
          ],
          "pattern": "^\\d{4}-\\d{2}-\\d{2}:[A-Z0-9]+:(1d|1w|1m|6m)(@\\d{8}T\\d{4}Z)?:mkt$",
          "description": "«Pick before the AIs»: POST <votes.url>/v {id: duel_id, side: \"up\"|\"down\", voter}; tally GET <votes.url>/t?ids=…"
        },
        "event": {
          "$ref": "#/$defs/event"
        }
      }
    },
    "evening_h": {
      "type": "object",
      "required": [
        "expected",
        "actual_pct",
        "right",
        "of",
        "draw"
      ],
      "properties": {
        "expected": {
          "enum": [
            "up",
            "down"
          ]
        },
        "actual_pct": {
          "type": "number"
        },
        "right": {
          "type": "integer",
          "minimum": 0
        },
        "of": {
          "type": "integer",
          "minimum": 0
        },
        "draw": {
          "type": "boolean"
        },
        "closest": {
          "type": [
            "string",
            "null"
          ]
        },
        "ref": {
          "type": [
            "number",
            "null"
          ]
        },
        "close": {
          "type": [
            "number",
            "null"
          ]
        }
      }
    },
    "event": {
      "type": [
        "object",
        "null"
      ],
      "description": "The one event a reader's call is on (the page's question, «accepted» line, reminder, the votes worker's intake and the score read the same): BTC carries its own last minute in the id.",
      "properties": {
        "duel_id": {
          "type": "string",
          "pattern": "^\\d{4}-\\d{2}-\\d{2}:[A-Z0-9]+:(1d|1w|1m|6m)(@\\d{8}T\\d{4}Z)?:mkt$"
        },
        "horizon": {
          "$ref": "#/$defs/horizon"
        },
        "session": {
          "type": "string"
        },
        "ref_at": {
          "$ref": "#/$defs/time"
        },
        "end_at": {
          "$ref": "#/$defs/time"
        },
        "score_at": {
          "$ref": "#/$defs/time"
        },
        "intake_closes_at": {
          "$ref": "#/$defs/time"
        }
      }
    }
  }
}
