{
  "openapi": "3.0.1",
  "info": {
    "title": "Kalshi Weather Markets + Station Nowcast",
    "description": "Live Kalshi weather & temperature market data (KXHIGH, KXLOWT, rain, snow, hurricanes) with orderbooks, candlestick history, settled results and NWS/METAR station observations joined as distance-to-strike. Rebuilt for Kalshi's August 2026 API (dollars/fp fields).",
    "version": "0.1",
    "x-build-id": "gUbcMymkj1i7ozyAo"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/nanare-sudo~kalshi-weather-markets/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-nanare-sudo-kalshi-weather-markets",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/acts/nanare-sudo~kalshi-weather-markets/runs": {
      "post": {
        "operationId": "runs-sync-nanare-sudo-kalshi-weather-markets",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor and returns information about the initiated run in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/runsResponseSchema"
                }
              }
            }
          }
        }
      }
    },
    "/acts/nanare-sudo~kalshi-weather-markets/run-sync": {
      "post": {
        "operationId": "run-sync-nanare-sudo-kalshi-weather-markets",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "inputSchema": {
        "type": "object",
        "properties": {
          "mode": {
            "title": "Mode",
            "enum": [
              "markets",
              "settled",
              "orderbooks",
              "candlesticks",
              "observations",
              "discover",
              "canary"
            ],
            "type": "string",
            "description": "What to fetch: `markets` = open weather markets (optionally joined with live station observations), `settled` = settled markets with results (for backtesting), `orderbooks` = full orderbooks for open markets, `candlesticks` = price history, `observations` = raw METAR/NWS station observations only, `discover` = list all Kalshi weather series (free), `canary` = health self-test of all endpoints (free).",
            "default": "markets"
          },
          "seriesTickers": {
            "title": "Series tickers",
            "type": "array",
            "description": "Kalshi series tickers to fetch, e.g. `KXHIGHNY`, `KXHIGHCHI`, `KXLOWTPHX`. Leave empty to auto-discover every active Climate & Weather series (recommended — Kalshi renames tickers, hardcoding breaks).",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "cityFilter": {
            "title": "City / title filter",
            "type": "string",
            "description": "Case-insensitive substring filter on the series title, e.g. `NYC`, `Chicago`, `London`, `rain`. Applied after discovery."
          },
          "includeNowcast": {
            "title": "Join live station observation (nowcast)",
            "type": "boolean",
            "description": "For temperature markets: join the latest METAR/NWS observation of the settlement station and compute `distance_to_strike` (current °F minus market strike). One extra charged observation per station, not per market.",
            "default": true
          },
          "includeOrderbooks": {
            "title": "Also fetch orderbooks (markets mode)",
            "type": "boolean",
            "description": "In `markets` mode additionally fetch the full orderbook for each market (charged per orderbook).",
            "default": false
          },
          "maxMarkets": {
            "title": "Max markets",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Hard cap on the number of markets processed in one run.",
            "default": 200
          },
          "candlestickPeriodMinutes": {
            "title": "Candlestick period (minutes)",
            "minimum": 1,
            "maximum": 1440,
            "type": "integer",
            "description": "Candlestick interval for `candlesticks` mode. Allowed by Kalshi: 1, 60 or 1440 minutes — other values are snapped to the nearest allowed one.",
            "default": 60
          },
          "candlestickHoursBack": {
            "title": "Candlestick lookback (hours)",
            "minimum": 1,
            "maximum": 2160,
            "type": "integer",
            "description": "How many hours of history to fetch per market in `candlesticks` mode.",
            "default": 24
          },
          "settledDaysBack": {
            "title": "Settled lookback (days)",
            "minimum": 1,
            "maximum": 90,
            "type": "integer",
            "description": "In `settled` mode: fetch markets that closed within the last N days.",
            "default": 7
          },
          "stationIds": {
            "title": "Station IDs (observations mode)",
            "type": "array",
            "description": "ICAO/NWS station IDs for `observations` mode, e.g. `KNYC`, `KMDW`, `EGLL`. Ignored in other modes.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "stationOverrides": {
            "title": "Station overrides",
            "type": "object",
            "description": "Optional map of series ticker → station ID to override the built-in station inference, e.g. `{\"KXHIGHNY\": \"KNYC\"}`.",
            "default": {}
          }
        }
      },
      "runsResponseSchema": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "actId": {
                "type": "string"
              },
              "userId": {
                "type": "string"
              },
              "startedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "finishedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "status": {
                "type": "string",
                "example": "READY"
              },
              "meta": {
                "type": "object",
                "properties": {
                  "origin": {
                    "type": "string",
                    "example": "API"
                  },
                  "userAgent": {
                    "type": "string"
                  }
                }
              },
              "stats": {
                "type": "object",
                "properties": {
                  "inputBodyLen": {
                    "type": "integer",
                    "example": 2000
                  },
                  "rebootCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "restartCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "resurrectCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "computeUnits": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "options": {
                "type": "object",
                "properties": {
                  "build": {
                    "type": "string",
                    "example": "latest"
                  },
                  "timeoutSecs": {
                    "type": "integer",
                    "example": 300
                  },
                  "memoryMbytes": {
                    "type": "integer",
                    "example": 1024
                  },
                  "diskMbytes": {
                    "type": "integer",
                    "example": 2048
                  }
                }
              },
              "buildId": {
                "type": "string"
              },
              "defaultKeyValueStoreId": {
                "type": "string"
              },
              "defaultDatasetId": {
                "type": "string"
              },
              "defaultRequestQueueId": {
                "type": "string"
              },
              "buildNumber": {
                "type": "string",
                "example": "1.0.0"
              },
              "containerUrl": {
                "type": "string"
              },
              "usage": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "integer",
                    "example": 1
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "usageTotalUsd": {
                "type": "number",
                "example": 0.00005
              },
              "usageUsd": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "number",
                    "example": 0.00005
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}