{
  "openapi": "3.0.1",
  "info": {
    "title": "Kalshi & Polymarket Arbitrage Scanner - Cross-Exchange Gaps",
    "description": "Finds the same question listed on both Kalshi and Polymarket and reports the price gap, each side’s spread, and whether the gap actually clears both spreads. Plus every market on both exchanges in one normalized schema. Lexical matching, match score on every pair. No API keys.",
    "version": "0.0",
    "x-build-id": "BvH4Vnxssknztmc8T"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/yawning_manuscript~kalshi-polymarket-market-data/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-yawning_manuscript-kalshi-polymarket-market-data",
        "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/yawning_manuscript~kalshi-polymarket-market-data/runs": {
      "post": {
        "operationId": "runs-sync-yawning_manuscript-kalshi-polymarket-market-data",
        "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/yawning_manuscript~kalshi-polymarket-market-data/run-sync": {
      "post": {
        "operationId": "run-sync-yawning_manuscript-kalshi-polymarket-market-data",
        "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": {
          "exchanges": {
            "title": "Exchanges",
            "type": "array",
            "description": "Which exchanges to pull. Both are needed for cross-exchange gap detection.",
            "items": {
              "type": "string",
              "enum": [
                "kalshi",
                "polymarket"
              ],
              "enumTitles": [
                "Kalshi",
                "Polymarket"
              ]
            },
            "default": [
              "kalshi",
              "polymarket"
            ]
          },
          "search": {
            "title": "Search terms",
            "type": "array",
            "description": "Keep only markets whose question, subtitle, category or ticker contains one of these, e.g. \"temperature\", \"fed\", \"election\", \"bitcoin\". Leave empty for everything.",
            "items": {
              "type": "string"
            }
          },
          "status": {
            "title": "Market status",
            "enum": [
              "open",
              "closed",
              "settled",
              "any"
            ],
            "type": "string",
            "description": "Open markets are the tradable ones. Closed/settled is for backtesting.",
            "default": "open"
          },
          "maxMarkets": {
            "title": "Max markets to return",
            "minimum": 1,
            "maximum": 20000,
            "type": "integer",
            "description": "Rows are billed per market, so this is your cost ceiling. Sorted by 24h volume, highest first.",
            "default": 500
          },
          "minVolume": {
            "title": "Minimum volume",
            "minimum": 0,
            "type": "integer",
            "description": "Drop illiquid markets below this traded volume. Set 0 to keep everything.",
            "default": 0
          },
          "crossExchangeGaps": {
            "title": "Find cross-exchange price gaps",
            "type": "boolean",
            "description": "Match questions listed on both exchanges and report the probability gap, flagging the ones where the gap is wider than both spreads combined.",
            "default": true
          },
          "matchThreshold": {
            "title": "Match strictness",
            "enum": [
              "0.25",
              "0.35",
              "0.5",
              "0.65",
              "0.8"
            ],
            "type": "string",
            "description": "How similar two questions must be to count as the same market. The two exchanges word the same event very differently, so 0.5 and above rarely matches anything real. Start at 0.35 and read match_score on every row before trading on it.",
            "default": "0.35"
          },
          "scanLimit": {
            "title": "Scan depth for search",
            "minimum": 100,
            "maximum": 20000,
            "type": "integer",
            "description": "When search terms are set, how many markets to scan before filtering. Scanning is free - you are only billed for the rows returned.",
            "default": 3000
          },
          "kalshiSeriesTicker": {
            "title": "Kalshi series ticker (optional)",
            "type": "string",
            "description": "Restrict Kalshi to one series, e.g. KXHIGHNY for the New York daily high temperature market."
          },
          "kalshiEventTicker": {
            "title": "Kalshi event ticker (optional)",
            "type": "string",
            "description": "Restrict Kalshi to a single event."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}