{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/fiatdock-com/json-schema/fiatdock-com-prediction-markets-schema.json",
  "title": "PredictionMarkets",
  "description": "Paid. Prediction markets (Polymarket).",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/fiatdock-com-markets-api-openapi.yml#/components/schemas/PredictionMarkets",
  "type": "object",
  "properties": {
    "venue": {
      "type": "string",
      "description": "The prediction market (Polymarket)"
    },
    "query": {
      "type": [
        "string",
        "null"
      ],
      "description": "The search query, or null for the markets with the most 24h volume"
    },
    "count": {
      "type": "number",
      "description": "Markets returned"
    },
    "markets": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "question": {
            "type": "string"
          },
          "event": {
            "type": "string"
          },
          "outcomes": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "name": {
                  "type": "string"
                },
                "price": {
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "impliedProbabilityPct": {
                  "type": [
                    "number",
                    "null"
                  ]
                }
              },
              "required": [
                "name",
                "price",
                "impliedProbabilityPct"
              ]
            }
          },
          "volume24hUsd": {
            "type": [
              "number",
              "null"
            ]
          },
          "volumeUsd": {
            "type": [
              "number",
              "null"
            ]
          },
          "liquidityUsd": {
            "type": [
              "number",
              "null"
            ]
          },
          "endDate": {
            "type": [
              "string",
              "null"
            ]
          },
          "url": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "question",
          "event",
          "outcomes",
          "volume24hUsd",
          "volumeUsd",
          "liquidityUsd",
          "endDate",
          "url"
        ]
      },
      "description": "Open markets, most 24h volume first"
    },
    "source": {
      "type": "string",
      "description": "Where the data came from"
    },
    "asOf": {
      "type": "string",
      "description": "ISO time the upstream data was read"
    },
    "note": {
      "type": "string",
      "description": "How to read a price, and its limits"
    }
  },
  "required": [
    "venue",
    "query",
    "count",
    "markets",
    "source",
    "asOf",
    "note"
  ]
}