{
  "openapi": "3.0.1",
  "info": {
    "title": "Prediction Markets Intelligence MCP (Polymarket & Kalshi)",
    "description": "Read-only MCP intelligence tool for Polymarket and Kalshi prediction markets. Search normalized live markets, inspect CLOB orderbook depth and VWAP slippage, and scan cross-venue arbitrage spreads with no API key, no wallet, and transparent $0.01 pay-per-event pricing.",
    "version": "0.1",
    "x-build-id": "h6U0KGwtD8OOIkeuK"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/signalnodes~prediction-markets-intel-mcp/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-signalnodes-prediction-markets-intel-mcp",
        "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/signalnodes~prediction-markets-intel-mcp/runs": {
      "post": {
        "operationId": "runs-sync-signalnodes-prediction-markets-intel-mcp",
        "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/signalnodes~prediction-markets-intel-mcp/run-sync": {
      "post": {
        "operationId": "run-sync-signalnodes-prediction-markets-intel-mcp",
        "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": {
          "action": {
            "title": "Action",
            "enum": [
              "search_markets",
              "orderbook_depth",
              "cross_venue_spread"
            ],
            "type": "string",
            "description": "Intelligence action to execute. Allowed enum values: 'search_markets' (default), 'orderbook_depth', 'cross_venue_spread'. Any other value or non-string triggers VALIDATION_ERROR with zero upstream HTTP calls and $0.00 charge.",
            "default": "search_markets"
          },
          "venues": {
            "title": "Venues",
            "enum": [
              "all",
              "polymarket",
              "kalshi"
            ],
            "type": "string",
            "description": "Target prediction market venue(s). Allowed enum values: 'all' (default), 'polymarket', 'kalshi'. Required constraints: for action='orderbook_depth', MUST be 'polymarket' or 'kalshi' ('all' is rejected); for action='cross_venue_spread', MUST be 'all' (or omitted). Invalid values or venue/action mismatches return VALIDATION_ERROR with $0.00 charge.",
            "default": "all"
          },
          "query": {
            "title": "Search Query",
            "maxLength": 120,
            "type": "string",
            "description": "Optional keyword filter for 'search_markets' and 'cross_venue_spread' (e.g., 'Fed rate cut', 'Bitcoin', 'US election'). Valid range: string of 0..120 characters after trimming whitespace. Non-strings or strings exceeding 120 characters return VALIDATION_ERROR with $0.00 charge.",
            "default": ""
          },
          "limit": {
            "title": "Result Limit",
            "minimum": 1,
            "maximum": 30,
            "type": "integer",
            "description": "Maximum number of markets or cross-venue spread pairs to return. Valid range: integer 1..30 (default: 10; booleans rejected). Out-of-range or non-integer values return VALIDATION_ERROR with $0.00 charge.",
            "default": 10
          },
          "minLiquidityUsd": {
            "title": "Minimum Liquidity (USD)",
            "minimum": 0,
            "maximum": 10000000,
            "type": "number",
            "description": "Minimum market liquidity threshold in USD for filtering results in 'search_markets' and 'cross_venue_spread'. Valid range: number 0..10000000 (default: 0; booleans rejected). Out-of-range or invalid types return VALIDATION_ERROR with $0.00 charge.",
            "default": 0
          },
          "marketId": {
            "title": "Polymarket Market ID",
            "pattern": "^[A-Za-z0-9._:-]{1,128}$",
            "maxLength": 128,
            "type": "string",
            "description": "Polymarket Gamma market ID used to resolve a CLOB token for action='orderbook_depth' with venues='polymarket'. Required when action='orderbook_depth', venues='polymarket', and tokenId is omitted. Valid format: 1..128 characters matching ^[A-Za-z0-9._:-]{1,128}$ ('.' and '..' path traversal or URLs rejected). Missing/invalid IDs return VALIDATION_ERROR with $0.00 charge."
          },
          "tokenId": {
            "title": "Polymarket CLOB Token ID",
            "pattern": "^[A-Za-z0-9._:-]{1,128}$",
            "maxLength": 128,
            "type": "string",
            "description": "Polymarket CLOB outcome token ID for action='orderbook_depth' with venues='polymarket'. Required when action='orderbook_depth', venues='polymarket', and marketId is omitted. Valid format: 1..128 characters matching ^[A-Za-z0-9._:-]{1,128}$ ('.' and '..' path traversal or URLs rejected). Missing/invalid token IDs return VALIDATION_ERROR with $0.00 charge."
          },
          "ticker": {
            "title": "Kalshi Market Ticker",
            "pattern": "^[A-Za-z0-9._:-]{1,128}$",
            "maxLength": 128,
            "type": "string",
            "description": "Kalshi v2 market ticker (e.g., 'KXFED-26DEC-T4.25'). Strictly required when action='orderbook_depth' and venues='kalshi'. Valid format: 1..128 characters matching ^[A-Za-z0-9._:-]{1,128}$ ('.' and '..' path traversal or URLs rejected). Missing/invalid tickers return VALIDATION_ERROR with $0.00 charge."
          },
          "orderSizeUsd": {
            "title": "Simulated Order Size (USD)",
            "minimum": 1,
            "maximum": 1000000,
            "type": "number",
            "description": "Notional buy-YES order size in USD for VWAP execution, slippage (bps), and fillable depth simulation in action='orderbook_depth'. Valid range: number 1..1000000 (default: 1000; booleans rejected). Out-of-range or invalid types return VALIDATION_ERROR with $0.00 charge.",
            "default": 1000
          },
          "minSpreadBps": {
            "title": "Minimum Raw Spread (bps)",
            "minimum": 0,
            "maximum": 5000,
            "type": "integer",
            "description": "Minimum raw cross-venue YES price discrepancy in basis points (100 bps = 1%) to include in action='cross_venue_spread'. Valid range: integer 0..5000 (default: 50; booleans rejected). Out-of-range or invalid types return VALIDATION_ERROR with $0.00 charge.",
            "default": 50
          },
          "minMatchScore": {
            "title": "Minimum Cross-Venue Match Score",
            "minimum": 0.2,
            "maximum": 1,
            "type": "number",
            "description": "Minimum entity, numeric/year, and expiry-proximity similarity score required to pair a Polymarket market with a Kalshi market in action='cross_venue_spread'. Valid range: number 0.2..1.0 (default: 0.45; booleans rejected). Out-of-range or invalid types return VALIDATION_ERROR with $0.00 charge.",
            "default": 0.45
          },
          "timeoutSec": {
            "title": "Upstream Timeout (seconds)",
            "minimum": 5,
            "maximum": 35,
            "type": "integer",
            "description": "Per-request HTTP timeout in seconds when querying official Polymarket and Kalshi read-only APIs. Valid range: integer 5..35 (default: 15; booleans rejected). Invalid values return VALIDATION_ERROR ($0.00 charge); if all requested upstream venues time out or fail, the Actor returns upstream_unavailable with $0.00 charge.",
            "default": 15
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}