{
  "openapi": "3.0.1",
  "info": {
    "title": "Options Event-Risk Calendar",
    "description": "CPI, jobs, FOMC, GDP, PCE, auctions, opex & NYSE holidays before each option expiration, from official BLS, BEA, Census, Fed & Treasury data.",
    "version": "0.1",
    "x-build-id": "GewWGpAQIeptLhEzC"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/xprm-llc~options-event-risk-calendar/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-xprm-llc-options-event-risk-calendar",
        "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/xprm-llc~options-event-risk-calendar/runs": {
      "post": {
        "operationId": "runs-sync-xprm-llc-options-event-risk-calendar",
        "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/xprm-llc~options-event-risk-calendar/run-sync": {
      "post": {
        "operationId": "run-sync-xprm-llc-options-event-risk-calendar",
        "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": {
          "expirations": {
            "title": "Option expiration dates",
            "type": "array",
            "description": "Your option expiration dates as YYYY-MM-DD (for example 2026-11-20). Each date becomes one window: every scheduled event from the start date up to 4:00 PM ET on that expiration is listed with days and trading days before expiration. Leave empty to use 'Next N monthly expirations' instead.",
            "items": {
              "type": "string"
            }
          },
          "nextMonthlyExpirations": {
            "title": "Next N monthly expirations",
            "minimum": 0,
            "maximum": 24,
            "type": "integer",
            "description": "Add the next N standard monthly expirations (3rd Friday; the prior trading day if that Friday is an NYSE holiday). Default 2 when no expiration dates are given, otherwise 0. Set 0 with no dates for a plain calendar between the start and end dates."
          },
          "fromDate": {
            "title": "Start date (optional)",
            "type": "string",
            "description": "First day to include (YYYY-MM-DD, ET). Default: now, so events already released today are skipped. Use a past date to review history the agencies still list."
          },
          "toDate": {
            "title": "End date (optional)",
            "type": "string",
            "description": "Last day to include (YYYY-MM-DD, ET). Caps every window. In calendar mode (no expirations) the default is 30 days after the start date."
          },
          "windowMode": {
            "title": "Window mode",
            "enum": [
              "fromStart",
              "sincePreviousExpiration"
            ],
            "type": "string",
            "description": "fromStart: each expiration's window starts at the start date, so an event before two expirations appears twice (one row each, with its own days-before count). sincePreviousExpiration: windows don't overlap, so each event appears once and you pay for fewer rows.",
            "default": "fromStart"
          },
          "eventTypes": {
            "title": "Event types",
            "type": "array",
            "description": "Only include these categories. Leave empty for all.",
            "items": {
              "type": "string",
              "enum": [
                "inflation",
                "employment",
                "growth",
                "consumer",
                "housing",
                "manufacturing",
                "trade",
                "fomc",
                "treasury-auction",
                "opex",
                "market-calendar",
                "other"
              ],
              "enumTitles": [
                "Inflation (CPI, PPI, PCE, ECI)",
                "Employment (jobs report, JOLTS)",
                "Growth (GDP)",
                "Consumer (retail sales)",
                "Housing (starts, new home sales)",
                "Manufacturing (durable goods)",
                "Trade (trade balance)",
                "FOMC (rate decisions, minutes)",
                "Treasury auctions",
                "Options expirations (monthly, quarterly, VIX)",
                "Market calendar (NYSE holidays, early closes)",
                "Other releases"
              ]
            }
          },
          "minImpact": {
            "title": "Minimum impact",
            "enum": [
              "low",
              "medium",
              "high"
            ],
            "type": "string",
            "description": "Editorial tier of how much options implied volatility usually reacts. High: CPI, Employment Situation, FOMC decisions, GDP advance, Personal Income & Outlays (PCE), retail sales, quarterly expiration. Medium adds PPI, JOLTS, ECI, later GDP estimates, housing, durable goods, trade, FOMC minutes, 2-year-and-longer Treasury note/bond auctions, monthly opex, VIX settlement and NYSE holidays. Low adds everything else.",
            "default": "medium"
          },
          "sources": {
            "title": "Sources",
            "type": "array",
            "description": "Official sources to query. Leave empty for all six.",
            "items": {
              "type": "string",
              "enum": [
                "BLS",
                "BEA",
                "CENSUS",
                "FED",
                "TREASURY",
                "RULES"
              ],
              "enumTitles": [
                "BLS (CPI, jobs, PPI, JOLTS)",
                "BEA (GDP, PCE, trade)",
                "Census (retail sales, housing, durable goods)",
                "Federal Reserve (FOMC)",
                "U.S. Treasury (auctions)",
                "Computed rules (opex, VIX, NYSE holidays)"
              ]
            }
          },
          "ticker": {
            "title": "Ticker label (optional)",
            "type": "string",
            "description": "A label copied onto every row (for example SPY or your position name) so you can merge results from several runs. It doesn't change which events are returned; this Actor lists market-wide macro events, not company earnings."
          },
          "alertMode": {
            "title": "Alert mode (only new or moved events)",
            "type": "boolean",
            "description": "Remembers events in a named key-value store and writes only events that are new or whose date/time moved since the last run (changeStatus = new or moved). The first run writes everything as new. Use with a schedule.",
            "default": false
          },
          "stateStoreName": {
            "title": "Alert state store name",
            "type": "string",
            "description": "Named key-value store that holds alert state. Use a different name per watchlist or schedule.",
            "default": "event-risk-calendar-state"
          },
          "maxResults": {
            "title": "Max rows",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Hard cap on rows written (and so charged) per run.",
            "default": 300
          }
        }
      },
      "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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}