{
  "openapi": "3.0.1",
  "info": {
    "title": "Kalshi Weather Markets + NWS Station Data [$0.02/city-day]",
    "description": "Every Kalshi daily high and low temperature market (24 US cities) joined to the NWS station that settles it: the full strike ladder with prices and implied probabilities, observations so far today, the daily and hourly forecast, and the official climate report. Free official APIs only.",
    "version": "0.1",
    "x-build-id": "z6UC4b81cqRWxG5CT"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/perchpermits~kalshi-weather-markets-nws/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-perchpermits-kalshi-weather-markets-nws",
        "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/perchpermits~kalshi-weather-markets-nws/runs": {
      "post": {
        "operationId": "runs-sync-perchpermits-kalshi-weather-markets-nws",
        "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/perchpermits~kalshi-weather-markets-nws/run-sync": {
      "post": {
        "operationId": "run-sync-perchpermits-kalshi-weather-markets-nws",
        "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": {
          "kind": {
            "title": "Market kind",
            "enum": [
              "both",
              "high",
              "low"
            ],
            "type": "string",
            "description": "`high` for daily maximum temperature ladders (KXHIGH*), `low` for daily minimum ladders (KXLOW*), or both.",
            "default": "both"
          },
          "status": {
            "title": "Market status",
            "enum": [
              "open",
              "closed",
              "settled"
            ],
            "type": "string",
            "description": "`open` lists ladders still trading (today and tomorrow). `closed` lists ladders past their last trading time but not yet settled. `settled` lists finalized ladders with each strike's yes/no result, useful for a training set with the official temperature.",
            "default": "open"
          },
          "stations": {
            "title": "Stations",
            "type": "array",
            "description": "Optional. Keep only these settlement stations, by the NWS climate-site code in Kalshi's rules: NYC, MDW (Chicago), MIA, AUS, DEN, LAX, PHL, ATL, BOS, DFW, DCA, EWR, HOU, LAS, MSP, MSY, OKC, PHX, SAN, SAT, SDF, SFO, TTN, SEA. Empty = every city.",
            "items": {
              "type": "string"
            }
          },
          "dateFrom": {
            "title": "Target date from",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
            "type": "string",
            "description": "Optional ISO date (YYYY-MM-DD). Keep ladders whose target day (the local calendar day the temperature is measured on) is on or after this date."
          },
          "dateTo": {
            "title": "Target date to",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
            "type": "string",
            "description": "Optional ISO date. Keep ladders whose target day is on or before this date."
          },
          "maxEvents": {
            "title": "Max ladders",
            "minimum": 1,
            "maximum": 2000,
            "type": "integer",
            "description": "Stop after this many city-day ladders. Open markets today are about 48 (24 cities, high and low).",
            "default": 100
          },
          "enrich": {
            "title": "Join to the NWS settlement station",
            "type": "boolean",
            "description": "Fetch api.weather.gov for each ladder's station: observations so far on the target day (running max/min), the daily and hourly forecast for that day, the official climate report once issued, and which strike each of those lands in. Charged as `enriched-event` instead of `event`. Ladders whose station is not an NWS site (international cities) stay plain.",
            "default": true
          },
          "includeHourlyPeriods": {
            "title": "Include hourly forecast periods",
            "type": "boolean",
            "description": "Add every hourly forecast period for the target day to the row (about 24 small objects). Larger rows.",
            "default": false
          },
          "analysis": {
            "title": "Write a ladder analysis",
            "type": "boolean",
            "description": "Add an `analysis_text` field to each enriched row: 90 to 140 words by Claude on where the market puts its weight, where the NWS forecast and the observations so far land, and what settled if the report is in. No trade recommendation, no invented facts. Charged as `ladder-analysis` on top of `enriched-event`, only for rows that got one. Needs `enrich`.",
            "default": false
          },
          "requestDelaySeconds": {
            "title": "Delay between requests (seconds)",
            "minimum": 0.1,
            "maximum": 5,
            "type": "number",
            "description": "Politeness delay toward both APIs. Kalshi's unauthenticated reads return 429 above roughly seven requests a second.",
            "default": 0.25
          },
          "archiveDatasetName": {
            "title": "Also append to a named dataset",
            "type": "string",
            "description": "Optional. Name of a dataset in your account to append every returned row to, so scheduled runs build a history of ladders, forecasts, and settlements that outlives run-data retention. Not charged again."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}