{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/kalshispy-com/json-schema/kalshispy-com-trade-search-schema.json",
  "title": "TradeSearch",
  "x-generated": "2026-11-13",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/kalshispy-com-openapi.json#/components/schemas/TradeSearch",
  "type": "object",
  "properties": {
    "mode": {
      "type": "string",
      "enum": [
        "title",
        "series",
        "trader"
      ]
    },
    "series": {
      "type": "array",
      "description": "mode=title only",
      "items": {
        "type": "object",
        "properties": {
          "series_ticker": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "category": {
            "type": "string"
          },
          "volume": {
            "type": "string"
          },
          "market_count": {
            "type": "integer"
          },
          "kalshi_url": {
            "type": "string",
            "format": "uri"
          }
        }
      }
    },
    "trades": {
      "type": "array",
      "description": "mode=series / mode=trader only",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Unique within the response and the same in mode=series and mode=trader. A trade between two named traders gives two rows; the second trader's row id ends in `:maker`."
          },
          "nickname": {
            "type": "string"
          },
          "side": {
            "type": "string",
            "enum": [
              "YES",
              "NO"
            ]
          },
          "ticker": {
            "type": "string"
          },
          "question": {
            "type": "string"
          },
          "category": {
            "type": "string"
          },
          "category_key": {
            "type": "string",
            "enum": [
              "politics",
              "elections",
              "sports",
              "entertainment",
              "economics",
              "financials",
              "crypto",
              "weather",
              "world",
              "scitech",
              "companies",
              "health",
              "social",
              "transportation",
              "mentions",
              "exotics",
              "other"
            ]
          },
          "price_cents": {
            "type": "integer"
          },
          "contracts": {
            "type": "integer"
          },
          "notional_usd": {
            "type": "number"
          },
          "placed_ago": {
            "type": "string"
          },
          "market_closed": {
            "type": "boolean"
          },
          "pnl_est_usd": {
            "type": [
              "number",
              "null"
            ]
          },
          "pnl_cur_usd": {
            "type": [
              "number",
              "null"
            ]
          },
          "trader_lifetime_pnl_usd": {
            "type": [
              "number",
              "null"
            ]
          }
        }
      }
    }
  }
}