{
 "openapi": "3.1.0",
 "info": {
  "title": "Kalshi View live odds API",
  "version": "1.0.0",
  "summary": "Key-less static JSON with Kalshi odds, refreshed twice a day.",
  "description": "Static files on a CDN: no key, no sign-up. Prices come from Kalshi's public trade API and are refreshed twice a day (about 11:20 and 23:20 UTC). CC BY 4.0: credit Kalshi View with a visible link. Kalshi View is not affiliated with Kalshi; verify prices on Kalshi before trading.",
  "license": {
   "name": "CC BY 4.0",
   "url": "https://creativecommons.org/licenses/by/4.0/"
  },
  "contact": {
   "name": "Kalshi View",
   "url": "https://kalshiview.com/"
  }
 },
 "servers": [
  {
   "url": "https://kalshiview.com"
  }
 ],
 "externalDocs": {
  "description": "Kalshi odds today (the pages behind the data)",
  "url": "https://kalshiview.com/markets/live/"
 },
 "tags": [
  {
   "name": "Live odds"
  }
 ],
 "paths": {
  "/api/v1/markets/index.json": {
   "get": {
    "summary": "Every live event page with its leading outcome",
    "operationId": "listMarkets",
    "tags": [
     "Live odds"
    ],
    "responses": {
     "200": {
      "description": "The index, most traded first",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/MarketIndex"
        }
       }
      }
     }
    }
   }
  },
  "/api/v1/markets/{slug}.json": {
   "get": {
    "summary": "One event: every outcome's chance, volume, open interest and 30-day history",
    "operationId": "getMarket",
    "tags": [
     "Live odds"
    ],
    "responses": {
     "200": {
      "description": "The event",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Event"
        }
       }
      }
     }
    },
    "parameters": [
     {
      "name": "slug",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "pattern": "^[a-z0-9-]+$"
      },
      "description": "Event slug, as listed in /api/v1/markets/index.json"
     }
    ]
   }
  },
  "/api/v1/markets/topics/{topic}.json": {
   "get": {
    "summary": "The open events of one topic",
    "operationId": "getTopic",
    "tags": [
     "Live odds"
    ],
    "responses": {
     "200": {
      "description": "Topic events with leader, probability and close time",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Stamped"
        }
       }
      }
     }
    },
    "parameters": [
     {
      "name": "topic",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "pattern": "^[a-z0-9-]+$"
      },
      "description": "Topic slug, such as fed-rates, inflation, 2028-election or bitcoin (the topic pages under /markets/topic/)"
     }
    ]
   }
  },
  "/api/v1/markets/movers.json": {
   "get": {
    "summary": "Biggest 24-hour and 7-day moves",
    "operationId": "getMovers",
    "tags": [
     "Live odds"
    ],
    "responses": {
     "200": {
      "description": "Movers",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Stamped"
        }
       }
      }
     }
    }
   }
  },
  "/api/v1/markets/new.json": {
   "get": {
    "summary": "Events whose first contract opened in the last 7 days",
    "operationId": "getNewMarkets",
    "tags": [
     "Live odds"
    ],
    "responses": {
     "200": {
      "description": "New markets",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Stamped"
        }
       }
      }
     }
    }
   }
  },
  "/api/v1/markets/games.json": {
   "get": {
    "summary": "This week's single games by league, with both sides' prices",
    "operationId": "getGames",
    "tags": [
     "Live odds"
    ],
    "responses": {
     "200": {
      "description": "Games by league",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Stamped"
        }
       }
      }
     }
    }
   }
  },
  "/api/v1/markets/arbitrage-check.json": {
   "get": {
    "summary": "Price sums of every open mutually exclusive event",
    "operationId": "getArbitrageCheck",
    "tags": [
     "Live odds"
    ],
    "responses": {
     "200": {
      "description": "Sums of Yes asks and bids, with the check",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Stamped"
        }
       }
      }
     }
    }
   }
  },
  "/api/v1/markets/accuracy.json": {
   "get": {
    "summary": "Accuracy study of settled markets (calibration by price band)",
    "operationId": "getAccuracy",
    "tags": [
     "Live odds"
    ],
    "responses": {
     "200": {
      "description": "The study",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Stamped"
        }
       }
      }
     }
    }
   }
  },
  "/api/v1/markets/accuracy.csv": {
   "get": {
    "summary": "The accuracy study sample as CSV",
    "operationId": "getAccuracyCsv",
    "tags": [
     "Live odds"
    ],
    "responses": {
     "200": {
      "description": "CSV",
      "content": {
       "text/csv": {
        "schema": {
         "type": "string"
        }
       }
      }
     }
    }
   }
  }
 },
 "components": {
  "schemas": {
   "Attribution": {
    "type": "object",
    "description": "CC BY 4.0: show a visible link to Kalshi View when you use the data.",
    "properties": {
     "required": {
      "type": "boolean"
     },
     "text": {
      "type": "string"
     },
     "url": {
      "type": "string",
      "format": "uri"
     },
     "html": {
      "type": "string"
     }
    },
    "required": [
     "required",
     "text",
     "url"
    ]
   },
   "Stamped": {
    "type": "object",
    "additionalProperties": true,
    "properties": {
     "updated": {
      "type": "string",
      "format": "date-time"
     },
     "license": {
      "type": "string"
     },
     "attribution": {
      "$ref": "#/components/schemas/Attribution"
     }
    }
   },
   "Outcome": {
    "type": "object",
    "properties": {
     "name": {
      "type": "string"
     },
     "ticker": {
      "type": "string",
      "description": "Kalshi market ticker"
     },
     "probability": {
      "type": "number",
      "minimum": 0,
      "maximum": 1,
      "description": "Midpoint of the best Yes bid and ask (last trade when the spread is wider than 10 cents)"
     },
     "change_24h": {
      "type": [
       "number",
       "null"
      ],
      "description": "Change of the last price over the previous day, in probability"
     },
     "volume_contracts": {
      "type": "number"
     },
     "open_interest_contracts": {
      "type": "number"
     },
     "close_time": {
      "type": [
       "string",
       "null"
      ],
      "format": "date-time"
     }
    },
    "required": [
     "name",
     "ticker",
     "probability"
    ]
   },
   "Event": {
    "type": "object",
    "properties": {
     "slug": {
      "type": "string"
     },
     "event_ticker": {
      "type": "string"
     },
     "series_ticker": {
      "type": "string"
     },
     "title": {
      "type": "string"
     },
     "category": {
      "type": "string"
     },
     "url": {
      "type": "string",
      "format": "uri"
     },
     "kalshi_url": {
      "type": "string",
      "format": "uri"
     },
     "updated": {
      "type": "string",
      "format": "date-time"
     },
     "closed": {
      "type": "boolean"
     },
     "volume_contracts": {
      "type": "number"
     },
     "volume_24h_contracts": {
      "type": "number"
     },
     "open_interest_contracts": {
      "type": "number"
     },
     "outcomes": {
      "type": "array",
      "items": {
       "$ref": "#/components/schemas/Outcome"
      }
     },
     "history": {
      "type": "object",
      "description": "30 days of daily closing prices for up to three outcomes: name -> [[unix_seconds, price], ...]",
      "additionalProperties": {
       "type": "array",
       "items": {
        "type": "array",
        "items": {
         "type": "number"
        }
       }
      }
     },
     "license": {
      "type": "string"
     },
     "license_url": {
      "type": "string",
      "format": "uri"
     },
     "attribution": {
      "$ref": "#/components/schemas/Attribution"
     },
     "source": {
      "type": "string"
     }
    },
    "required": [
     "slug",
     "event_ticker",
     "title",
     "url",
     "updated",
     "closed",
     "outcomes",
     "license",
     "attribution"
    ]
   },
   "MarketIndex": {
    "type": "object",
    "properties": {
     "updated": {
      "type": "string",
      "format": "date-time"
     },
     "count": {
      "type": "integer"
     },
     "license": {
      "type": "string"
     },
     "attribution": {
      "$ref": "#/components/schemas/Attribution"
     },
     "markets": {
      "type": "array",
      "items": {
       "type": "object",
       "properties": {
        "slug": {
         "type": "string"
        },
        "event_ticker": {
         "type": "string"
        },
        "title": {
         "type": "string"
        },
        "category": {
         "type": "string"
        },
        "url": {
         "type": "string",
         "format": "uri"
        },
        "api": {
         "type": "string",
         "format": "uri"
        },
        "leader": {
         "type": [
          "string",
          "null"
         ]
        },
        "probability": {
         "type": [
          "number",
          "null"
         ]
        },
        "volume_24h_contracts": {
         "type": "number"
        }
       }
      }
     }
    },
    "required": [
     "updated",
     "count",
     "markets"
    ]
   }
  }
 }
}
